diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 057d221ac..04e77f00a 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -8,6 +8,9 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status oas @@ -20,9 +23,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build PHP SDK run: ./generate-sdks -t php + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status php @@ -35,9 +44,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build Python SDK run: ./generate-sdks -t python + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status python @@ -50,9 +65,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build Ruby SDK run: ./generate-sdks -t ruby + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status ruby @@ -65,9 +86,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build NodeJs SDK run: ./generate-sdks -t node + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status node @@ -80,9 +107,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build Java SDK run: ./generate-sdks -t java-v1 + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status java-v1 @@ -95,9 +128,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build Java SDK run: ./generate-sdks -t java-v2 + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status java-v2 @@ -110,9 +149,15 @@ jobs: - name: Build OpenAPI Spec run: ./build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Build DotNet SDK run: ./generate-sdks -t dotnet + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status dotnet diff --git a/bin/php b/bin/php index 64e039023..e0aa3ee10 100755 --- a/bin/php +++ b/bin/php @@ -8,6 +8,11 @@ DIR=$(cd `dirname $0` && pwd) ROOT_DIR="${DIR}/.." WORKING_DIR="/app/openapi" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + docker run --rm \ -v "${ROOT_DIR}:${WORKING_DIR}" \ -v "dropbox-sign-sdk-composer-cache:/.composer" \ diff --git a/examples/FaxDelete.cs b/examples/FaxDelete.cs new file mode 100644 index 000000000..88a6ed074 --- /dev/null +++ b/examples/FaxDelete.cs @@ -0,0 +1,28 @@ +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 new file mode 100644 index 000000000..794b74d94 --- /dev/null +++ b/examples/FaxDelete.java @@ -0,0 +1,25 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + try { + faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxDelete.js b/examples/FaxDelete.js new file mode 100644 index 000000000..38492bd21 --- /dev/null +++ b/examples/FaxDelete.js @@ -0,0 +1,13 @@ +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 new file mode 100644 index 000000000..a5c62f5e9 --- /dev/null +++ b/examples/FaxDelete.php @@ -0,0 +1,18 @@ +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 new file mode 100644 index 000000000..adf2a5da8 --- /dev/null +++ b/examples/FaxDelete.py @@ -0,0 +1,16 @@ +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 new file mode 100644 index 000000000..f68be3440 --- /dev/null +++ b/examples/FaxDelete.rb @@ -0,0 +1,14 @@ +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.sh b/examples/FaxDelete.sh new file mode 100644 index 000000000..3f8bf21e7 --- /dev/null +++ b/examples/FaxDelete.sh @@ -0,0 +1,2 @@ +curl -X DELETE 'https://api.hellosign.com/v3/fax/{fax_id}' \ + -u 'YOUR_API_KEY:' diff --git a/examples/FaxDelete.ts b/examples/FaxDelete.ts new file mode 100644 index 000000000..38492bd21 --- /dev/null +++ b/examples/FaxDelete.ts @@ -0,0 +1,13 @@ +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/FaxFiles.cs b/examples/FaxFiles.cs new file mode 100644 index 000000000..fbaf4166e --- /dev/null +++ b/examples/FaxFiles.cs @@ -0,0 +1,34 @@ +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 new file mode 100644 index 000000000..bd6dcc5df --- /dev/null +++ b/examples/FaxFiles.java @@ -0,0 +1,28 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.io.File; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + File result = faxApi.faxFiles(faxId); + result.renameTo(new File("file_response.pdf"));; + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxFiles.js b/examples/FaxFiles.js new file mode 100644 index 000000000..d7390cf60 --- /dev/null +++ b/examples/FaxFiles.js @@ -0,0 +1,17 @@ +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 new file mode 100644 index 000000000..d543eea9c --- /dev/null +++ b/examples/FaxFiles.php @@ -0,0 +1,21 @@ +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 new file mode 100644 index 000000000..110a0f7b5 --- /dev/null +++ b/examples/FaxFiles.py @@ -0,0 +1,19 @@ +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 new file mode 100644 index 000000000..d867387ad --- /dev/null +++ b/examples/FaxFiles.rb @@ -0,0 +1,17 @@ +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.sh b/examples/FaxFiles.sh new file mode 100644 index 000000000..02f04e4a1 --- /dev/null +++ b/examples/FaxFiles.sh @@ -0,0 +1,3 @@ +curl -X GET 'https://api.hellosign.com/v3/fax/files/{fax_id}' \ + -u 'YOUR_API_KEY:' \ + --output downloaded_document.pdf \ No newline at end of file diff --git a/examples/FaxFiles.ts b/examples/FaxFiles.ts new file mode 100644 index 000000000..d7390cf60 --- /dev/null +++ b/examples/FaxFiles.ts @@ -0,0 +1,17 @@ +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/FaxGet.cs b/examples/FaxGet.cs new file mode 100644 index 000000000..6396e0c34 --- /dev/null +++ b/examples/FaxGet.cs @@ -0,0 +1,31 @@ +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 new file mode 100644 index 000000000..a9cc433df --- /dev/null +++ b/examples/FaxGet.java @@ -0,0 +1,27 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + FaxGetResponse result = faxApi.faxGet(faxId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxGet.js b/examples/FaxGet.js new file mode 100644 index 000000000..8a1dbbfda --- /dev/null +++ b/examples/FaxGet.js @@ -0,0 +1,16 @@ +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 new file mode 100644 index 000000000..43b7a1f3e --- /dev/null +++ b/examples/FaxGet.php @@ -0,0 +1,21 @@ +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 new file mode 100644 index 000000000..c56656833 --- /dev/null +++ b/examples/FaxGet.py @@ -0,0 +1,19 @@ +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 new file mode 100644 index 000000000..64dc1c057 --- /dev/null +++ b/examples/FaxGet.rb @@ -0,0 +1,17 @@ +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.sh b/examples/FaxGet.sh new file mode 100644 index 000000000..03aad0e46 --- /dev/null +++ b/examples/FaxGet.sh @@ -0,0 +1,2 @@ +curl -X GET 'https://api.hellosign.com/v3/fax/{fax_id}' \ + -u 'YOUR_API_KEY:' diff --git a/examples/FaxGet.ts b/examples/FaxGet.ts new file mode 100644 index 000000000..793f6e5d3 --- /dev/null +++ b/examples/FaxGet.ts @@ -0,0 +1,16 @@ +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/FaxList.cs b/examples/FaxList.cs new file mode 100644 index 000000000..f87d9b8f2 --- /dev/null +++ b/examples/FaxList.cs @@ -0,0 +1,32 @@ +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 new file mode 100644 index 000000000..042bb7107 --- /dev/null +++ b/examples/FaxList.java @@ -0,0 +1,28 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var page = 1; + var pageSize = 2; + + try { + FaxListResponse result = faxApi.faxList(page, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxList.js b/examples/FaxList.js new file mode 100644 index 000000000..385f44779 --- /dev/null +++ b/examples/FaxList.js @@ -0,0 +1,17 @@ +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 new file mode 100644 index 000000000..d2a513c21 --- /dev/null +++ b/examples/FaxList.php @@ -0,0 +1,22 @@ +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 new file mode 100644 index 000000000..6b71f79b6 --- /dev/null +++ b/examples/FaxList.py @@ -0,0 +1,23 @@ +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 new file mode 100644 index 000000000..3f37a71ea --- /dev/null +++ b/examples/FaxList.rb @@ -0,0 +1,18 @@ +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.sh b/examples/FaxList.sh new file mode 100644 index 000000000..9739d65dc --- /dev/null +++ b/examples/FaxList.sh @@ -0,0 +1,2 @@ +curl -X GET 'https://api.hellosign.com/v3/fax/list?page=1&page_size=20' \ + -u 'YOUR_API_KEY:' diff --git a/examples/FaxList.ts b/examples/FaxList.ts new file mode 100644 index 000000000..385f44779 --- /dev/null +++ b/examples/FaxList.ts @@ -0,0 +1,17 @@ +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/FaxSend.cs b/examples/FaxSend.cs new file mode 100644 index 000000000..8e72a4f93 --- /dev/null +++ b/examples/FaxSend.cs @@ -0,0 +1,49 @@ +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 new file mode 100644 index 000000000..4e764da83 --- /dev/null +++ b/examples/FaxSend.java @@ -0,0 +1,37 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + + var data = new FaxSendRequest() + .addFilesItem(new File("example_fax.pdf")) + .testMode(true) + .recipient("16690000001") + .sender("16690000000") + .coverPageTo("Jill Fax") + .coverPageMessage("I'm sending you a fax!") + .coverPageFrom("Faxer Faxerson") + .title("This is what the fax is about!"); + + try { + FaxCreateResponse result = faxApi.faxSend(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxSend.js b/examples/FaxSend.js new file mode 100644 index 000000000..4b0eef2da --- /dev/null +++ b/examples/FaxSend.js @@ -0,0 +1,47 @@ +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 new file mode 100644 index 000000000..2dd42d386 --- /dev/null +++ b/examples/FaxSend.php @@ -0,0 +1,29 @@ +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 new file mode 100644 index 000000000..c24d6ada7 --- /dev/null +++ b/examples/FaxSend.py @@ -0,0 +1,28 @@ +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 new file mode 100644 index 000000000..c37cbbd10 --- /dev/null +++ b/examples/FaxSend.rb @@ -0,0 +1,25 @@ +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.sh b/examples/FaxSend.sh new file mode 100644 index 000000000..7ab64cb31 --- /dev/null +++ b/examples/FaxSend.sh @@ -0,0 +1,10 @@ +curl -X POST 'https://api.hellosign.com/v3/fax/send' \ + -u 'YOUR_API_KEY:' \ + -F 'files[0]=@mutual-NDA-example.pdf' \ + -F 'test_mode=1' \ + -F 'recipient=16690000001' \ + -F 'sender=16690000000' \ + -F 'cover_page_to=Jill Fax' \ + -F 'cover_page_message=I sent you a fax!' \ + -F 'cover_page_from=Faxer Faxerson' \ + -F 'title=This is what the fax is about!' \ No newline at end of file diff --git a/examples/FaxSend.ts b/examples/FaxSend.ts new file mode 100644 index 000000000..2f3f6e25d --- /dev/null +++ b/examples/FaxSend.ts @@ -0,0 +1,47 @@ +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/json/FaxGetResponseExample.json b/examples/json/FaxGetResponseExample.json new file mode 100644 index 000000000..30475f119 --- /dev/null +++ b/examples/json/FaxGetResponseExample.json @@ -0,0 +1,21 @@ +{ + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } +} \ No newline at end of file diff --git a/examples/json/FaxListResponseExample.json b/examples/json/FaxListResponseExample.json new file mode 100644 index 000000000..bf4f66bcc --- /dev/null +++ b/examples/json/FaxListResponseExample.json @@ -0,0 +1,29 @@ +{ + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] +} diff --git a/examples/json/FaxSendRequestExample.json b/examples/json/FaxSendRequestExample.json new file mode 100644 index 000000000..fe7e68820 --- /dev/null +++ b/examples/json/FaxSendRequestExample.json @@ -0,0 +1,12 @@ +{ + "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/TeamAddMemberResponseExample.json b/examples/json/TeamAddMemberResponseExample.json index 01cc872b6..c0131e0b5 100644 --- a/examples/json/TeamAddMemberResponseExample.json +++ b/examples/json/TeamAddMemberResponseExample.json @@ -30,6 +30,10 @@ } } ], - "invited_emails": [] + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamGetResponseExample.json b/examples/json/TeamGetResponseExample.json index 6136d4172..56117a96e 100644 --- a/examples/json/TeamGetResponseExample.json +++ b/examples/json/TeamGetResponseExample.json @@ -29,7 +29,24 @@ "role_code": "m" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamRemoveMemberResponseExample.json b/examples/json/TeamRemoveMemberResponseExample.json index 0f9d0cb4c..e31b8a809 100644 --- a/examples/json/TeamRemoveMemberResponseExample.json +++ b/examples/json/TeamRemoveMemberResponseExample.json @@ -16,7 +16,24 @@ "role_code": "a" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/examples/json/TeamUpdateResponseExample.json b/examples/json/TeamUpdateResponseExample.json index 9e91f9856..c0131e0b5 100644 --- a/examples/json/TeamUpdateResponseExample.json +++ b/examples/json/TeamUpdateResponseExample.json @@ -16,7 +16,24 @@ "role_code": "a" } ], - "invited_accounts": [], - "invited_emails": [] + "invited_accounts": [ + { + "account_id": "8e239b5a50eac117fdd9a0e2359620aa57cb2463", + "email_address": "george@hellofax.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": false, + "quotas": { + "templates_left": 0, + "documents_left": 3, + "api_signature_requests_left": 0 + } + } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" + ] } } diff --git a/openapi-raw.yaml b/openapi-raw.yaml index a0d21f20e..4920f55a7 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -1403,6 +1403,304 @@ paths: seo: title: '_t__EmbeddedSignUrl::SEO::TITLE' description: '_t__EmbeddedSignUrl::SEO::DESCRIPTION' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: '_t__FaxGet::SUMMARY' + description: '_t__FaxGet::DESCRIPTION' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: '_t__FaxParam::FAX_ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: '_t__FaxGet::SEO::TITLE' + description: '_t__FaxGet::SEO::DESCRIPTION' + delete: + tags: + - Fax + summary: '_t__FaxDelete::SUMMARY' + description: '_t__FaxDelete::DESCRIPTION' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: '_t__FaxParam::FAX_ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + '204': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: '_t__FaxDelete::SEO::TITLE' + description: '_t__FaxDelete::SEO::DESCRIPTION' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: '_t__FaxFiles::SUMMARY' + description: '_t__FaxFiles::DESCRIPTION' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: '_t__FaxParam::FAX_ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: '_t__FaxFiles::SEO::TITLE' + description: '_t__FaxFiles::SEO::DESCRIPTION' /fax_line/add_user: put: tags: @@ -1971,53 +2269,262 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: '_t__FaxLineDelete::SEO::TITLE' + description: '_t__FaxLineDelete::SEO::DESCRIPTION' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: '_t__FaxLineList::SUMMARY' + description: '_t__FaxLineList::DESCRIPTION' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: '_t__FaxLineList::ACCOUNT_ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: '_t__FaxLineList::PAGE' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: '_t__FaxLineList::PAGE_SIZE' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: '_t__FaxLineList::SHOW_TEAM_LINES' + schema: + type: boolean + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: '_t__FaxLineList::SEO::TITLE' + description: '_t__FaxLineList::SEO::DESCRIPTION' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: '_t__FaxLineRemoveUser::SUMMARY' + description: '_t__FaxLineRemoveUser::DESCRIPTION' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: '_t__FaxLineDelete::SEO::TITLE' - description: '_t__FaxLineDelete::SEO::DESCRIPTION' - /fax_line/list: + title: '_t__FaxLineRemoveUser::SEO::TITLE' + description: '_t__FaxLineRemoveUser::SEO::DESCRIPTION' + /fax/list: get: tags: - - 'Fax Line' - summary: '_t__FaxLineList::SUMMARY' - description: '_t__FaxLineList::DESCRIPTION' - operationId: faxLineList + - Fax + summary: '_t__FaxList::SUMMARY' + description: '_t__FaxList::DESCRIPTION' + operationId: faxList parameters: - - - name: account_id - in: query - description: '_t__FaxLineList::ACCOUNT_ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query - description: '_t__FaxLineList::PAGE' + description: '_t__FaxList::PAGE' schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size in: query - description: '_t__FaxLineList::PAGE_SIZE' + description: '_t__FaxList::PAGE_SIZE' schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: '_t__FaxLineList::SHOW_TEAM_LINES' - schema: - type: boolean responses: '200': description: 'successful operation' @@ -2031,10 +2538,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2060,62 +2567,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: '_t__FaxLineList::SEO::TITLE' - description: '_t__FaxLineList::SEO::DESCRIPTION' - /fax_line/remove_user: - put: + title: '_t__FaxList::SEO::TITLE' + description: '_t__FaxList::SEO::DESCRIPTION' + /fax/send: + post: tags: - - 'Fax Line' - summary: '_t__FaxLineRemoveUser::SUMMARY' - description: '_t__FaxLineRemoveUser::DESCRIPTION' - operationId: faxLineRemoveUser + - Fax + summary: '_t__FaxSend::SUMMARY' + description: '_t__FaxSend::DESCRIPTION' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: '200': description: 'successful operation' @@ -2129,10 +2639,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2150,6 +2660,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2160,46 +2672,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: '_t__FaxLineRemoveUser::SEO::TITLE' - description: '_t__FaxLineRemoveUser::SEO::DESCRIPTION' + title: '_t__FaxSend::SEO::TITLE' + description: '_t__FaxSend::SEO::DESCRIPTION' /oauth/token: post: tags: @@ -2233,6 +2745,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2316,6 +2845,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -4568,7 +5114,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -7251,6 +7797,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: '_t__FaxSend::RECIPIENT' + type: string + example: recipient@example.com + sender: + description: '_t__FaxSend::SENDER' + type: string + example: sender@example.com + files: + description: '_t__FaxSend::FILE' + type: array + items: + type: string + format: binary + file_urls: + description: '_t__FaxSend::FILE_URL' + type: array + items: + type: string + test_mode: + description: '_t__FaxSend::TEST_MODE' + type: boolean + default: false + cover_page_to: + description: '_t__FaxSend::COVER_PAGE_TO' + type: string + example: 'Recipient Name' + cover_page_from: + description: '_t__FaxSend::COVER_PAGE_FROM' + type: string + example: 'Sender Name' + cover_page_message: + description: '_t__FaxSend::COVER_PAGE_MESSAGE' + type: string + example: 'Please find the attached documents.' + title: + description: '_t__FaxSend::TITLE' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7288,6 +7878,12 @@ components: refresh_token: description: '_t__OAuthTokenRefresh::REFRESH_TOKEN' type: string + client_id: + description: '_t__OAuthTokenRefresh::CLIENT_ID' + type: string + client_secret: + description: '_t__OAuthTokenRefresh::CLIENT_SECRET' + type: string type: object ReportCreateRequest: required: @@ -8671,7 +9267,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -8680,40 +9276,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: '_t__Sub::WhiteLabelingOptions::RESET_TO_DEFAULT' type: boolean @@ -9603,6 +10199,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: '_t__WarningResponse::LIST_DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -9638,6 +10247,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -9848,6 +10470,7 @@ components: secret: description: '_t__ApiAppResponseOAuth::SECRET' type: string + nullable: true scopes: description: '_t__ApiAppResponseOAuth::SCOPES' type: array @@ -9981,6 +10604,54 @@ components: description: '_t__ErrorResponseError::ERROR_NAME' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: '_t__FaxResponse::FAX_ID' + type: string + title: + description: '_t__FaxResponse::TITLE' + type: string + original_title: + description: '_t__FaxResponse::ORIGINAL_TITLE' + type: string + subject: + description: '_t__FaxResponse::SUBJECT' + type: string + message: + description: '_t__FaxResponse::MESSAGE' + type: string + metadata: + description: '_t__FaxResponse::METADATA' + type: object + additionalProperties: { } + created_at: + description: '_t__FaxResponse::CREATED_AT' + type: integer + sender: + description: '_t__FaxResponse::SENDER' + type: string + transmissions: + description: '_t__FaxResponse::TRANSMISSIONS' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: '_t__FaxResponse::FILES_URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -9998,6 +10669,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: '_t__Sub::FaxResponseTransmission::RECIPIENT' + type: string + sender: + description: '_t__Sub::FaxResponseTransmission::SENDER' + type: string + status_code: + description: '_t__Sub::FaxResponseTransmission::STATUS_CODE' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: '_t__Sub::FaxResponseTransmission::SENT_AT' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: '_t__ListInfoResponse::DESCRIPTION' properties: @@ -10608,15 +11308,12 @@ components: is_creator: description: '_t__TemplateResponse::IS_CREATOR' type: boolean - nullable: true can_edit: description: '_t__TemplateResponse::CAN_EDIT' type: boolean - nullable: true is_locked: description: '_t__TemplateResponse::IS_LOCKED' type: boolean - nullable: true metadata: description: '_t__TemplateResponse::METADATA' type: object @@ -10654,7 +11351,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: '_t__SignatureRequestResponseAttachment::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -10698,7 +11399,7 @@ components: TemplateResponseCCRole: properties: name: - description: '_t__TemplateResponseCCRole::TEMPLATES_LEFT' + description: '_t__TemplateResponseCCRole::NAME' type: string type: object x-internal-class: true @@ -10758,7 +11459,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -10897,10 +11597,6 @@ components: required: description: '_t__TemplateResponseDocumentFormField::REQUIRED' type: boolean - group: - description: '_t__TemplateResponseDocumentFormField::GROUP' - type: string - nullable: true type: object discriminator: propertyName: type @@ -10917,17 +11613,21 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: checkbox + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -10937,13 +11637,15 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: date_signed + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -10953,13 +11655,15 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: dropdown + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -10969,8 +11673,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' @@ -10987,6 +11689,10 @@ components: fontFamily: description: '_t__TemplateResponseDocumentFormField::FONT_FAMILY' type: string + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -10996,13 +11702,15 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: initials + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -11013,13 +11721,14 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: radio + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -11029,13 +11738,15 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' type: string default: signature + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: '_t__TemplateResponseDocumentFormField::DESCRIPTION_EXTENDS' @@ -11045,8 +11756,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentFormField::TYPE' @@ -11078,6 +11787,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: '_t__TemplateResponseDocumentFormField::GROUP' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: '_t__TemplateResponseDocumentStaticField::DESCRIPTION' @@ -11137,8 +11850,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11153,8 +11864,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11169,8 +11878,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11185,8 +11892,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11201,8 +11906,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11217,8 +11920,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11233,8 +11934,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11249,8 +11948,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: '_t__TemplateResponseDocumentStaticField::TYPE' @@ -11626,6 +12323,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -11870,6 +12571,10 @@ components: summary: '_t__Error::4XX' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: '_t__FaxGetResponseExample::SUMMARY' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: '_t__FaxLineResponseExample::SUMMARY' value: @@ -11882,6 +12587,10 @@ components: summary: '_t__FaxLineListResponseExample::SUMMARY' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: '_t__FaxListResponseExample::SUMMARY' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: '_t__ReportCreateResponseExample::SUMMARY' value: diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c7189fd24..fe81aca41 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9091,7 +9687,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9100,40 +9696,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10211,6 +10807,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10246,6 +10855,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10388,7 +11010,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10456,6 +11078,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10589,6 +11212,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10606,6 +11277,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11218,24 +11918,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11273,7 +11970,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11377,7 +12078,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11529,10 +12229,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11549,12 +12245,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11570,6 +12266,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11579,8 +12279,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11596,6 +12294,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11605,8 +12307,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11622,6 +12322,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11631,8 +12335,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11659,6 +12361,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11668,8 +12374,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11685,6 +12389,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11695,8 +12403,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11712,6 +12418,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11721,8 +12430,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11738,6 +12445,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11747,8 +12458,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11790,6 +12499,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11849,8 +12562,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11875,8 +12586,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11901,8 +12610,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11927,8 +12634,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11953,8 +12658,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11979,8 +12682,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12005,8 +12706,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12031,8 +12730,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12418,6 +13115,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12662,6 +13363,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12674,6 +13379,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/openapi.yaml b/openapi.yaml index 304a8d67b..e49cd747a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9069,7 +9665,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9078,40 +9674,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10189,6 +10785,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10224,6 +10833,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10366,7 +10988,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10434,6 +11056,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10567,6 +11190,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10584,6 +11255,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11196,24 +11896,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11251,7 +11948,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11355,7 +12056,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11507,10 +12207,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11527,12 +12223,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11548,6 +12244,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11557,8 +12257,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11574,6 +12272,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11583,8 +12285,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11600,6 +12300,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11609,8 +12313,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11637,6 +12339,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11646,8 +12352,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11663,6 +12367,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11673,8 +12381,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11690,6 +12396,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11699,8 +12408,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11716,6 +12423,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11725,8 +12436,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11768,6 +12477,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11827,8 +12540,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11853,8 +12564,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11879,8 +12588,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11905,8 +12612,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11931,8 +12636,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11957,8 +12660,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11983,8 +12684,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12009,8 +12708,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12396,6 +13093,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12640,6 +13341,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12652,6 +13357,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index e3507dbe3..176cb9fa5 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -141,6 +141,11 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**BulkSendJobList**](docs/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**EmbeddedEditUrl**](docs/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**EmbeddedSignUrl**](docs/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxApi* | [**FaxDelete**](docs/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax +*FaxApi* | [**FaxFiles**](docs/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files +*FaxApi* | [**FaxGet**](docs/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax +*FaxApi* | [**FaxList**](docs/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes +*FaxApi* | [**FaxSend**](docs/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax *FaxLineApi* | [**FaxLineAddUser**](docs/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User *FaxLineApi* | [**FaxLineAreaCodeGet**](docs/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes *FaxLineApi* | [**FaxLineCreate**](docs/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line @@ -178,7 +183,7 @@ Class | Method | HTTP request | Description *TeamApi* | [**TeamSubTeams**](docs/TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams *TeamApi* | [**TeamUpdate**](docs/TeamApi.md#teamupdate) | **PUT** /team | Update Team *TemplateApi* | [**TemplateAddUser**](docs/TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**TemplateCreate**](docs/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template +*TemplateApi* | [**TemplateCreate**](docs/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template *TemplateApi* | [**TemplateCreateEmbeddedDraft**](docs/TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft *TemplateApi* | [**TemplateDelete**](docs/TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template *TemplateApi* | [**TemplateFiles**](docs/TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files @@ -231,6 +236,7 @@ Class | Method | HTTP request | Description - [Model.EventCallbackRequest](docs/EventCallbackRequest.md) - [Model.EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Model.EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Model.FaxGetResponse](docs/FaxGetResponse.md) - [Model.FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [Model.FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [Model.FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -242,6 +248,10 @@ Class | Method | HTTP request | Description - [Model.FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [Model.FaxLineResponse](docs/FaxLineResponse.md) - [Model.FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [Model.FaxListResponse](docs/FaxListResponse.md) + - [Model.FaxResponse](docs/FaxResponse.md) + - [Model.FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [Model.FaxSendRequest](docs/FaxSendRequest.md) - [Model.FileResponse](docs/FileResponse.md) - [Model.FileResponseDataUri](docs/FileResponseDataUri.md) - [Model.ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/dotnet/docs/AccountResponseQuotas.md b/sdks/dotnet/docs/AccountResponseQuotas.md index 2e12ea8cb..8fc9dcf9b 100644 --- a/sdks/dotnet/docs/AccountResponseQuotas.md +++ b/sdks/dotnet/docs/AccountResponseQuotas.md @@ -5,7 +5,7 @@ Details concerning remaining monthly quotas. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] **DocumentsLeft** | **int?** | Signature requests remaining. | [optional] **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] **NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] +**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] **DocumentsLeft** | **int?** | Signature requests remaining. | [optional] **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] **NumFaxPagesLeft** | **int?** | Number of fax pages left | [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/FaxApi.md b/sdks/dotnet/docs/FaxApi.md new file mode 100644 index 000000000..303d4eff9 --- /dev/null +++ b/sdks/dotnet/docs/FaxApi.md @@ -0,0 +1,489 @@ +# Dropbox.Sign.Api.FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**FaxDelete**](FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | +| [**FaxFiles**](FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**FaxGet**](FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | +| [**FaxList**](FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | +| [**FaxSend**](FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | + + +# **FaxDelete** +> void FaxDelete (string faxId) + +Delete Fax + +Deletes the specified Fax from the system. + +### Example +```csharp +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); + } + } +} + +``` + +#### Using the FaxDeleteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete Fax + apiInstance.FaxDeleteWithHttpInfo(faxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxDeleteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **FaxFiles** +> System.IO.Stream FaxFiles (string faxId) + +List Fax Files + +Returns list of fax files + +### Example +```csharp +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); + } + } +} + +``` + +#### Using the FaxFilesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Fax Files + ApiResponse response = apiInstance.FaxFilesWithHttpInfo(faxId); + 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 FaxApi.FaxFilesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +**System.IO.Stream** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/pdf, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **FaxGet** +> FaxGetResponse FaxGet (string faxId) + +Get Fax + +Returns information about fax + +### Example +```csharp +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); + } + } +} + +``` + +#### Using the FaxGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Fax + ApiResponse response = apiInstance.FaxGetWithHttpInfo(faxId); + 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 FaxApi.FaxGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **FaxList** +> FaxListResponse FaxList (int? page = null, int? pageSize = null) + +Lists Faxes + +Returns properties of multiple faxes + +### Example +```csharp +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); + } + } +} + +``` + +#### Using the FaxListWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Lists Faxes + ApiResponse response = apiInstance.FaxListWithHttpInfo(page, pageSize); + 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 FaxApi.FaxListWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Page | [optional] [default to 1] | +| **pageSize** | **int?** | Page size | [optional] [default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **FaxSend** +> FaxGetResponse FaxSend (FaxSendRequest faxSendRequest) + +Send Fax + +Action to prepare and send a fax + +### Example +```csharp +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); + } + } +} + +``` + +#### Using the FaxSendWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send Fax + ApiResponse response = apiInstance.FaxSendWithHttpInfo(faxSendRequest); + 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 FaxApi.FaxSendWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + diff --git a/sdks/dotnet/docs/FaxGetResponse.md b/sdks/dotnet/docs/FaxGetResponse.md new file mode 100644 index 000000000..42b82e12c --- /dev/null +++ b/sdks/dotnet/docs/FaxGetResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | [**FaxResponse**](FaxResponse.md) | | **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [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/FaxListResponse.md b/sdks/dotnet/docs/FaxListResponse.md new file mode 100644 index 000000000..1cea1149f --- /dev/null +++ b/sdks/dotnet/docs/FaxListResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Faxes** | [**List<FaxResponse>**](FaxResponse.md) | | **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | + +[[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/FaxResponse.md b/sdks/dotnet/docs/FaxResponse.md new file mode 100644 index 000000000..27a06144d --- /dev/null +++ b/sdks/dotnet/docs/FaxResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FaxId** | **string** | Fax ID | **Title** | **string** | Fax Title | **OriginalTitle** | **string** | Fax Original Title | **Subject** | **string** | Fax Subject | **Message** | **string** | Fax Message | **Metadata** | **Dictionary<string, Object>** | Fax Metadata | **CreatedAt** | **int** | Fax Created At Timestamp | **Sender** | **string** | Fax Sender Email | **Transmissions** | [**List<FaxResponseTransmission>**](FaxResponseTransmission.md) | Fax Transmissions List | **FilesUrl** | **string** | Fax Files URL | + +[[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/FaxResponseTransmission.md b/sdks/dotnet/docs/FaxResponseTransmission.md new file mode 100644 index 000000000..c306b85d4 --- /dev/null +++ b/sdks/dotnet/docs/FaxResponseTransmission.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxResponseTransmission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipient** | **string** | Fax Transmission Recipient | **Sender** | **string** | Fax Transmission Sender | **StatusCode** | **string** | Fax Transmission Status Code | **SentAt** | **int** | Fax Transmission Sent Timestamp | [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 new file mode 100644 index 000000000..b02d7f0b8 --- /dev/null +++ b/sdks/dotnet/docs/FaxSendRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxSendRequest + +## Properties + +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] + +[[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 5af912344..c80ee2758 100644 --- a/sdks/dotnet/docs/OAuthApi.md +++ b/sdks/dotnet/docs/OAuthApi.md @@ -99,6 +99,7 @@ No authorization required | 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) @@ -191,6 +192,7 @@ No authorization required | 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) diff --git a/sdks/dotnet/docs/OAuthTokenRefreshRequest.md b/sdks/dotnet/docs/OAuthTokenRefreshRequest.md index c9866d3bf..5e33e77d9 100644 --- a/sdks/dotnet/docs/OAuthTokenRefreshRequest.md +++ b/sdks/dotnet/docs/OAuthTokenRefreshRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"]**RefreshToken** | **string** | The token provided when you got the expired access token. | +**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"]**RefreshToken** | **string** | The token provided when you got the expired access token. | **ClientId** | **string** | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | [optional] **ClientSecret** | **string** | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | [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/SignatureRequestApi.md b/sdks/dotnet/docs/SignatureRequestApi.md index c411d0c01..a507cc08f 100644 --- a/sdks/dotnet/docs/SignatureRequestApi.md +++ b/sdks/dotnet/docs/SignatureRequestApi.md @@ -312,7 +312,7 @@ catch (ApiException e) 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]`. +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 diff --git a/sdks/dotnet/docs/SubWhiteLabelingOptions.md b/sdks/dotnet/docs/SubWhiteLabelingOptions.md index 930a345f5..1634a1afb 100644 --- a/sdks/dotnet/docs/SubWhiteLabelingOptions.md +++ b/sdks/dotnet/docs/SubWhiteLabelingOptions.md @@ -5,7 +5,7 @@ An array of elements and values serialized to a string, to be used to customize Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HeaderBackgroundColor** | **string** | | [optional] [default to "#1A1A1A"]**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1]**LinkColor** | **string** | | [optional] [default to "#00B3E6"]**PageBackgroundColor** | **string** | | [optional] [default to "#F7F8F9"]**PrimaryButtonColor** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonColorHover** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonTextColor** | **string** | | [optional] [default to "#FFFFFF"]**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColor** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonTextColor** | **string** | | [optional] [default to "#00B3E6"]**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#00B3E6"]**TextColor1** | **string** | | [optional] [default to "#808080"]**TextColor2** | **string** | | [optional] [default to "#FFFFFF"]**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [optional] +**HeaderBackgroundColor** | **string** | | [optional] [default to "#1a1a1a"]**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1]**LinkColor** | **string** | | [optional] [default to "#0061FE"]**PageBackgroundColor** | **string** | | [optional] [default to "#f7f8f9"]**PrimaryButtonColor** | **string** | | [optional] [default to "#0061FE"]**PrimaryButtonColorHover** | **string** | | [optional] [default to "#0061FE"]**PrimaryButtonTextColor** | **string** | | [optional] [default to "#ffffff"]**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonColor** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonColorHover** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonTextColor** | **string** | | [optional] [default to "#0061FE"]**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#0061FE"]**TextColor1** | **string** | | [optional] [default to "#808080"]**TextColor2** | **string** | | [optional] [default to "#ffffff"]**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [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/TemplateApi.md b/sdks/dotnet/docs/TemplateApi.md index d7f4c3bda..c51decd9d 100644 --- a/sdks/dotnet/docs/TemplateApi.md +++ b/sdks/dotnet/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | |--------|--------------|-------------| | [**TemplateAddUser**](TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template | -| [**TemplateCreate**](TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | +| [**TemplateCreate**](TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | | [**TemplateCreateEmbeddedDraft**](TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | [**TemplateDelete**](TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template | | [**TemplateFiles**](TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -120,7 +120,7 @@ catch (ApiException e) # **TemplateCreate** > TemplateCreateResponse TemplateCreate (TemplateCreateRequest templateCreateRequest) -Create Template +Create Template Creates a template that can then be used. @@ -214,7 +214,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - // Create Template + // Create Template ApiResponse response = apiInstance.TemplateCreateWithHttpInfo(templateCreateRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); diff --git a/sdks/dotnet/docs/TemplateResponse.md b/sdks/dotnet/docs/TemplateResponse.md index ce17e3777..ded2dee38 100644 --- a/sdks/dotnet/docs/TemplateResponse.md +++ b/sdks/dotnet/docs/TemplateResponse.md @@ -5,7 +5,7 @@ Contains information about the templates you and your team have created. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateId** | **string** | The id of the Template. | [optional] **Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **UpdatedAt** | **int** | Time the template was last updated. | [optional] **IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. | [optional] **IsCreator** | **bool?** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] **CanEdit** | **bool?** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] **IsLocked** | **bool?** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] **Metadata** | **Object** | The metadata attached to the template. | [optional] **SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] **Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] +**TemplateId** | **string** | The id of the Template. | [optional] **Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **UpdatedAt** | **int** | Time the template was last updated. | [optional] **IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | [optional] **IsCreator** | **bool** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] **CanEdit** | **bool** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] **IsLocked** | **bool** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] **Metadata** | **Object** | The metadata attached to the template. | [optional] **SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] **Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [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/TemplateResponseDocumentFormFieldBase.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md index 0e941c7ec..191f73cd2 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldBase.md @@ -5,7 +5,7 @@ An array of Form Field objects containing the name and type of each named field. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | **ApiId** | **string** | A unique id for the form field. | [optional] **Name** | **string** | The name of the form field. | [optional] **Signer** | **string** | The signer of the Form Field. | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] +**Type** | **string** | | **ApiId** | **string** | A unique id for the form field. | [optional] **Name** | **string** | The name of the form field. | [optional] **Signer** | **string** | The signer of the Form Field. | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [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/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldCheckbox.md index 45636fa5a..4a94b377c 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "checkbox"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "checkbox"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDateSigned.md index 6bf5b02b3..7356475f5 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "date_signed"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "date_signed"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldDropdown.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDropdown.md index fa94587f3..62b9123c6 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "dropdown"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "dropdown"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md index c5dc34e1f..51222f57a 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "hyperlink"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "hyperlink"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldInitials.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldInitials.md index ada79ecb1..d519b4978 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldInitials.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "initials"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "initials"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldRadio.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldRadio.md index abc332ce9..52f877294 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldRadio.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "radio"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "radio"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [[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/TemplateResponseDocumentFormFieldSignature.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldSignature.md index 429769c02..f173e61f1 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldSignature.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "signature"] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "signature"]**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/TemplateResponseDocumentFormFieldText.md b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md index 9bcc4780e..368fec852 100644 --- a/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **ValidationType** | **string** | 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. | [optional] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **ValidationType** | **string** | 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. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [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/run-build b/sdks/dotnet/run-build index 808568a19..8a2332ad6 100755 --- a/sdks/dotnet/run-build +++ b/sdks/dotnet/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/dotnet" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/Dropbox.Sign/Api/"*.cs +rm -f "${DIR}/src/Dropbox.Sign/Model/"*.cs + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs new file mode 100644 index 000000000..b9819df28 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs @@ -0,0 +1,1206 @@ +/* + * 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.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.Sign.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// + void FaxDelete(string faxId, int operationIndex = 0); + + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse FaxDeleteWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// System.IO.Stream + System.IO.Stream FaxFiles(string faxId, int operationIndex = 0); + + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of System.IO.Stream + ApiResponse FaxFilesWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// FaxGetResponse + FaxGetResponse FaxGet(string faxId, int operationIndex = 0); + + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + ApiResponse FaxGetWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// 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) + /// Index associated with the operation. + /// FaxListResponse + FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); + + /// + /// 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) + /// Index associated with the operation. + /// ApiResponse of FaxListResponse + ApiResponse FaxListWithHttpInfo(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxGetResponse + FaxGetResponse FaxSend(FaxSendRequest faxSendRequest, int operationIndex = 0); + + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + ApiResponse FaxSendWithHttpInfo(FaxSendRequest faxSendRequest, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task FaxDeleteAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// 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 + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + System.Threading.Tasks.Task FaxFilesAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + System.Threading.Tasks.Task> FaxFilesWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + System.Threading.Tasks.Task FaxGetAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + System.Threading.Tasks.Task> FaxGetWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// 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) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxListResponse + System.Threading.Tasks.Task FaxListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// 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) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxListResponse) + System.Threading.Tasks.Task> FaxListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + System.Threading.Tasks.Task FaxSendAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + System.Threading.Tasks.Task> FaxSendWithHttpInfoAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApi : IFaxApiSync, IFaxApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FaxApi : IFaxApi + { + private Dropbox.Sign.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxApi(string basePath) + { + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + new Dropbox.Sign.Client.Configuration { BasePath = basePath } + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FaxApi(Dropbox.Sign.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FaxApi(Dropbox.Sign.Client.ISynchronousClient client, Dropbox.Sign.Client.IAsynchronousClient asyncClient, Dropbox.Sign.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Dropbox.Sign.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Dropbox.Sign.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Dropbox.Sign.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// + public void FaxDelete(string faxId, int operationIndex = 0) + { + FaxDeleteWithHttpInfo(faxId); + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Dropbox.Sign.Client.ApiResponse FaxDeleteWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxDelete"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxDelete"; + 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)); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/fax/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task FaxDeleteAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + await FaxDeleteWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> FaxDeleteWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxDelete"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxDelete"; + 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)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fax/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// System.IO.Stream + public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxFilesWithHttpInfo(faxId); + return localVarResponse.Data; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of System.IO.Stream + public Dropbox.Sign.Client.ApiResponse FaxFilesWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxFiles"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/pdf", + "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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxFiles"; + 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)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/files/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxFiles", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + public async System.Threading.Tasks.Task FaxFilesAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxFilesWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + public async System.Threading.Tasks.Task> FaxFilesWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxFiles"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/pdf", + "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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxFiles"; + 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)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/files/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxFiles", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// FaxGetResponse + public FaxGetResponse FaxGet(string faxId, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxGetWithHttpInfo(faxId); + return localVarResponse.Data; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxGet"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxGet"; + 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)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + public async System.Threading.Tasks.Task FaxGetAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxGetWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + public async System.Threading.Tasks.Task> FaxGetWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxGet"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxGet"; + 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)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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) + /// Index associated with the operation. + /// FaxListResponse + public FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxListWithHttpInfo(page, pageSize); + return localVarResponse.Data; + } + + /// + /// 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) + /// 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) + { + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + localVarRequestOptions.Operation = "FaxApi.FaxList"; + 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)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/list", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxListResponse + public async System.Threading.Tasks.Task FaxListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxListWithHttpInfoAsync(page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxListResponse) + public async System.Threading.Tasks.Task> FaxListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // 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); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + localVarRequestOptions.Operation = "FaxApi.FaxList"; + 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)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/list", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxGetResponse + public FaxGetResponse FaxSend(FaxSendRequest faxSendRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxSendWithHttpInfo(faxSendRequest); + return localVarResponse.Data; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + public Dropbox.Sign.Client.ApiResponse FaxSendWithHttpInfo(FaxSendRequest faxSendRequest, int operationIndex = 0) + { + // verify the required parameter 'faxSendRequest' is set + if (faxSendRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxSendRequest' when calling FaxApi->FaxSend"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxSendRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxSendRequest; + } + + // 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.Operation = "FaxApi.FaxSend"; + 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)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/fax/send", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxSend", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + public async System.Threading.Tasks.Task FaxSendAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxSendWithHttpInfoAsync(faxSendRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + public async System.Threading.Tasks.Task> FaxSendWithHttpInfoAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxSendRequest' is set + if (faxSendRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxSendRequest' when calling FaxApi->FaxSend"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxSendRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxSendRequest; + } + + // 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.Operation = "FaxApi.FaxSend"; + 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)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/fax/send", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxSend", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs index 0669f9132..7671b5780 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs @@ -77,7 +77,7 @@ public interface ISignatureRequestApiSync : IApiAccessor /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -89,7 +89,7 @@ public interface ISignatureRequestApiSync : IApiAccessor /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -472,7 +472,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -485,7 +485,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1309,7 +1309,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest } /// - /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1321,7 +1321,7 @@ public void SignatureRequestCancel(string signatureRequestId, int operationIndex } /// - /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1390,7 +1390,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } /// - /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1403,7 +1403,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } /// - /// 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]`. + /// 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]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs index 01bb32262..f98f0671c 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs @@ -53,7 +53,7 @@ public interface ITemplateApiSync : IApiAccessor /// ApiResponse of TemplateGetResponse ApiResponse TemplateAddUserWithHttpInfo(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -65,7 +65,7 @@ public interface ITemplateApiSync : IApiAccessor TemplateCreateResponse TemplateCreate(TemplateCreateRequest templateCreateRequest, int operationIndex = 0); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -333,7 +333,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Task of ApiResponse (TemplateGetResponse) System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -346,7 +346,7 @@ public interface ITemplateApiAsync : IApiAccessor System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -919,7 +919,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// @@ -932,7 +932,7 @@ 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. /// /// Thrown when fails to make API call /// @@ -1009,7 +1009,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// @@ -1023,7 +1023,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs index f72e2721f..b97d73c8e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountResponseQuotas.cs @@ -45,7 +45,7 @@ protected AccountResponseQuotas() { } /// Signature requests remaining.. /// Total API templates allowed.. /// API templates remaining.. - /// SMS verifications remaining.. + /// SMS verifications remaining.. /// Number of fax pages left. public AccountResponseQuotas(int? apiSignatureRequestsLeft = default(int?), int? documentsLeft = default(int?), int? templatesTotal = default(int?), int? templatesLeft = default(int?), int? smsVerificationsLeft = default(int?), int? numFaxPagesLeft = default(int?)) { @@ -103,9 +103,9 @@ public static AccountResponseQuotas Init(string jsonData) public int? TemplatesLeft { get; set; } /// - /// SMS verifications remaining. + /// SMS verifications remaining. /// - /// SMS verifications remaining. + /// SMS verifications remaining. [DataMember(Name = "sms_verifications_left", EmitDefaultValue = true)] public int? SmsVerificationsLeft { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxGetResponse.cs new file mode 100644 index 000000000..59214ef6e --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxGetResponse.cs @@ -0,0 +1,197 @@ +/* + * 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 +{ + /// + /// FaxGetResponse + /// + [DataContract(Name = "FaxGetResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxGetResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxGetResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// fax (required). + /// A list of warnings.. + public FaxGetResponse(FaxResponse fax = default(FaxResponse), List warnings = default(List)) + { + + // to ensure "fax" is required (not null) + if (fax == null) + { + throw new ArgumentNullException("fax is a required property for FaxGetResponse and cannot be null"); + } + this.Fax = fax; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxGetResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxGetResponse"); + } + + return obj; + } + + /// + /// Gets or Sets Fax + /// + [DataMember(Name = "fax", IsRequired = true, EmitDefaultValue = true)] + public FaxResponse Fax { get; set; } + + /// + /// A list of warnings. + /// + /// A list of warnings. + [DataMember(Name = "warnings", EmitDefaultValue = true)] + public List Warnings { 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 FaxGetResponse {\n"); + sb.Append(" Fax: ").Append(Fax).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).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 FaxGetResponse); + } + + /// + /// Returns true if FaxGetResponse instances are equal + /// + /// Instance of FaxGetResponse to be compared + /// Boolean + public bool Equals(FaxGetResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Fax == input.Fax || + (this.Fax != null && + this.Fax.Equals(input.Fax)) + ) && + ( + this.Warnings == input.Warnings || + this.Warnings != null && + input.Warnings != null && + this.Warnings.SequenceEqual(input.Warnings) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Fax != null) + { + hashCode = (hashCode * 59) + this.Fax.GetHashCode(); + } + if (this.Warnings != null) + { + hashCode = (hashCode * 59) + this.Warnings.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "fax", + Property = "Fax", + Type = "FaxResponse", + Value = Fax, + }); + types.Add(new OpenApiType() + { + Name = "warnings", + Property = "Warnings", + Type = "List", + Value = Warnings, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs deleted file mode 100644 index bea924860..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* - * 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 -{ - /// - /// FaxLine - /// - [DataContract(Name = "FaxLine")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLine : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FaxLine() { } - /// - /// Initializes a new instance of the class. - /// - /// Number. - /// Created at. - /// Updated at. - /// accounts. - public FaxLine(string number = default(string), string createdAt = default(string), string updatedAt = default(string), List accounts = default(List)) - { - - this.Number = number; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.Accounts = accounts; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static FaxLine Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of FaxLine"); - } - - return obj; - } - - /// - /// Number - /// - /// Number - [DataMember(Name = "number", EmitDefaultValue = true)] - public string Number { get; set; } - - /// - /// Created at - /// - /// Created at - [DataMember(Name = "created_at", EmitDefaultValue = true)] - public string CreatedAt { get; set; } - - /// - /// Updated at - /// - /// Updated at - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public string UpdatedAt { get; set; } - - /// - /// Gets or Sets Accounts - /// - [DataMember(Name = "accounts", EmitDefaultValue = true)] - public List Accounts { 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 FaxLine {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" Accounts: ").Append(Accounts).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 FaxLine); - } - - /// - /// Returns true if FaxLine instances are equal - /// - /// Instance of FaxLine to be compared - /// Boolean - public bool Equals(FaxLine input) - { - if (input == null) - { - return false; - } - return - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Accounts == input.Accounts || - this.Accounts != null && - input.Accounts != null && - this.Accounts.SequenceEqual(input.Accounts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Accounts != null) - { - hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "number", - Property = "Number", - Type = "string", - Value = Number, - }); - types.Add(new OpenApiType() - { - Name = "created_at", - Property = "CreatedAt", - Type = "string", - Value = CreatedAt, - }); - types.Add(new OpenApiType() - { - Name = "updated_at", - Property = "UpdatedAt", - Type = "string", - Value = UpdatedAt, - }); - types.Add(new OpenApiType() - { - Name = "accounts", - Property = "Accounts", - Type = "List", - Value = Accounts, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxListResponse.cs new file mode 100644 index 000000000..d5c62990a --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxListResponse.cs @@ -0,0 +1,201 @@ +/* + * 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 +{ + /// + /// FaxListResponse + /// + [DataContract(Name = "FaxListResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxListResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxListResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// faxes (required). + /// listInfo (required). + public FaxListResponse(List faxes = default(List), ListInfoResponse listInfo = default(ListInfoResponse)) + { + + // to ensure "faxes" is required (not null) + if (faxes == null) + { + throw new ArgumentNullException("faxes is a required property for FaxListResponse and cannot be null"); + } + this.Faxes = faxes; + // to ensure "listInfo" is required (not null) + if (listInfo == null) + { + throw new ArgumentNullException("listInfo is a required property for FaxListResponse and cannot be null"); + } + this.ListInfo = listInfo; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxListResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxListResponse"); + } + + return obj; + } + + /// + /// Gets or Sets Faxes + /// + [DataMember(Name = "faxes", IsRequired = true, EmitDefaultValue = true)] + public List Faxes { get; set; } + + /// + /// Gets or Sets ListInfo + /// + [DataMember(Name = "list_info", IsRequired = true, EmitDefaultValue = true)] + public ListInfoResponse ListInfo { 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 FaxListResponse {\n"); + sb.Append(" Faxes: ").Append(Faxes).Append("\n"); + sb.Append(" ListInfo: ").Append(ListInfo).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 FaxListResponse); + } + + /// + /// Returns true if FaxListResponse instances are equal + /// + /// Instance of FaxListResponse to be compared + /// Boolean + public bool Equals(FaxListResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Faxes == input.Faxes || + this.Faxes != null && + input.Faxes != null && + this.Faxes.SequenceEqual(input.Faxes) + ) && + ( + this.ListInfo == input.ListInfo || + (this.ListInfo != null && + this.ListInfo.Equals(input.ListInfo)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Faxes != null) + { + hashCode = (hashCode * 59) + this.Faxes.GetHashCode(); + } + if (this.ListInfo != null) + { + hashCode = (hashCode * 59) + this.ListInfo.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "faxes", + Property = "Faxes", + Type = "List", + Value = Faxes, + }); + types.Add(new OpenApiType() + { + Name = "list_info", + Property = "ListInfo", + Type = "ListInfoResponse", + Value = ListInfo, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponse.cs new file mode 100644 index 000000000..60125d8e1 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponse.cs @@ -0,0 +1,443 @@ +/* + * 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 +{ + /// + /// FaxResponse + /// + [DataContract(Name = "FaxResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax ID (required). + /// Fax Title (required). + /// Fax Original Title (required). + /// Fax Subject (required). + /// Fax Message (required). + /// Fax Metadata (required). + /// Fax Created At Timestamp (required). + /// Fax Sender Email (required). + /// Fax Transmissions List (required). + /// Fax Files URL (required). + public FaxResponse(string faxId = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Dictionary metadata = default(Dictionary), int createdAt = default(int), string sender = default(string), List transmissions = default(List), string filesUrl = default(string)) + { + + // to ensure "faxId" is required (not null) + if (faxId == null) + { + throw new ArgumentNullException("faxId is a required property for FaxResponse and cannot be null"); + } + this.FaxId = faxId; + // to ensure "title" is required (not null) + if (title == null) + { + throw new ArgumentNullException("title is a required property for FaxResponse and cannot be null"); + } + this.Title = title; + // to ensure "originalTitle" is required (not null) + if (originalTitle == null) + { + throw new ArgumentNullException("originalTitle is a required property for FaxResponse and cannot be null"); + } + this.OriginalTitle = originalTitle; + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new ArgumentNullException("subject is a required property for FaxResponse and cannot be null"); + } + this.Subject = subject; + // to ensure "message" is required (not null) + if (message == null) + { + throw new ArgumentNullException("message is a required property for FaxResponse and cannot be null"); + } + this.Message = message; + // to ensure "metadata" is required (not null) + if (metadata == null) + { + throw new ArgumentNullException("metadata is a required property for FaxResponse and cannot be null"); + } + this.Metadata = metadata; + this.CreatedAt = createdAt; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for FaxResponse and cannot be null"); + } + this.Sender = sender; + // to ensure "transmissions" is required (not null) + if (transmissions == null) + { + throw new ArgumentNullException("transmissions is a required property for FaxResponse and cannot be null"); + } + this.Transmissions = transmissions; + // to ensure "filesUrl" is required (not null) + if (filesUrl == null) + { + throw new ArgumentNullException("filesUrl is a required property for FaxResponse and cannot be null"); + } + this.FilesUrl = filesUrl; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxResponse"); + } + + return obj; + } + + /// + /// Fax ID + /// + /// Fax ID + [DataMember(Name = "fax_id", IsRequired = true, EmitDefaultValue = true)] + public string FaxId { get; set; } + + /// + /// Fax Title + /// + /// Fax Title + [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Fax Original Title + /// + /// Fax Original Title + [DataMember(Name = "original_title", IsRequired = true, EmitDefaultValue = true)] + public string OriginalTitle { get; set; } + + /// + /// Fax Subject + /// + /// Fax Subject + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Fax Message + /// + /// Fax Message + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Fax Metadata + /// + /// Fax Metadata + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Fax Created At Timestamp + /// + /// Fax Created At Timestamp + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + public int CreatedAt { get; set; } + + /// + /// Fax Sender Email + /// + /// Fax Sender Email + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax Transmissions List + /// + /// Fax Transmissions List + [DataMember(Name = "transmissions", IsRequired = true, EmitDefaultValue = true)] + public List Transmissions { get; set; } + + /// + /// Fax Files URL + /// + /// Fax Files URL + [DataMember(Name = "files_url", IsRequired = true, EmitDefaultValue = true)] + public string FilesUrl { 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 FaxResponse {\n"); + sb.Append(" FaxId: ").Append(FaxId).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" OriginalTitle: ").Append(OriginalTitle).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Transmissions: ").Append(Transmissions).Append("\n"); + sb.Append(" FilesUrl: ").Append(FilesUrl).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 FaxResponse); + } + + /// + /// Returns true if FaxResponse instances are equal + /// + /// Instance of FaxResponse to be compared + /// Boolean + public bool Equals(FaxResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.FaxId == input.FaxId || + (this.FaxId != null && + this.FaxId.Equals(input.FaxId)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.OriginalTitle == input.OriginalTitle || + (this.OriginalTitle != null && + this.OriginalTitle.Equals(input.OriginalTitle)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + 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.CreatedAt == input.CreatedAt || + this.CreatedAt.Equals(input.CreatedAt) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Transmissions == input.Transmissions || + this.Transmissions != null && + input.Transmissions != null && + this.Transmissions.SequenceEqual(input.Transmissions) + ) && + ( + this.FilesUrl == input.FilesUrl || + (this.FilesUrl != null && + this.FilesUrl.Equals(input.FilesUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FaxId != null) + { + hashCode = (hashCode * 59) + this.FaxId.GetHashCode(); + } + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + if (this.OriginalTitle != null) + { + hashCode = (hashCode * 59) + this.OriginalTitle.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.Transmissions != null) + { + hashCode = (hashCode * 59) + this.Transmissions.GetHashCode(); + } + if (this.FilesUrl != null) + { + hashCode = (hashCode * 59) + this.FilesUrl.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "fax_id", + Property = "FaxId", + Type = "string", + Value = FaxId, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + types.Add(new OpenApiType() + { + Name = "original_title", + Property = "OriginalTitle", + Type = "string", + Value = OriginalTitle, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + 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 = "created_at", + Property = "CreatedAt", + Type = "int", + Value = CreatedAt, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + types.Add(new OpenApiType() + { + Name = "transmissions", + Property = "Transmissions", + Type = "List", + Value = Transmissions, + }); + types.Add(new OpenApiType() + { + Name = "files_url", + Property = "FilesUrl", + Type = "string", + Value = FilesUrl, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponseTransmission.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponseTransmission.cs new file mode 100644 index 000000000..0e370714e --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxResponseTransmission.cs @@ -0,0 +1,302 @@ +/* + * 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 +{ + /// + /// FaxResponseTransmission + /// + [DataContract(Name = "FaxResponseTransmission")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxResponseTransmission : IEquatable, IValidatableObject + { + /// + /// Fax Transmission Status Code + /// + /// Fax Transmission Status Code + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusCodeEnum + { + /// + /// Enum Success for value: success + /// + [EnumMember(Value = "success")] + Success = 1, + + /// + /// Enum Transmitting for value: transmitting + /// + [EnumMember(Value = "transmitting")] + Transmitting = 2, + + /// + /// Enum ErrorCouldNotFax for value: error_could_not_fax + /// + [EnumMember(Value = "error_could_not_fax")] + ErrorCouldNotFax = 3, + + /// + /// Enum ErrorUnknown for value: error_unknown + /// + [EnumMember(Value = "error_unknown")] + ErrorUnknown = 4, + + /// + /// Enum ErrorBusy for value: error_busy + /// + [EnumMember(Value = "error_busy")] + ErrorBusy = 5, + + /// + /// Enum ErrorNoAnswer for value: error_no_answer + /// + [EnumMember(Value = "error_no_answer")] + ErrorNoAnswer = 6, + + /// + /// Enum ErrorDisconnected for value: error_disconnected + /// + [EnumMember(Value = "error_disconnected")] + ErrorDisconnected = 7, + + /// + /// Enum ErrorBadDestination for value: error_bad_destination + /// + [EnumMember(Value = "error_bad_destination")] + ErrorBadDestination = 8 + } + + + /// + /// Fax Transmission Status Code + /// + /// Fax Transmission Status Code + [DataMember(Name = "status_code", IsRequired = true, EmitDefaultValue = true)] + public StatusCodeEnum StatusCode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxResponseTransmission() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax Transmission Recipient (required). + /// Fax Transmission Sender (required). + /// Fax Transmission Status Code (required). + /// Fax Transmission Sent Timestamp. + public FaxResponseTransmission(string recipient = default(string), string sender = default(string), StatusCodeEnum statusCode = default(StatusCodeEnum), int sentAt = default(int)) + { + + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for FaxResponseTransmission and cannot be null"); + } + this.Recipient = recipient; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for FaxResponseTransmission and cannot be null"); + } + this.Sender = sender; + this.StatusCode = statusCode; + this.SentAt = sentAt; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxResponseTransmission Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxResponseTransmission"); + } + + return obj; + } + + /// + /// Fax Transmission Recipient + /// + /// Fax Transmission Recipient + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Fax Transmission Sender + /// + /// Fax Transmission Sender + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax Transmission Sent Timestamp + /// + /// Fax Transmission Sent Timestamp + [DataMember(Name = "sent_at", EmitDefaultValue = true)] + public int SentAt { 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 FaxResponseTransmission {\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" SentAt: ").Append(SentAt).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 FaxResponseTransmission); + } + + /// + /// Returns true if FaxResponseTransmission instances are equal + /// + /// Instance of FaxResponseTransmission to be compared + /// Boolean + public bool Equals(FaxResponseTransmission input) + { + if (input == null) + { + return false; + } + return + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.StatusCode == input.StatusCode || + this.StatusCode.Equals(input.StatusCode) + ) && + ( + this.SentAt == input.SentAt || + this.SentAt.Equals(input.SentAt) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); + hashCode = (hashCode * 59) + this.SentAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "recipient", + Property = "Recipient", + Type = "string", + Value = Recipient, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + types.Add(new OpenApiType() + { + Name = "status_code", + Property = "StatusCode", + Type = "string", + Value = StatusCode, + }); + types.Add(new OpenApiType() + { + Name = "sent_at", + Property = "SentAt", + Type = "int", + Value = SentAt, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs new file mode 100644 index 000000000..e4d42e6d4 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs @@ -0,0 +1,383 @@ +/* + * 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 +{ + /// + /// FaxSendRequest + /// + [DataContract(Name = "FaxSendRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxSendRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxSendRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax Send To Recipient (required). + /// Fax Send From Sender (used only with fax number). + /// Fax File to Send. + /// Fax File URL to Send. + /// API Test Mode Setting (default to false). + /// Fax Cover Page for Recipient. + /// Fax Cover Page for Sender. + /// 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)) + { + + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for FaxSendRequest and cannot be null"); + } + this.Recipient = recipient; + this.Sender = sender; + this.Files = files; + this.FileUrls = fileUrls; + this.TestMode = testMode; + this.CoverPageTo = coverPageTo; + this.CoverPageFrom = coverPageFrom; + this.CoverPageMessage = coverPageMessage; + this.Title = title; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxSendRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxSendRequest"); + } + + return obj; + } + + /// + /// Fax Send To Recipient + /// + /// Fax Send To Recipient + /// recipient@example.com + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Fax Send From Sender (used only with fax number) + /// + /// Fax Send From Sender (used only with fax number) + /// sender@example.com + [DataMember(Name = "sender", EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax File to Send + /// + /// Fax File to Send + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Fax File URL to Send + /// + /// Fax File URL to Send + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// API Test Mode Setting + /// + /// API Test Mode Setting + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// Fax Cover Page for Recipient + /// + /// Fax Cover Page for Recipient + /// Recipient Name + [DataMember(Name = "cover_page_to", EmitDefaultValue = true)] + public string CoverPageTo { get; set; } + + /// + /// Fax Cover Page for Sender + /// + /// Fax Cover Page for Sender + /// Sender Name + [DataMember(Name = "cover_page_from", EmitDefaultValue = true)] + public string CoverPageFrom { get; set; } + + /// + /// Fax Cover Page Message + /// + /// Fax Cover Page Message + /// Please find the attached documents. + [DataMember(Name = "cover_page_message", EmitDefaultValue = true)] + public string CoverPageMessage { get; set; } + + /// + /// Fax Title + /// + /// Fax Title + /// Fax Title + [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 FaxSendRequest {\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" CoverPageTo: ").Append(CoverPageTo).Append("\n"); + sb.Append(" CoverPageFrom: ").Append(CoverPageFrom).Append("\n"); + sb.Append(" CoverPageMessage: ").Append(CoverPageMessage).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 FaxSendRequest); + } + + /// + /// Returns true if FaxSendRequest instances are equal + /// + /// Instance of FaxSendRequest to be compared + /// Boolean + public bool Equals(FaxSendRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + 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.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.CoverPageTo == input.CoverPageTo || + (this.CoverPageTo != null && + this.CoverPageTo.Equals(input.CoverPageTo)) + ) && + ( + this.CoverPageFrom == input.CoverPageFrom || + (this.CoverPageFrom != null && + this.CoverPageFrom.Equals(input.CoverPageFrom)) + ) && + ( + this.CoverPageMessage == input.CoverPageMessage || + (this.CoverPageMessage != null && + this.CoverPageMessage.Equals(input.CoverPageMessage)) + ) && + ( + 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.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.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.TestMode.GetHashCode(); + if (this.CoverPageTo != null) + { + hashCode = (hashCode * 59) + this.CoverPageTo.GetHashCode(); + } + if (this.CoverPageFrom != null) + { + hashCode = (hashCode * 59) + this.CoverPageFrom.GetHashCode(); + } + if (this.CoverPageMessage != null) + { + hashCode = (hashCode * 59) + this.CoverPageMessage.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) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "recipient", + Property = "Recipient", + Type = "string", + Value = Recipient, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + 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 = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_to", + Property = "CoverPageTo", + Type = "string", + Value = CoverPageTo, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_from", + Property = "CoverPageFrom", + Type = "string", + Value = CoverPageFrom, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_message", + Property = "CoverPageMessage", + Type = "string", + Value = CoverPageMessage, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs index dbfb22b5f..934de0d88 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs @@ -43,7 +43,9 @@ protected OAuthTokenRefreshRequest() { } /// /// When refreshing an existing token use `refresh_token`. (required) (default to "refresh_token"). /// The token provided when you got the expired access token. (required). - public OAuthTokenRefreshRequest(string grantType = @"refresh_token", string refreshToken = default(string)) + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled.. + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled.. + public OAuthTokenRefreshRequest(string grantType = @"refresh_token", string refreshToken = default(string), string clientId = default(string), string clientSecret = default(string)) { // to ensure "grantType" is required (not null) @@ -58,6 +60,8 @@ protected OAuthTokenRefreshRequest() { } throw new ArgumentNullException("refreshToken is a required property for OAuthTokenRefreshRequest and cannot be null"); } this.RefreshToken = refreshToken; + this.ClientId = clientId; + this.ClientSecret = clientSecret; } /// @@ -90,6 +94,20 @@ public static OAuthTokenRefreshRequest Init(string jsonData) [DataMember(Name = "refresh_token", IsRequired = true, EmitDefaultValue = true)] public string RefreshToken { get; set; } + /// + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + /// + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + [DataMember(Name = "client_id", EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + /// + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + [DataMember(Name = "client_secret", EmitDefaultValue = true)] + public string ClientSecret { get; set; } + /// /// Returns the string presentation of the object /// @@ -100,6 +118,8 @@ public override string ToString() sb.Append("class OAuthTokenRefreshRequest {\n"); sb.Append(" GrantType: ").Append(GrantType).Append("\n"); sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -144,6 +164,16 @@ public bool Equals(OAuthTokenRefreshRequest input) this.RefreshToken == input.RefreshToken || (this.RefreshToken != null && this.RefreshToken.Equals(input.RefreshToken)) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.ClientSecret == input.ClientSecret || + (this.ClientSecret != null && + this.ClientSecret.Equals(input.ClientSecret)) ); } @@ -164,6 +194,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); } + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.ClientSecret != null) + { + hashCode = (hashCode * 59) + this.ClientSecret.GetHashCode(); + } return hashCode; } } @@ -194,6 +232,20 @@ public List GetOpenApiTypes() Type = "string", Value = RefreshToken, }); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "client_secret", + Property = "ClientSecret", + Type = "string", + Value = ClientSecret, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs deleted file mode 100644 index ce078442e..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs +++ /dev/null @@ -1,773 +0,0 @@ -/* - * 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 : IOpenApiTyped, 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; - } - } - - 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; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs deleted file mode 100644 index 6d91c684d..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs +++ /dev/null @@ -1,558 +0,0 @@ -/* - * 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 : IOpenApiTyped, 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; - } - } - - 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; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs deleted file mode 100644 index 02b19c235..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs +++ /dev/null @@ -1,817 +0,0 @@ -/* - * 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 : IOpenApiTyped, 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 [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.<br> **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. (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 isQualifiedSignature = 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.IsQualifiedSignature = isQualifiedSignature; - 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 [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.<br> **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. - /// - /// 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.<br> **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. - [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] - [Obsolete] - public bool IsQualifiedSignature { 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(" IsQualifiedSignature: ").Append(IsQualifiedSignature).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.IsQualifiedSignature == input.IsQualifiedSignature || - this.IsQualifiedSignature.Equals(input.IsQualifiedSignature) - ) && - ( - 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.IsQualifiedSignature.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; - } - } - - 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_qualified_signature", - Property = "IsQualifiedSignature", - Type = "bool", - Value = IsQualifiedSignature, - }); - 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; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs deleted file mode 100644 index 437003358..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs +++ /dev/null @@ -1,602 +0,0 @@ -/* - * 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 : IOpenApiTyped, 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 [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.<br> **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. (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.. - /// 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 isQualifiedSignature = false, 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.IsQualifiedSignature = isQualifiedSignature; - 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 [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.<br> **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. - /// - /// 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.<br> **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. - [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] - [Obsolete] - public bool IsQualifiedSignature { 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(" IsQualifiedSignature: ").Append(IsQualifiedSignature).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.IsQualifiedSignature == input.IsQualifiedSignature || - this.IsQualifiedSignature.Equals(input.IsQualifiedSignature) - ) && - ( - 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.IsQualifiedSignature.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; - } - } - - 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_qualified_signature", - Property = "IsQualifiedSignature", - Type = "bool", - Value = IsQualifiedSignature, - }); - 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; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.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 System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs index a38eaa0d7..72d4ebb30 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs @@ -66,51 +66,51 @@ protected SubWhiteLabelingOptions() { } /// /// Initializes a new instance of the class. /// - /// headerBackgroundColor (default to "#1A1A1A"). + /// headerBackgroundColor (default to "#1a1a1a"). /// legalVersion (default to LegalVersionEnum.Terms1). - /// linkColor (default to "#00B3E6"). - /// pageBackgroundColor (default to "#F7F8F9"). - /// primaryButtonColor (default to "#00B3E6"). - /// primaryButtonColorHover (default to "#00B3E6"). - /// primaryButtonTextColor (default to "#FFFFFF"). - /// primaryButtonTextColorHover (default to "#FFFFFF"). - /// secondaryButtonColor (default to "#FFFFFF"). - /// secondaryButtonColorHover (default to "#FFFFFF"). - /// secondaryButtonTextColor (default to "#00B3E6"). - /// secondaryButtonTextColorHover (default to "#00B3E6"). + /// linkColor (default to "#0061FE"). + /// pageBackgroundColor (default to "#f7f8f9"). + /// primaryButtonColor (default to "#0061FE"). + /// primaryButtonColorHover (default to "#0061FE"). + /// primaryButtonTextColor (default to "#ffffff"). + /// primaryButtonTextColorHover (default to "#ffffff"). + /// secondaryButtonColor (default to "#ffffff"). + /// secondaryButtonColorHover (default to "#ffffff"). + /// secondaryButtonTextColor (default to "#0061FE"). + /// secondaryButtonTextColorHover (default to "#0061FE"). /// textColor1 (default to "#808080"). - /// textColor2 (default to "#FFFFFF"). + /// textColor2 (default to "#ffffff"). /// Resets white labeling options to defaults. Only useful when updating an API App.. - public SubWhiteLabelingOptions(string headerBackgroundColor = @"#1A1A1A", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = @"#00B3E6", string pageBackgroundColor = @"#F7F8F9", string primaryButtonColor = @"#00B3E6", string primaryButtonColorHover = @"#00B3E6", string primaryButtonTextColor = @"#FFFFFF", string primaryButtonTextColorHover = @"#FFFFFF", string secondaryButtonColor = @"#FFFFFF", string secondaryButtonColorHover = @"#FFFFFF", string secondaryButtonTextColor = @"#00B3E6", string secondaryButtonTextColorHover = @"#00B3E6", string textColor1 = @"#808080", string textColor2 = @"#FFFFFF", bool resetToDefault = default(bool)) + public SubWhiteLabelingOptions(string headerBackgroundColor = @"#1a1a1a", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = @"#0061FE", string pageBackgroundColor = @"#f7f8f9", string primaryButtonColor = @"#0061FE", string primaryButtonColorHover = @"#0061FE", string primaryButtonTextColor = @"#ffffff", string primaryButtonTextColorHover = @"#ffffff", string secondaryButtonColor = @"#ffffff", string secondaryButtonColorHover = @"#ffffff", string secondaryButtonTextColor = @"#0061FE", string secondaryButtonTextColorHover = @"#0061FE", string textColor1 = @"#808080", string textColor2 = @"#ffffff", bool resetToDefault = default(bool)) { // use default value if no "headerBackgroundColor" provided - this.HeaderBackgroundColor = headerBackgroundColor ?? "#1A1A1A"; + this.HeaderBackgroundColor = headerBackgroundColor ?? "#1a1a1a"; this.LegalVersion = legalVersion; // use default value if no "linkColor" provided - this.LinkColor = linkColor ?? "#00B3E6"; + this.LinkColor = linkColor ?? "#0061FE"; // use default value if no "pageBackgroundColor" provided - this.PageBackgroundColor = pageBackgroundColor ?? "#F7F8F9"; + this.PageBackgroundColor = pageBackgroundColor ?? "#f7f8f9"; // use default value if no "primaryButtonColor" provided - this.PrimaryButtonColor = primaryButtonColor ?? "#00B3E6"; + this.PrimaryButtonColor = primaryButtonColor ?? "#0061FE"; // use default value if no "primaryButtonColorHover" provided - this.PrimaryButtonColorHover = primaryButtonColorHover ?? "#00B3E6"; + this.PrimaryButtonColorHover = primaryButtonColorHover ?? "#0061FE"; // use default value if no "primaryButtonTextColor" provided - this.PrimaryButtonTextColor = primaryButtonTextColor ?? "#FFFFFF"; + this.PrimaryButtonTextColor = primaryButtonTextColor ?? "#ffffff"; // use default value if no "primaryButtonTextColorHover" provided - this.PrimaryButtonTextColorHover = primaryButtonTextColorHover ?? "#FFFFFF"; + this.PrimaryButtonTextColorHover = primaryButtonTextColorHover ?? "#ffffff"; // use default value if no "secondaryButtonColor" provided - this.SecondaryButtonColor = secondaryButtonColor ?? "#FFFFFF"; + this.SecondaryButtonColor = secondaryButtonColor ?? "#ffffff"; // use default value if no "secondaryButtonColorHover" provided - this.SecondaryButtonColorHover = secondaryButtonColorHover ?? "#FFFFFF"; + this.SecondaryButtonColorHover = secondaryButtonColorHover ?? "#ffffff"; // use default value if no "secondaryButtonTextColor" provided - this.SecondaryButtonTextColor = secondaryButtonTextColor ?? "#00B3E6"; + this.SecondaryButtonTextColor = secondaryButtonTextColor ?? "#0061FE"; // use default value if no "secondaryButtonTextColorHover" provided - this.SecondaryButtonTextColorHover = secondaryButtonTextColorHover ?? "#00B3E6"; + this.SecondaryButtonTextColorHover = secondaryButtonTextColorHover ?? "#0061FE"; // use default value if no "textColor1" provided this.TextColor1 = textColor1 ?? "#808080"; // use default value if no "textColor2" provided - this.TextColor2 = textColor2 ?? "#FFFFFF"; + this.TextColor2 = textColor2 ?? "#ffffff"; this.ResetToDefault = resetToDefault; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs index 6ec3587f8..f0124cc90 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponse.cs @@ -45,7 +45,7 @@ protected TemplateResponse() { } /// The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.. /// The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.. /// Time the template was last updated.. - /// `true` if this template was created using an embedded flow, `false` if it was created on our website.. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.. /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member.. /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).. /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests.. @@ -56,7 +56,8 @@ protected TemplateResponse() { } /// 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. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. /// An array of the Accounts that can use this Template.. - public TemplateResponse(string templateId = default(string), string title = default(string), string message = default(string), int updatedAt = default(int), bool? isEmbedded = default(bool?), bool? isCreator = default(bool?), bool? canEdit = default(bool?), bool? isLocked = default(bool?), Object metadata = default(Object), List signerRoles = default(List), List ccRoles = default(List), List documents = default(List), List customFields = default(List), List namedFormFields = default(List), List accounts = default(List)) + /// Signer attachments.. + public TemplateResponse(string templateId = default(string), string title = default(string), string message = default(string), int updatedAt = default(int), bool? isEmbedded = default(bool?), bool isCreator = default(bool), bool canEdit = default(bool), bool isLocked = default(bool), Object metadata = default(Object), List signerRoles = default(List), List ccRoles = default(List), List documents = default(List), List customFields = default(List), List namedFormFields = default(List), List accounts = default(List), List attachments = default(List)) { this.TemplateId = templateId; @@ -74,6 +75,7 @@ protected TemplateResponse() { } this.CustomFields = customFields; this.NamedFormFields = namedFormFields; this.Accounts = accounts; + this.Attachments = attachments; } /// @@ -121,9 +123,9 @@ public static TemplateResponse Init(string jsonData) public int UpdatedAt { get; set; } /// - /// `true` if this template was created using an embedded flow, `false` if it was created on our website. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. /// - /// `true` if this template was created using an embedded flow, `false` if it was created on our website. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. [DataMember(Name = "is_embedded", EmitDefaultValue = true)] public bool? IsEmbedded { get; set; } @@ -132,21 +134,21 @@ public static TemplateResponse Init(string jsonData) /// /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member. [DataMember(Name = "is_creator", EmitDefaultValue = true)] - public bool? IsCreator { get; set; } + public bool IsCreator { get; set; } /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). [DataMember(Name = "can_edit", EmitDefaultValue = true)] - public bool? CanEdit { get; set; } + public bool CanEdit { get; set; } /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. [DataMember(Name = "is_locked", EmitDefaultValue = true)] - public bool? IsLocked { get; set; } + public bool IsLocked { get; set; } /// /// The metadata attached to the template. @@ -199,6 +201,13 @@ public static TemplateResponse Init(string jsonData) [DataMember(Name = "accounts", EmitDefaultValue = true)] public List Accounts { get; set; } + /// + /// Signer attachments. + /// + /// Signer attachments. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + /// /// Returns the string presentation of the object /// @@ -222,6 +231,7 @@ public override string ToString() sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); sb.Append(" NamedFormFields: ").Append(NamedFormFields).Append("\n"); sb.Append(" Accounts: ").Append(Accounts).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -283,18 +293,15 @@ public bool Equals(TemplateResponse input) ) && ( this.IsCreator == input.IsCreator || - (this.IsCreator != null && - this.IsCreator.Equals(input.IsCreator)) + this.IsCreator.Equals(input.IsCreator) ) && ( this.CanEdit == input.CanEdit || - (this.CanEdit != null && - this.CanEdit.Equals(input.CanEdit)) + this.CanEdit.Equals(input.CanEdit) ) && ( this.IsLocked == input.IsLocked || - (this.IsLocked != null && - this.IsLocked.Equals(input.IsLocked)) + this.IsLocked.Equals(input.IsLocked) ) && ( this.Metadata == input.Metadata || @@ -336,6 +343,12 @@ public bool Equals(TemplateResponse input) this.Accounts != null && input.Accounts != null && this.Accounts.SequenceEqual(input.Accounts) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) ); } @@ -365,18 +378,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.IsEmbedded.GetHashCode(); } - if (this.IsCreator != null) - { - hashCode = (hashCode * 59) + this.IsCreator.GetHashCode(); - } - if (this.CanEdit != null) - { - hashCode = (hashCode * 59) + this.CanEdit.GetHashCode(); - } - if (this.IsLocked != null) - { - hashCode = (hashCode * 59) + this.IsLocked.GetHashCode(); - } + hashCode = (hashCode * 59) + this.IsCreator.GetHashCode(); + hashCode = (hashCode * 59) + this.CanEdit.GetHashCode(); + hashCode = (hashCode * 59) + this.IsLocked.GetHashCode(); if (this.Metadata != null) { hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); @@ -405,6 +409,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } return hashCode; } } @@ -460,21 +468,21 @@ public List GetOpenApiTypes() { Name = "is_creator", Property = "IsCreator", - Type = "bool?", + Type = "bool", Value = IsCreator, }); types.Add(new OpenApiType() { Name = "can_edit", Property = "CanEdit", - Type = "bool?", + Type = "bool", Value = CanEdit, }); types.Add(new OpenApiType() { Name = "is_locked", Property = "IsLocked", - Type = "bool?", + Type = "bool", Value = IsLocked, }); types.Add(new OpenApiType() @@ -526,6 +534,13 @@ public List GetOpenApiTypes() Type = "List", Value = Accounts, }); + types.Add(new OpenApiType() + { + Name = "attachments", + Property = "Attachments", + Type = "List", + Value = Attachments, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs deleted file mode 100644 index 39e50fb91..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs +++ /dev/null @@ -1,475 +0,0 @@ -/* - * 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 -{ - /// - /// TemplateResponseCustomField - /// - [DataContract(Name = "TemplateResponseCustomField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseCustomField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 1, - - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 2 - - } - - - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseCustomField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Custom Field.. - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseCustomField(string name = default(string), TypeEnum? type = default(TypeEnum?), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.Name = name; - this.Type = type; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseCustomField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseCustomField"); - } - - return obj; - } - - /// - /// The name of the Custom Field. - /// - /// The name of the Custom Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { 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 TemplateResponseCustomField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).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 TemplateResponseCustomField); - } - - /// - /// Returns true if TemplateResponseCustomField instances are equal - /// - /// Instance of TemplateResponseCustomField to be compared - /// Boolean - public bool Equals(TemplateResponseCustomField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs deleted file mode 100644 index 958f7595b..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs +++ /dev/null @@ -1,554 +0,0 @@ -/* - * 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 -{ - /// - /// TemplateResponseDocumentCustomField - /// - [DataContract(Name = "TemplateResponseDocumentCustomField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentCustomField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 1, - - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 2 - - } - - - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentCustomField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Custom Field.. - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported.. - /// The signer of the Custom Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. - /// reusableFormId. - public TemplateResponseDocumentCustomField(string name = default(string), TypeEnum? type = default(TypeEnum?), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string), Object namedFormFields = default(Object), string reusableFormId = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - this.NamedFormFields = namedFormFields; - this.ReusableFormId = reusableFormId; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentCustomField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentCustomField"); - } - - return obj; - } - - /// - /// The name of the Custom Field. - /// - /// The name of the Custom Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The signer of the Custom Field. - /// - /// The signer of the Custom Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { get; set; } - - /// - /// 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. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. - [DataMember(Name = "named_form_fields", EmitDefaultValue = true)] - [Obsolete] - public Object NamedFormFields { get; set; } - - /// - /// Gets or Sets ReusableFormId - /// - [DataMember(Name = "reusable_form_id", EmitDefaultValue = true)] - [Obsolete] - public string ReusableFormId { 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 TemplateResponseDocumentCustomField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); - sb.Append(" NamedFormFields: ").Append(NamedFormFields).Append("\n"); - sb.Append(" ReusableFormId: ").Append(ReusableFormId).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 TemplateResponseDocumentCustomField); - } - - /// - /// Returns true if TemplateResponseDocumentCustomField instances are equal - /// - /// Instance of TemplateResponseDocumentCustomField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentCustomField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ) && - ( - this.NamedFormFields == input.NamedFormFields || - (this.NamedFormFields != null && - this.NamedFormFields.Equals(input.NamedFormFields)) - ) && - ( - this.ReusableFormId == input.ReusableFormId || - (this.ReusableFormId != null && - this.ReusableFormId.Equals(input.ReusableFormId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - if (this.NamedFormFields != null) - { - hashCode = (hashCode * 59) + this.NamedFormFields.GetHashCode(); - } - if (this.ReusableFormId != null) - { - hashCode = (hashCode * 59) + this.ReusableFormId.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - types.Add(new OpenApiType() - { - Name = "named_form_fields", - Property = "NamedFormFields", - Type = "Object", - Value = NamedFormFields, - }); - types.Add(new OpenApiType() - { - Name = "reusable_form_id", - Property = "ReusableFormId", - Type = "string", - Value = ReusableFormId, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs deleted file mode 100644 index 9a84275b0..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs +++ /dev/null @@ -1,549 +0,0 @@ -/* - * 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 -{ - /// - /// TemplateResponseDocumentFormField - /// - [DataContract(Name = "TemplateResponseDocumentFormField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentFormField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 1, - - /// - /// Enum CheckboxMerge for value: checkbox-merge - /// - [EnumMember(Value = "checkbox-merge")] - CheckboxMerge = 2, - - /// - /// Enum DateSigned for value: date_signed - /// - [EnumMember(Value = "date_signed")] - DateSigned = 3, - - /// - /// Enum Dropdown for value: dropdown - /// - [EnumMember(Value = "dropdown")] - Dropdown = 4, - - /// - /// Enum Hyperlink for value: hyperlink - /// - [EnumMember(Value = "hyperlink")] - Hyperlink = 5, - - /// - /// Enum Initials for value: initials - /// - [EnumMember(Value = "initials")] - Initials = 6, - - /// - /// Enum Signature for value: signature - /// - [EnumMember(Value = "signature")] - Signature = 7, - - /// - /// Enum Radio for value: radio - /// - [EnumMember(Value = "radio")] - Radio = 8, - - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 9, - - /// - /// Enum TextMerge for value: text-merge - /// - [EnumMember(Value = "text-merge")] - TextMerge = 10 - - } - - - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentFormField() { } - /// - /// Initializes a new instance of the class. - /// - /// A unique id for the form field.. - /// The name of the form field.. - /// The type of this form field. See [field types](/api/reference/constants/#field-types).. - /// The signer of the Form Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseDocumentFormField(string apiId = default(string), string name = default(string), TypeEnum? type = default(TypeEnum?), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.ApiId = apiId; - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentFormField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentFormField"); - } - - return obj; - } - - /// - /// A unique id for the form field. - /// - /// A unique id for the form field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the form field. - /// - /// The name of the form field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The signer of the Form Field. - /// - /// The signer of the Form Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { 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 TemplateResponseDocumentFormField {\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).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 TemplateResponseDocumentFormField); - } - - /// - /// Returns true if TemplateResponseDocumentFormField instances are equal - /// - /// Instance of TemplateResponseDocumentFormField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentFormField input) - { - if (input == null) - { - return false; - } - return - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs index 45f1eefac..416901304 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs @@ -60,8 +60,7 @@ protected TemplateResponseDocumentFormFieldBase() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldBase(string apiId = default(string), string name = default(string), string type = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldBase(string apiId = default(string), string name = default(string), string type = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { // to ensure "type" is required (not null) @@ -78,7 +77,6 @@ protected TemplateResponseDocumentFormFieldBase() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; } /// @@ -164,13 +162,6 @@ public object Signer [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - /// /// Returns the string presentation of the object /// @@ -188,7 +179,6 @@ public override string ToString() sb.Append(" Width: ").Append(Width).Append("\n"); sb.Append(" Height: ").Append(Height).Append("\n"); sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -263,11 +253,6 @@ public bool Equals(TemplateResponseDocumentFormFieldBase input) ( this.Required == input.Required || this.Required.Equals(input.Required) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) ); } @@ -301,10 +286,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Width.GetHashCode(); hashCode = (hashCode * 59) + this.Height.GetHashCode(); hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } return hashCode; } } @@ -394,13 +375,6 @@ public List GetOpenApiTypes() Type = "bool", Value = Required, }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs index 81107edb4..47f9cafc7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "checkbox"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldCheckbox(string type = @"checkbox", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldCheckbox(string type = @"checkbox", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldCheckbox and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldCheckbox Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldCheckbox {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldCheckbox input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs index 617886762..d40024e3d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "date_signed"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDateSigned(string type = @"date_signed", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDateSigned(string type = @"date_signed", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldDateSigned and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldDateSigned Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldDateSigned {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldDateSigned input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs index e402f7f74..b1670234d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "dropdown"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDropdown(string type = @"dropdown", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDropdown(string type = @"dropdown", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldDropdown() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldDropdown and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldDropdown Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldDropdown {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldDropdown input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs index 5f874e63a..49bee3679 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs @@ -46,6 +46,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } /// Whether this form field is multiline text.. /// Original font size used in this form field's text.. /// Font family used in this form field's text.. + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -54,8 +55,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldHyperlink(string type = @"hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldHyperlink(string type = @"hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -65,7 +65,6 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -77,6 +76,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } this.IsMultiline = isMultiline; this.OriginalFontSize = originalFontSize; this.FontFamily = fontFamily; + this.Group = group; } /// @@ -129,6 +129,13 @@ public static TemplateResponseDocumentFormFieldHyperlink Init(string jsonData) [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -143,6 +150,7 @@ public override string ToString() sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -200,6 +208,11 @@ public bool Equals(TemplateResponseDocumentFormFieldHyperlink input) this.FontFamily == input.FontFamily || (this.FontFamily != null && this.FontFamily.Equals(input.FontFamily)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -226,6 +239,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -291,6 +308,13 @@ public List GetOpenApiTypes() Type = "string", Value = FontFamily, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs index 3eb9296b0..8e8456328 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "initials"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldInitials(string type = @"initials", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldInitials(string type = @"initials", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldInitials() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldInitials and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldInitials Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldInitials {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldInitials input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs index 2bf695e4d..cbb5d59b3 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldRadio() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "radio"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. (required). /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldRadio() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. (required). - public TemplateResponseDocumentFormFieldRadio(string type = @"radio", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldRadio(string type = @"radio", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldRadio() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,12 @@ protected TemplateResponseDocumentFormFieldRadio() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldRadio and cannot be null"); } this.Type = type; + // to ensure "group" is required (not null) + if (group == null) + { + throw new ArgumentNullException("group is a required property for TemplateResponseDocumentFormFieldRadio and cannot be null"); + } + this.Group = group; } /// @@ -94,6 +99,13 @@ public static TemplateResponseDocumentFormFieldRadio Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +116,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldRadio {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +156,11 @@ public bool Equals(TemplateResponseDocumentFormFieldRadio input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +177,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +218,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs index 79119e439..b42f09d33 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } /// Initializes a new instance of the class. /// /// 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` (required) (default to "signature"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldSignature(string type = @"signature", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldSignature(string type = @"signature", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldSignature() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldSignature and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldSignature Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldSignature {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldSignature input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs index ee0686bcb..70797b67d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs @@ -122,6 +122,7 @@ protected TemplateResponseDocumentFormFieldText() { } /// Original font size used in this form field's text.. /// Font family used in this form field's text.. /// 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.. + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -130,8 +131,7 @@ protected TemplateResponseDocumentFormFieldText() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -141,7 +141,6 @@ protected TemplateResponseDocumentFormFieldText() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -154,6 +153,7 @@ protected TemplateResponseDocumentFormFieldText() { } this.OriginalFontSize = originalFontSize; this.FontFamily = fontFamily; this.ValidationType = validationType; + this.Group = group; } /// @@ -206,6 +206,13 @@ public static TemplateResponseDocumentFormFieldText Init(string jsonData) [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -221,6 +228,7 @@ public override string ToString() sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); sb.Append(" ValidationType: ").Append(ValidationType).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -282,6 +290,11 @@ public bool Equals(TemplateResponseDocumentFormFieldText input) ( this.ValidationType == input.ValidationType || this.ValidationType.Equals(input.ValidationType) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -309,6 +322,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); } hashCode = (hashCode * 59) + this.ValidationType.GetHashCode(); + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -381,6 +398,13 @@ public List GetOpenApiTypes() Type = "string", Value = ValidationType, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs deleted file mode 100644 index 85f472c5b..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs +++ /dev/null @@ -1,381 +0,0 @@ -/* - * 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 -{ - /// - /// TemplateResponseDocumentStaticField - /// - [DataContract(Name = "TemplateResponseDocumentStaticField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentStaticField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentStaticField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the static field.. - /// The type of this static field. See [field types](/api/reference/constants/#field-types).. - /// The signer of the Static Field.. - /// The horizontal offset in pixels for this static field.. - /// The vertical offset in pixels for this static field.. - /// The width in pixels of this static field.. - /// The height in pixels of this static field.. - /// Boolean showing whether or not this field is required.. - /// A unique id for the static field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticField(string name = default(string), string type = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentStaticField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentStaticField"); - } - - return obj; - } - - /// - /// The name of the static field. - /// - /// The name of the static field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The type of this static field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this static field. See [field types](/api/reference/constants/#field-types). - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; set; } - - /// - /// The signer of the Static Field. - /// - /// The signer of the Static Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this static field. - /// - /// The horizontal offset in pixels for this static field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this static field. - /// - /// The vertical offset in pixels for this static field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this static field. - /// - /// The width in pixels of this static field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this static field. - /// - /// The height in pixels of this static field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// A unique id for the static field. - /// - /// A unique id for the static field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { 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 TemplateResponseDocumentStaticField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).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 TemplateResponseDocumentStaticField); - } - - /// - /// Returns true if TemplateResponseDocumentStaticField instances are equal - /// - /// Instance of TemplateResponseDocumentStaticField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentStaticField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs deleted file mode 100644 index d6dfd5f5b..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs +++ /dev/null @@ -1,484 +0,0 @@ -/* - * 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 -{ - /// - /// TemplateResponseNamedFormField - /// - [DataContract(Name = "TemplateResponseNamedFormField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseNamedFormField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseNamedFormField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Named Form Field.. - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported.. - /// The signer of the Named Form Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseNamedFormField(string name = default(string), string type = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseNamedFormField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseNamedFormField"); - } - - return obj; - } - - /// - /// The name of the Named Form Field. - /// - /// The name of the Named Form Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; set; } - - /// - /// The signer of the Named Form Field. - /// - /// The signer of the Named Form Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { 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 TemplateResponseNamedFormField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).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 TemplateResponseNamedFormField); - } - - /// - /// Returns true if TemplateResponseNamedFormField instances are equal - /// - /// Instance of TemplateResponseNamedFormField to be compared - /// Boolean - public bool Equals(TemplateResponseNamedFormField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index b78da75be..84f76aaad 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.6-dev + 1.7-dev compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.6-dev" + implementation "com.dropbox.sign:dropbox-sign:1.7-dev" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.6-dev.jar` +- `target/dropbox-sign-1.7-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -177,6 +177,11 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**bulkSendJobList**](docs/BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**embeddedEditUrl**](docs/EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**embeddedSignUrl**](docs/EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxApi* | [**faxDelete**](docs/FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +*FaxApi* | [**faxFiles**](docs/FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +*FaxApi* | [**faxGet**](docs/FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +*FaxApi* | [**faxList**](docs/FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +*FaxApi* | [**faxSend**](docs/FaxApi.md#faxSend) | **POST** /fax/send | Send Fax *FaxLineApi* | [**faxLineAddUser**](docs/FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User *FaxLineApi* | [**faxLineAreaCodeGet**](docs/FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes *FaxLineApi* | [**faxLineCreate**](docs/FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line @@ -214,7 +219,7 @@ Class | Method | HTTP request | Description *TeamApi* | [**teamSubTeams**](docs/TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams *TeamApi* | [**teamUpdate**](docs/TeamApi.md#teamUpdate) | **PUT** /team | Update Team *TemplateApi* | [**templateAddUser**](docs/TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template *TemplateApi* | [**templateCreateEmbeddedDraft**](docs/TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft *TemplateApi* | [**templateDelete**](docs/TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template *TemplateApi* | [**templateFiles**](docs/TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -266,6 +271,7 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxGetResponse](docs/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -277,6 +283,10 @@ Class | Method | HTTP request | Description - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [FaxListResponse](docs/FaxListResponse.md) + - [FaxResponse](docs/FaxResponse.md) + - [FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [FaxSendRequest](docs/FaxSendRequest.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) @@ -449,7 +459,7 @@ apisupport@hellosign.com This Java package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.6-dev` + - Package version: `1.7-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v1/VERSION b/sdks/java-v1/VERSION index 78ca9a102..b19f5be06 100644 --- a/sdks/java-v1/VERSION +++ b/sdks/java-v1/VERSION @@ -1 +1 @@ -1.6-dev +1.7-dev diff --git a/sdks/java-v1/build.gradle b/sdks/java-v1/build.gradle index f4a8c1cd9..5220fbaa8 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.6-dev' +version = '1.7-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 9c367c976..e942aadd8 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.6-dev", + version := "1.7-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v1/docs/AccountResponseQuotas.md b/sdks/java-v1/docs/AccountResponseQuotas.md index 3b7fe4e58..e7510a8d7 100644 --- a/sdks/java-v1/docs/AccountResponseQuotas.md +++ b/sdks/java-v1/docs/AccountResponseQuotas.md @@ -12,7 +12,7 @@ Details concerning remaining monthly quotas. | `documentsLeft` | ```Integer``` | Signature requests remaining. | | | `templatesTotal` | ```Integer``` | Total API templates allowed. | | | `templatesLeft` | ```Integer``` | API templates remaining. | | -| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | | `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/java-v1/docs/FaxApi.md b/sdks/java-v1/docs/FaxApi.md new file mode 100644 index 000000000..a3d9baef9 --- /dev/null +++ b/sdks/java-v1/docs/FaxApi.md @@ -0,0 +1,364 @@ +# FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**faxDelete**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +[**faxGet**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +[**faxList**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +[**faxSend**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax + + + +## faxDelete + +> faxDelete(faxId) + +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + try { + faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxFiles + +> File faxFiles(faxId) + +List Fax Files + +Returns list of fax files + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.io.File; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + File result = faxApi.faxFiles(faxId); + result.renameTo(new File("file_response.pdf"));; + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxGet + +> FaxGetResponse faxGet(faxId) + +Get Fax + +Returns information about fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + FaxGetResponse result = faxApi.faxGet(faxId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxList + +> FaxListResponse faxList(page, pageSize) + +Lists Faxes + +Returns properties of multiple faxes + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var page = 1; + var pageSize = 2; + + try { + FaxListResponse result = faxApi.faxList(page, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Page | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxSend + +> FaxGetResponse faxSend(faxSendRequest) + +Send Fax + +Action to prepare and send a fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + + var data = new FaxSendRequest() + .addFilesItem(new File("example_fax.pdf")) + .testMode(true) + .recipient("16690000001") + .sender("16690000000") + .coverPageTo("Jill Fax") + .coverPageMessage("I'm sending you a fax!") + .coverPageFrom("Faxer Faxerson") + .title("This is what the fax is about!"); + + try { + FaxCreateResponse result = faxApi.faxSend(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md)| | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/FaxGetResponse.md b/sdks/java-v1/docs/FaxGetResponse.md new file mode 100644 index 000000000..cc9dc6e57 --- /dev/null +++ b/sdks/java-v1/docs/FaxGetResponse.md @@ -0,0 +1,15 @@ + + +# FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/FaxListResponse.md b/sdks/java-v1/docs/FaxListResponse.md new file mode 100644 index 000000000..f25379a27 --- /dev/null +++ b/sdks/java-v1/docs/FaxListResponse.md @@ -0,0 +1,15 @@ + + +# FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxes`*_required_ | [```List```](FaxResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxResponse.md b/sdks/java-v1/docs/FaxResponse.md new file mode 100644 index 000000000..77ec7eb10 --- /dev/null +++ b/sdks/java-v1/docs/FaxResponse.md @@ -0,0 +1,23 @@ + + +# FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxId`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `originalTitle`*_required_ | ```String``` | Fax Original Title | | +| `subject`*_required_ | ```String``` | Fax Subject | | +| `message`*_required_ | ```String``` | Fax Message | | +| `metadata`*_required_ | ```Map``` | Fax Metadata | | +| `createdAt`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `transmissions`*_required_ | [```List```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `filesUrl`*_required_ | ```String``` | Fax Files URL | | + + + diff --git a/sdks/java-v1/docs/FaxResponseTransmission.md b/sdks/java-v1/docs/FaxResponseTransmission.md new file mode 100644 index 000000000..09db223e9 --- /dev/null +++ b/sdks/java-v1/docs/FaxResponseTransmission.md @@ -0,0 +1,32 @@ + + +# FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```String``` | Fax Transmission Sender | | +| `statusCode`*_required_ | [```StatusCodeEnum```](#StatusCodeEnum) | Fax Transmission Status Code | | +| `sentAt` | ```Integer``` | Fax Transmission Sent Timestamp | | + + + +## Enum: StatusCodeEnum + +| Name | Value | +---- | ----- +| SUCCESS | "success" | +| TRANSMITTING | "transmitting" | +| ERROR_COULD_NOT_FAX | "error_could_not_fax" | +| ERROR_UNKNOWN | "error_unknown" | +| ERROR_BUSY | "error_busy" | +| ERROR_NO_ANSWER | "error_no_answer" | +| ERROR_DISCONNECTED | "error_disconnected" | +| ERROR_BAD_DESTINATION | "error_bad_destination" | + + + diff --git a/sdks/java-v1/docs/FaxSendRequest.md b/sdks/java-v1/docs/FaxSendRequest.md new file mode 100644 index 000000000..5b939a0af --- /dev/null +++ b/sdks/java-v1/docs/FaxSendRequest.md @@ -0,0 +1,22 @@ + + +# FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```List``` | Fax File to Send | | +| `fileUrls` | ```List``` | Fax File URL to Send | | +| `testMode` | ```Boolean``` | API Test Mode Setting | | +| `coverPageTo` | ```String``` | Fax Cover Page for Recipient | | +| `coverPageFrom` | ```String``` | Fax Cover Page for Sender | | +| `coverPageMessage` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + + + diff --git a/sdks/java-v1/docs/OAuthApi.md b/sdks/java-v1/docs/OAuthApi.md index 533052ba2..a2eaa2508 100644 --- a/sdks/java-v1/docs/OAuthApi.md +++ b/sdks/java-v1/docs/OAuthApi.md @@ -77,6 +77,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | ## oauthTokenRefresh @@ -144,4 +145,5 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | diff --git a/sdks/java-v1/docs/OAuthTokenRefreshRequest.md b/sdks/java-v1/docs/OAuthTokenRefreshRequest.md index 2b985fa91..f0ce43061 100644 --- a/sdks/java-v1/docs/OAuthTokenRefreshRequest.md +++ b/sdks/java-v1/docs/OAuthTokenRefreshRequest.md @@ -10,6 +10,8 @@ |------------ | ------------- | ------------- | -------------| | `grantType`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | | | `refreshToken`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `clientId` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `clientSecret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | diff --git a/sdks/java-v1/docs/SignatureRequestApi.md b/sdks/java-v1/docs/SignatureRequestApi.md index ee42461ce..60e02426f 100644 --- a/sdks/java-v1/docs/SignatureRequestApi.md +++ b/sdks/java-v1/docs/SignatureRequestApi.md @@ -265,7 +265,7 @@ Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. -This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. +This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md index a3394d6a1..e6c7d1745 100644 --- a/sdks/java-v1/docs/TemplateApi.md +++ b/sdks/java-v1/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | |------------- | ------------- | -------------| [**templateAddUser**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template [**templateCreateEmbeddedDraft**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft [**templateDelete**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template [**templateFiles**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -100,7 +100,7 @@ public class Example { > TemplateCreateResponse templateCreate(templateCreateRequest) -Create Template +Create Template Creates a template that can then be used. diff --git a/sdks/java-v1/docs/TemplateResponse.md b/sdks/java-v1/docs/TemplateResponse.md index 078685ff1..27673e39b 100644 --- a/sdks/java-v1/docs/TemplateResponse.md +++ b/sdks/java-v1/docs/TemplateResponse.md @@ -12,7 +12,7 @@ Contains information about the templates you and your team have created. | `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updatedAt` | ```Integer``` | Time the template was last updated. | | -| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `isCreator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `canEdit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `isLocked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -23,6 +23,7 @@ Contains information about the templates you and your team have created. | `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `namedFormFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```List```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md index 656070ad4..6ff896074 100644 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md @@ -17,7 +17,6 @@ An array of Form Field objects containing the name and type of each named field. | `width` | ```Integer``` | The width in pixels of this form field. | | | `height` | ```Integer``` | The height in pixels of this form field. | | | `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md index 83d36e0f1..a7f2cadeb 100644 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

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

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

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

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

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

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md index 3581d3855..49cdfaad6 100644 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md @@ -14,6 +14,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | | `fontFamily` | ```String``` | Font family used in this form field's text. | | | `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v1/gradle.properties b/sdks/java-v1/gradle.properties index 7e6977b54..41513d223 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.6-dev +VERSION_NAME=1.7-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 af6dae07a..a141d49ac 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.6-dev" + artifactVersion: "1.7-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 diff --git a/sdks/java-v1/pom.xml b/sdks/java-v1/pom.xml index 369f64ada..09af462cf 100644 --- a/sdks/java-v1/pom.xml +++ b/sdks/java-v1/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.6-dev + 1.7-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! diff --git a/sdks/java-v1/run-build b/sdks/java-v1/run-build index 44a8c5501..ce4f11eff 100755 --- a/sdks/java-v1/run-build +++ b/sdks/java-v1/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/java" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/main/java/com/dropbox/sign/api/"*.java +rm -f "${DIR}/src/main/java/com/dropbox/sign/model/"*.java + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index 01f478efa..4496fac07 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 @@ -147,7 +147,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.6-dev/java"); + setUserAgent("OpenAPI-Generator/1.7-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); 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 ff638c020..db1ad9bfc 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 @@ -16,7 +16,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") public class Configuration { - public static final String VERSION = "1.6-dev"; + public static final String VERSION = "1.7-dev"; private static ApiClient defaultApiClient = new ApiClient(); 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 new file mode 100644 index 000000000..ce101cc84 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -0,0 +1,421 @@ +package com.dropbox.sign.api; + +import com.dropbox.sign.ApiClient; +import com.dropbox.sign.ApiException; +import com.dropbox.sign.ApiResponse; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.Pair; +import com.dropbox.sign.model.FaxGetResponse; +import com.dropbox.sign.model.FaxListResponse; +import com.dropbox.sign.model.FaxSendRequest; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +public class FaxApi { + private ApiClient apiClient; + + public FaxApi() { + this(Configuration.getDefaultApiClient()); + } + + public FaxApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete Fax. Deletes the specified Fax from the system. + * + * @param faxId Fax ID (required) + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public void faxDelete(String faxId) throws ApiException { + faxDeleteWithHttpInfo(faxId); + } + + /** + * Delete Fax. Deletes the specified Fax from the system. + * + * @param faxId Fax ID (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxDelete"); + } + + // Path parameters + String localVarPath = + "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + return apiClient.invokeAPI( + "FaxApi.faxDelete", + localVarPath, + "DELETE", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + false); + } + + /** + * List Fax Files. Returns list of fax files + * + * @param faxId Fax ID (required) + * @return File + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public File faxFiles(String faxId) throws ApiException { + return faxFilesWithHttpInfo(faxId).getData(); + } + + /** + * List Fax Files. Returns list of fax files + * + * @param faxId Fax ID (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxFiles"); + } + + // Path parameters + String localVarPath = + "/fax/files/{fax_id}" + .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/pdf", "application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxFiles", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Get Fax. Returns information about fax + * + * @param faxId Fax ID (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxGet(String faxId) throws ApiException { + return faxGetWithHttpInfo(faxId).getData(); + } + + /** + * Get Fax. Returns information about fax + * + * @param faxId Fax ID (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxGet"); + } + + // Path parameters + String localVarPath = + "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxGet", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Lists Faxes. Returns properties of multiple faxes + * + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return FaxListResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxListResponse faxList(Integer page, Integer pageSize) throws ApiException { + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + /** + * Lists Faxes. Returns properties of multiple faxes + * + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return ApiResponse<FaxListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxListWithHttpInfo(Integer page, Integer pageSize) + throws ApiException { + + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 20; + } + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxList", + "/fax/list", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Send Fax. Action to prepare and send a fax + * + * @param faxSendRequest (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException { + return faxSendWithHttpInfo(faxSendRequest).getData(); + } + + /** + * Send Fax. Action to prepare and send a fax + * + * @param faxSendRequest (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxSendWithHttpInfo(FaxSendRequest faxSendRequest) + throws ApiException { + + // Check required parameters + if (faxSendRequest == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxSendRequest' when calling faxSend"); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = faxSendRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxSend", + "/fax/send", + "POST", + new ArrayList<>(), + isFileTypeFound ? null : faxSendRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } +} diff --git a/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 f9e6d08f3..db4fbb10c 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 @@ -55,6 +55,7 @@ public void setApiClient(ApiClient apiClient) { * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenGenerate( @@ -73,6 +74,7 @@ public OAuthTokenResponse oauthTokenGenerate( * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenGenerateWithHttpInfo( @@ -125,6 +127,7 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenRefreshRequest) @@ -145,6 +148,7 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenRefreshWithHttpInfo( diff --git a/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 new file mode 100644 index 000000000..c4f86dd50 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -0,0 +1,221 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxGetResponse */ +@JsonPropertyOrder({FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxGetResponse { + public static final String JSON_PROPERTY_FAX = "fax"; + private FaxResponse fax; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private List warnings = null; + + public FaxGetResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxGetResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxGetResponse.class); + } + + public static FaxGetResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxGetResponse.class); + } + + public FaxGetResponse fax(FaxResponse fax) { + this.fax = fax; + return this; + } + + /** + * Get fax + * + * @return fax + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FaxResponse getFax() { + return fax; + } + + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFax(FaxResponse fax) { + this.fax = fax; + } + + public FaxGetResponse warnings(List warnings) { + this.warnings = warnings; + return this; + } + + public FaxGetResponse addWarningsItem(WarningResponse warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * A list of warnings. + * + * @return warnings + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(List warnings) { + this.warnings = warnings; + } + + /** Return true if this FaxGetResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxGetResponse faxGetResponse = (FaxGetResponse) o; + return Objects.equals(this.fax, faxGetResponse.fax) + && Objects.equals(this.warnings, faxGetResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(fax, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxGetResponse {\n"); + sb.append(" fax: ").append(toIndentedString(fax)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (fax != null) { + if (isFileTypeOrListOfFiles(fax)) { + fileTypeFound = true; + } + + if (fax.getClass().equals(java.io.File.class) + || fax.getClass().equals(Integer.class) + || fax.getClass().equals(String.class) + || fax.getClass().isEnum()) { + map.put("fax", fax); + } else if (isListOfFile(fax)) { + for (int i = 0; i < getListSize(fax); i++) { + map.put("fax[" + i + "]", getFromList(fax, i)); + } + } else { + map.put("fax", JSON.getDefault().getMapper().writeValueAsString(fax)); + } + } + if (warnings != null) { + if (isFileTypeOrListOfFiles(warnings)) { + fileTypeFound = true; + } + + if (warnings.getClass().equals(java.io.File.class) + || warnings.getClass().equals(Integer.class) + || warnings.getClass().equals(String.class) + || warnings.getClass().isEnum()) { + map.put("warnings", warnings); + } else if (isListOfFile(warnings)) { + for (int i = 0; i < getListSize(warnings); i++) { + map.put("warnings[" + i + "]", getFromList(warnings, i)); + } + } else { + map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/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 new file mode 100644 index 000000000..7da2189b9 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -0,0 +1,224 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxListResponse */ +@JsonPropertyOrder({FaxListResponse.JSON_PROPERTY_FAXES, FaxListResponse.JSON_PROPERTY_LIST_INFO}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxListResponse { + public static final String JSON_PROPERTY_FAXES = "faxes"; + private List faxes = new ArrayList<>(); + + public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + private ListInfoResponse listInfo; + + public FaxListResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxListResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxListResponse.class); + } + + public static FaxListResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxListResponse.class); + } + + public FaxListResponse faxes(List faxes) { + this.faxes = faxes; + return this; + } + + public FaxListResponse addFaxesItem(FaxResponse faxesItem) { + if (this.faxes == null) { + this.faxes = new ArrayList<>(); + } + this.faxes.add(faxesItem); + return this; + } + + /** + * Get faxes + * + * @return faxes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFaxes() { + return faxes; + } + + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxes(List faxes) { + this.faxes = faxes; + } + + public FaxListResponse listInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + return this; + } + + /** + * Get listInfo + * + * @return listInfo + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ListInfoResponse getListInfo() { + return listInfo; + } + + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setListInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + } + + /** Return true if this FaxListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxListResponse faxListResponse = (FaxListResponse) o; + return Objects.equals(this.faxes, faxListResponse.faxes) + && Objects.equals(this.listInfo, faxListResponse.listInfo); + } + + @Override + public int hashCode() { + return Objects.hash(faxes, listInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxListResponse {\n"); + sb.append(" faxes: ").append(toIndentedString(faxes)).append("\n"); + sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxes != null) { + if (isFileTypeOrListOfFiles(faxes)) { + fileTypeFound = true; + } + + if (faxes.getClass().equals(java.io.File.class) + || faxes.getClass().equals(Integer.class) + || faxes.getClass().equals(String.class) + || faxes.getClass().isEnum()) { + map.put("faxes", faxes); + } else if (isListOfFile(faxes)) { + for (int i = 0; i < getListSize(faxes); i++) { + map.put("faxes[" + i + "]", getFromList(faxes, i)); + } + } else { + map.put("faxes", JSON.getDefault().getMapper().writeValueAsString(faxes)); + } + } + if (listInfo != null) { + if (isFileTypeOrListOfFiles(listInfo)) { + fileTypeFound = true; + } + + if (listInfo.getClass().equals(java.io.File.class) + || listInfo.getClass().equals(Integer.class) + || listInfo.getClass().equals(String.class) + || listInfo.getClass().isEnum()) { + map.put("list_info", listInfo); + } else if (isListOfFile(listInfo)) { + for (int i = 0; i < getListSize(listInfo); i++) { + map.put("list_info[" + i + "]", getFromList(listInfo, i)); + } + } else { + map.put( + "list_info", + JSON.getDefault().getMapper().writeValueAsString(listInfo)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/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 new file mode 100644 index 000000000..bbe2dcde4 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -0,0 +1,627 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxResponse */ +@JsonPropertyOrder({ + FaxResponse.JSON_PROPERTY_FAX_ID, + FaxResponse.JSON_PROPERTY_TITLE, + FaxResponse.JSON_PROPERTY_ORIGINAL_TITLE, + FaxResponse.JSON_PROPERTY_SUBJECT, + FaxResponse.JSON_PROPERTY_MESSAGE, + FaxResponse.JSON_PROPERTY_METADATA, + FaxResponse.JSON_PROPERTY_CREATED_AT, + FaxResponse.JSON_PROPERTY_SENDER, + FaxResponse.JSON_PROPERTY_TRANSMISSIONS, + FaxResponse.JSON_PROPERTY_FILES_URL +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxResponse { + public static final String JSON_PROPERTY_FAX_ID = "fax_id"; + private String faxId; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + private String originalTitle; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Integer createdAt; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + private List transmissions = new ArrayList<>(); + + public static final String JSON_PROPERTY_FILES_URL = "files_url"; + private String filesUrl; + + public FaxResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponse.class); + } + + public static FaxResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxResponse.class); + } + + public FaxResponse faxId(String faxId) { + this.faxId = faxId; + return this; + } + + /** + * Fax ID + * + * @return faxId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFaxId() { + return faxId; + } + + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxId(String faxId) { + this.faxId = faxId; + } + + public FaxResponse title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * + * @return title + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(String title) { + this.title = title; + } + + public FaxResponse originalTitle(String originalTitle) { + this.originalTitle = originalTitle; + return this; + } + + /** + * Fax Original Title + * + * @return originalTitle + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOriginalTitle() { + return originalTitle; + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOriginalTitle(String originalTitle) { + this.originalTitle = originalTitle; + } + + public FaxResponse subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Fax Subject + * + * @return subject + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubject(String subject) { + this.subject = subject; + } + + public FaxResponse message(String message) { + this.message = message; + return this; + } + + /** + * Fax Message + * + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public FaxResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public FaxResponse putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Fax Metadata + * + * @return metadata + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public FaxResponse createdAt(Integer createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Fax Created At Timestamp + * + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(Integer createdAt) { + this.createdAt = createdAt; + } + + public FaxResponse sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Sender Email + * + * @return sender + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxResponse transmissions(List transmissions) { + this.transmissions = transmissions; + return this; + } + + public FaxResponse addTransmissionsItem(FaxResponseTransmission transmissionsItem) { + if (this.transmissions == null) { + this.transmissions = new ArrayList<>(); + } + this.transmissions.add(transmissionsItem); + return this; + } + + /** + * Fax Transmissions List + * + * @return transmissions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTransmissions() { + return transmissions; + } + + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransmissions(List transmissions) { + this.transmissions = transmissions; + } + + public FaxResponse filesUrl(String filesUrl) { + this.filesUrl = filesUrl; + return this; + } + + /** + * Fax Files URL + * + * @return filesUrl + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFilesUrl() { + return filesUrl; + } + + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilesUrl(String filesUrl) { + this.filesUrl = filesUrl; + } + + /** Return true if this FaxResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponse faxResponse = (FaxResponse) o; + return Objects.equals(this.faxId, faxResponse.faxId) + && Objects.equals(this.title, faxResponse.title) + && Objects.equals(this.originalTitle, faxResponse.originalTitle) + && Objects.equals(this.subject, faxResponse.subject) + && Objects.equals(this.message, faxResponse.message) + && Objects.equals(this.metadata, faxResponse.metadata) + && Objects.equals(this.createdAt, faxResponse.createdAt) + && Objects.equals(this.sender, faxResponse.sender) + && Objects.equals(this.transmissions, faxResponse.transmissions) + && Objects.equals(this.filesUrl, faxResponse.filesUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + faxId, + title, + originalTitle, + subject, + message, + metadata, + createdAt, + sender, + transmissions, + filesUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponse {\n"); + sb.append(" faxId: ").append(toIndentedString(faxId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" transmissions: ").append(toIndentedString(transmissions)).append("\n"); + sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxId != null) { + if (isFileTypeOrListOfFiles(faxId)) { + fileTypeFound = true; + } + + if (faxId.getClass().equals(java.io.File.class) + || faxId.getClass().equals(Integer.class) + || faxId.getClass().equals(String.class) + || faxId.getClass().isEnum()) { + map.put("fax_id", faxId); + } else if (isListOfFile(faxId)) { + for (int i = 0; i < getListSize(faxId); i++) { + map.put("fax_id[" + i + "]", getFromList(faxId, i)); + } + } else { + map.put("fax_id", JSON.getDefault().getMapper().writeValueAsString(faxId)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) + || title.getClass().equals(Integer.class) + || title.getClass().equals(String.class) + || title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for (int i = 0; i < getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + if (originalTitle != null) { + if (isFileTypeOrListOfFiles(originalTitle)) { + fileTypeFound = true; + } + + if (originalTitle.getClass().equals(java.io.File.class) + || originalTitle.getClass().equals(Integer.class) + || originalTitle.getClass().equals(String.class) + || originalTitle.getClass().isEnum()) { + map.put("original_title", originalTitle); + } else if (isListOfFile(originalTitle)) { + for (int i = 0; i < getListSize(originalTitle); i++) { + map.put("original_title[" + i + "]", getFromList(originalTitle, i)); + } + } else { + map.put( + "original_title", + JSON.getDefault().getMapper().writeValueAsString(originalTitle)); + } + } + if (subject != null) { + if (isFileTypeOrListOfFiles(subject)) { + fileTypeFound = true; + } + + if (subject.getClass().equals(java.io.File.class) + || subject.getClass().equals(Integer.class) + || subject.getClass().equals(String.class) + || subject.getClass().isEnum()) { + map.put("subject", subject); + } else if (isListOfFile(subject)) { + for (int i = 0; i < getListSize(subject); i++) { + map.put("subject[" + i + "]", getFromList(subject, i)); + } + } else { + map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); + } + } + if (message != null) { + if (isFileTypeOrListOfFiles(message)) { + fileTypeFound = true; + } + + if (message.getClass().equals(java.io.File.class) + || message.getClass().equals(Integer.class) + || message.getClass().equals(String.class) + || message.getClass().isEnum()) { + map.put("message", message); + } else if (isListOfFile(message)) { + for (int i = 0; i < getListSize(message); i++) { + map.put("message[" + i + "]", getFromList(message, i)); + } + } else { + map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); + } + } + if (metadata != null) { + if (isFileTypeOrListOfFiles(metadata)) { + fileTypeFound = true; + } + + if (metadata.getClass().equals(java.io.File.class) + || metadata.getClass().equals(Integer.class) + || metadata.getClass().equals(String.class) + || metadata.getClass().isEnum()) { + map.put("metadata", metadata); + } else if (isListOfFile(metadata)) { + for (int i = 0; i < getListSize(metadata); i++) { + map.put("metadata[" + i + "]", getFromList(metadata, i)); + } + } else { + map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); + } + } + if (createdAt != null) { + if (isFileTypeOrListOfFiles(createdAt)) { + fileTypeFound = true; + } + + if (createdAt.getClass().equals(java.io.File.class) + || createdAt.getClass().equals(Integer.class) + || createdAt.getClass().equals(String.class) + || createdAt.getClass().isEnum()) { + map.put("created_at", createdAt); + } else if (isListOfFile(createdAt)) { + for (int i = 0; i < getListSize(createdAt); i++) { + map.put("created_at[" + i + "]", getFromList(createdAt, i)); + } + } else { + map.put( + "created_at", + JSON.getDefault().getMapper().writeValueAsString(createdAt)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (transmissions != null) { + if (isFileTypeOrListOfFiles(transmissions)) { + fileTypeFound = true; + } + + if (transmissions.getClass().equals(java.io.File.class) + || transmissions.getClass().equals(Integer.class) + || transmissions.getClass().equals(String.class) + || transmissions.getClass().isEnum()) { + map.put("transmissions", transmissions); + } else if (isListOfFile(transmissions)) { + for (int i = 0; i < getListSize(transmissions); i++) { + map.put("transmissions[" + i + "]", getFromList(transmissions, i)); + } + } else { + map.put( + "transmissions", + JSON.getDefault().getMapper().writeValueAsString(transmissions)); + } + } + if (filesUrl != null) { + if (isFileTypeOrListOfFiles(filesUrl)) { + fileTypeFound = true; + } + + if (filesUrl.getClass().equals(java.io.File.class) + || filesUrl.getClass().equals(Integer.class) + || filesUrl.getClass().equals(String.class) + || filesUrl.getClass().isEnum()) { + map.put("files_url", filesUrl); + } else if (isListOfFile(filesUrl)) { + for (int i = 0; i < getListSize(filesUrl); i++) { + map.put("files_url[" + i + "]", getFromList(filesUrl, i)); + } + } else { + map.put( + "files_url", + JSON.getDefault().getMapper().writeValueAsString(filesUrl)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/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 new file mode 100644 index 000000000..8ab92887f --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -0,0 +1,360 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** FaxResponseTransmission */ +@JsonPropertyOrder({ + FaxResponseTransmission.JSON_PROPERTY_RECIPIENT, + FaxResponseTransmission.JSON_PROPERTY_SENDER, + FaxResponseTransmission.JSON_PROPERTY_STATUS_CODE, + FaxResponseTransmission.JSON_PROPERTY_SENT_AT +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxResponseTransmission { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + /** Fax Transmission Status Code */ + public enum StatusCodeEnum { + SUCCESS("success"), + + TRANSMITTING("transmitting"), + + ERROR_COULD_NOT_FAX("error_could_not_fax"), + + ERROR_UNKNOWN("error_unknown"), + + ERROR_BUSY("error_busy"), + + ERROR_NO_ANSWER("error_no_answer"), + + ERROR_DISCONNECTED("error_disconnected"), + + ERROR_BAD_DESTINATION("error_bad_destination"); + + private String value; + + StatusCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCodeEnum fromValue(String value) { + for (StatusCodeEnum b : StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; + private StatusCodeEnum statusCode; + + public static final String JSON_PROPERTY_SENT_AT = "sent_at"; + private Integer sentAt; + + public FaxResponseTransmission() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxResponseTransmission init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponseTransmission.class); + } + + public static FaxResponseTransmission init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), FaxResponseTransmission.class); + } + + public FaxResponseTransmission recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Transmission Recipient + * + * @return recipient + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRecipient() { + return recipient; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + public FaxResponseTransmission sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Transmission Sender + * + * @return sender + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Fax Transmission Status Code + * + * @return statusCode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusCodeEnum getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + } + + public FaxResponseTransmission sentAt(Integer sentAt) { + this.sentAt = sentAt; + return this; + } + + /** + * Fax Transmission Sent Timestamp + * + * @return sentAt + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSentAt() { + return sentAt; + } + + @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSentAt(Integer sentAt) { + this.sentAt = sentAt; + } + + /** Return true if this FaxResponseTransmission object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponseTransmission faxResponseTransmission = (FaxResponseTransmission) o; + return Objects.equals(this.recipient, faxResponseTransmission.recipient) + && Objects.equals(this.sender, faxResponseTransmission.sender) + && Objects.equals(this.statusCode, faxResponseTransmission.statusCode) + && Objects.equals(this.sentAt, faxResponseTransmission.sentAt); + } + + @Override + public int hashCode() { + return Objects.hash(recipient, sender, statusCode, sentAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponseTransmission {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" sentAt: ").append(toIndentedString(sentAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) + || recipient.getClass().equals(Integer.class) + || recipient.getClass().equals(String.class) + || recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for (int i = 0; i < getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } else { + map.put( + "recipient", + JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (statusCode != null) { + if (isFileTypeOrListOfFiles(statusCode)) { + fileTypeFound = true; + } + + if (statusCode.getClass().equals(java.io.File.class) + || statusCode.getClass().equals(Integer.class) + || statusCode.getClass().equals(String.class) + || statusCode.getClass().isEnum()) { + map.put("status_code", statusCode); + } else if (isListOfFile(statusCode)) { + for (int i = 0; i < getListSize(statusCode); i++) { + map.put("status_code[" + i + "]", getFromList(statusCode, i)); + } + } else { + map.put( + "status_code", + JSON.getDefault().getMapper().writeValueAsString(statusCode)); + } + } + if (sentAt != null) { + if (isFileTypeOrListOfFiles(sentAt)) { + fileTypeFound = true; + } + + if (sentAt.getClass().equals(java.io.File.class) + || sentAt.getClass().equals(Integer.class) + || sentAt.getClass().equals(String.class) + || sentAt.getClass().isEnum()) { + map.put("sent_at", sentAt); + } else if (isListOfFile(sentAt)) { + for (int i = 0; i < getListSize(sentAt); i++) { + map.put("sent_at[" + i + "]", getFromList(sentAt, i)); + } + } else { + map.put("sent_at", JSON.getDefault().getMapper().writeValueAsString(sentAt)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/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 new file mode 100644 index 000000000..571ba92f8 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -0,0 +1,576 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxSendRequest */ +@JsonPropertyOrder({ + FaxSendRequest.JSON_PROPERTY_RECIPIENT, + FaxSendRequest.JSON_PROPERTY_SENDER, + FaxSendRequest.JSON_PROPERTY_FILES, + FaxSendRequest.JSON_PROPERTY_FILE_URLS, + FaxSendRequest.JSON_PROPERTY_TEST_MODE, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_TO, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_FROM, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_MESSAGE, + FaxSendRequest.JSON_PROPERTY_TITLE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxSendRequest { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + private List fileUrls = null; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + private Boolean testMode = false; + + public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; + private String coverPageTo; + + public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; + private String coverPageFrom; + + public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; + private String coverPageMessage; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public FaxSendRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxSendRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxSendRequest.class); + } + + public static FaxSendRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxSendRequest.class); + } + + public FaxSendRequest recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Send To Recipient + * + * @return recipient + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRecipient() { + return recipient; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + public FaxSendRequest sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Send From Sender (used only with fax number) + * + * @return sender + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxSendRequest files(List files) { + this.files = files; + return this; + } + + public FaxSendRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Fax File to Send + * + * @return files + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFiles() { + return files; + } + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFiles(List files) { + this.files = files; + } + + public FaxSendRequest fileUrls(List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Fax File URL to Send + * + * @return fileUrls + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFileUrls() { + return fileUrls; + } + + @JsonProperty(JSON_PROPERTY_FILE_URLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFileUrls(List fileUrls) { + this.fileUrls = fileUrls; + } + + public FaxSendRequest testMode(Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * API Test Mode Setting + * + * @return testMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTestMode() { + return testMode; + } + + @JsonProperty(JSON_PROPERTY_TEST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestMode(Boolean testMode) { + this.testMode = testMode; + } + + public FaxSendRequest coverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + return this; + } + + /** + * Fax Cover Page for Recipient + * + * @return coverPageTo + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageTo() { + return coverPageTo; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + } + + public FaxSendRequest coverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + return this; + } + + /** + * Fax Cover Page for Sender + * + * @return coverPageFrom + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageFrom() { + return coverPageFrom; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + } + + public FaxSendRequest coverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + return this; + } + + /** + * Fax Cover Page Message + * + * @return coverPageMessage + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageMessage() { + return coverPageMessage; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + } + + public FaxSendRequest title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * + * @return title + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + /** Return true if this FaxSendRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxSendRequest faxSendRequest = (FaxSendRequest) o; + return Objects.equals(this.recipient, faxSendRequest.recipient) + && Objects.equals(this.sender, faxSendRequest.sender) + && Objects.equals(this.files, faxSendRequest.files) + && Objects.equals(this.fileUrls, faxSendRequest.fileUrls) + && Objects.equals(this.testMode, faxSendRequest.testMode) + && Objects.equals(this.coverPageTo, faxSendRequest.coverPageTo) + && Objects.equals(this.coverPageFrom, faxSendRequest.coverPageFrom) + && Objects.equals(this.coverPageMessage, faxSendRequest.coverPageMessage) + && Objects.equals(this.title, faxSendRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash( + recipient, + sender, + files, + fileUrls, + testMode, + coverPageTo, + coverPageFrom, + coverPageMessage, + title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxSendRequest {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" coverPageTo: ").append(toIndentedString(coverPageTo)).append("\n"); + sb.append(" coverPageFrom: ").append(toIndentedString(coverPageFrom)).append("\n"); + sb.append(" coverPageMessage: ").append(toIndentedString(coverPageMessage)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) + || recipient.getClass().equals(Integer.class) + || recipient.getClass().equals(String.class) + || recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for (int i = 0; i < getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } else { + map.put( + "recipient", + JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (files != null) { + if (isFileTypeOrListOfFiles(files)) { + fileTypeFound = true; + } + + if (files.getClass().equals(java.io.File.class) + || files.getClass().equals(Integer.class) + || files.getClass().equals(String.class) + || files.getClass().isEnum()) { + map.put("files", files); + } else if (isListOfFile(files)) { + for (int i = 0; i < getListSize(files); i++) { + map.put("files[" + i + "]", getFromList(files, i)); + } + } else { + map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); + } + } + if (fileUrls != null) { + if (isFileTypeOrListOfFiles(fileUrls)) { + fileTypeFound = true; + } + + if (fileUrls.getClass().equals(java.io.File.class) + || fileUrls.getClass().equals(Integer.class) + || fileUrls.getClass().equals(String.class) + || fileUrls.getClass().isEnum()) { + map.put("file_urls", fileUrls); + } else if (isListOfFile(fileUrls)) { + for (int i = 0; i < getListSize(fileUrls); i++) { + map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); + } + } else { + map.put( + "file_urls", + JSON.getDefault().getMapper().writeValueAsString(fileUrls)); + } + } + if (testMode != null) { + if (isFileTypeOrListOfFiles(testMode)) { + fileTypeFound = true; + } + + if (testMode.getClass().equals(java.io.File.class) + || testMode.getClass().equals(Integer.class) + || testMode.getClass().equals(String.class) + || testMode.getClass().isEnum()) { + map.put("test_mode", testMode); + } else if (isListOfFile(testMode)) { + for (int i = 0; i < getListSize(testMode); i++) { + map.put("test_mode[" + i + "]", getFromList(testMode, i)); + } + } else { + map.put( + "test_mode", + JSON.getDefault().getMapper().writeValueAsString(testMode)); + } + } + if (coverPageTo != null) { + if (isFileTypeOrListOfFiles(coverPageTo)) { + fileTypeFound = true; + } + + if (coverPageTo.getClass().equals(java.io.File.class) + || coverPageTo.getClass().equals(Integer.class) + || coverPageTo.getClass().equals(String.class) + || coverPageTo.getClass().isEnum()) { + map.put("cover_page_to", coverPageTo); + } else if (isListOfFile(coverPageTo)) { + for (int i = 0; i < getListSize(coverPageTo); i++) { + map.put("cover_page_to[" + i + "]", getFromList(coverPageTo, i)); + } + } else { + map.put( + "cover_page_to", + JSON.getDefault().getMapper().writeValueAsString(coverPageTo)); + } + } + if (coverPageFrom != null) { + if (isFileTypeOrListOfFiles(coverPageFrom)) { + fileTypeFound = true; + } + + if (coverPageFrom.getClass().equals(java.io.File.class) + || coverPageFrom.getClass().equals(Integer.class) + || coverPageFrom.getClass().equals(String.class) + || coverPageFrom.getClass().isEnum()) { + map.put("cover_page_from", coverPageFrom); + } else if (isListOfFile(coverPageFrom)) { + for (int i = 0; i < getListSize(coverPageFrom); i++) { + map.put("cover_page_from[" + i + "]", getFromList(coverPageFrom, i)); + } + } else { + map.put( + "cover_page_from", + JSON.getDefault().getMapper().writeValueAsString(coverPageFrom)); + } + } + if (coverPageMessage != null) { + if (isFileTypeOrListOfFiles(coverPageMessage)) { + fileTypeFound = true; + } + + if (coverPageMessage.getClass().equals(java.io.File.class) + || coverPageMessage.getClass().equals(Integer.class) + || coverPageMessage.getClass().equals(String.class) + || coverPageMessage.getClass().isEnum()) { + map.put("cover_page_message", coverPageMessage); + } else if (isListOfFile(coverPageMessage)) { + for (int i = 0; i < getListSize(coverPageMessage); i++) { + map.put("cover_page_message[" + i + "]", getFromList(coverPageMessage, i)); + } + } else { + map.put( + "cover_page_message", + JSON.getDefault().getMapper().writeValueAsString(coverPageMessage)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) + || title.getClass().equals(Integer.class) + || title.getClass().equals(String.class) + || title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for (int i = 0; i < getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/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 6aa0a0552..75979827e 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 @@ -26,7 +26,9 @@ /** OAuthTokenRefreshRequest */ @JsonPropertyOrder({ OAuthTokenRefreshRequest.JSON_PROPERTY_GRANT_TYPE, - OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN + OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_ID, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_SECRET }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -39,6 +41,12 @@ public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; private String refreshToken; + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + public OAuthTokenRefreshRequest() {} /** @@ -103,6 +111,54 @@ public void setRefreshToken(String refreshToken) { this.refreshToken = refreshToken; } + public OAuthTokenRefreshRequest clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the + * \"Client Credentials Required\" setting is enabled for token refresh; optional if + * disabled. + * + * @return clientId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if + * the \"Client Credentials Required\" setting is enabled for token refresh; optional + * if disabled. + * + * @return clientSecret + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + /** Return true if this OAuthTokenRefreshRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -114,12 +170,14 @@ public boolean equals(Object o) { } OAuthTokenRefreshRequest oauthTokenRefreshRequest = (OAuthTokenRefreshRequest) o; return Objects.equals(this.grantType, oauthTokenRefreshRequest.grantType) - && Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken); + && Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken) + && Objects.equals(this.clientId, oauthTokenRefreshRequest.clientId) + && Objects.equals(this.clientSecret, oauthTokenRefreshRequest.clientSecret); } @Override public int hashCode() { - return Objects.hash(grantType, refreshToken); + return Objects.hash(grantType, refreshToken, clientId, clientSecret); } @Override @@ -128,6 +186,8 @@ public String toString() { sb.append("class OAuthTokenRefreshRequest {\n"); sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,6 +236,46 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(refreshToken)); } } + if (clientId != null) { + if (isFileTypeOrListOfFiles(clientId)) { + fileTypeFound = true; + } + + if (clientId.getClass().equals(java.io.File.class) + || clientId.getClass().equals(Integer.class) + || clientId.getClass().equals(String.class) + || clientId.getClass().isEnum()) { + map.put("client_id", clientId); + } else if (isListOfFile(clientId)) { + for (int i = 0; i < getListSize(clientId); i++) { + map.put("client_id[" + i + "]", getFromList(clientId, i)); + } + } else { + map.put( + "client_id", + JSON.getDefault().getMapper().writeValueAsString(clientId)); + } + } + if (clientSecret != null) { + if (isFileTypeOrListOfFiles(clientSecret)) { + fileTypeFound = true; + } + + if (clientSecret.getClass().equals(java.io.File.class) + || clientSecret.getClass().equals(Integer.class) + || clientSecret.getClass().equals(String.class) + || clientSecret.getClass().isEnum()) { + map.put("client_secret", clientSecret); + } else if (isListOfFile(clientSecret)) { + for (int i = 0; i < getListSize(clientSecret); i++) { + map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); + } + } else { + map.put( + "client_secret", + JSON.getDefault().getMapper().writeValueAsString(clientSecret)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 450ca3d7c..2737e1b6d 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 @@ -53,7 +53,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1A1A1A"; + private String headerBackgroundColor = "#1a1a1a"; /** Gets or Sets legalVersion */ public enum LegalVersionEnum { @@ -92,46 +92,46 @@ public static LegalVersionEnum fromValue(String value) { private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#00B3E6"; + private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#F7F8F9"; + private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#00B3E6"; + private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover = "#00B3E6"; + private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor = "#FFFFFF"; + private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#FFFFFF"; + private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#FFFFFF"; + private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#FFFFFF"; + private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor = "#00B3E6"; + private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#00B3E6"; + private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#FFFFFF"; + private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; private Boolean resetToDefault; diff --git a/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 3a0e14a2f..6e50048e4 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 @@ -41,7 +41,8 @@ TemplateResponse.JSON_PROPERTY_DOCUMENTS, TemplateResponse.JSON_PROPERTY_CUSTOM_FIELDS, TemplateResponse.JSON_PROPERTY_NAMED_FORM_FIELDS, - TemplateResponse.JSON_PROPERTY_ACCOUNTS + TemplateResponse.JSON_PROPERTY_ACCOUNTS, + TemplateResponse.JSON_PROPERTY_ATTACHMENTS }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -93,6 +94,9 @@ public class TemplateResponse { public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; private List accounts = null; + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private List attachments = null; + public TemplateResponse() {} /** @@ -207,7 +211,8 @@ public TemplateResponse isEmbedded(Boolean isEmbedded) { /** * `true` if this template was created using an embedded flow, `false` if it - * was created on our website. + * was created on our website. Will be `null` when you are not the creator of the + * Template. * * @return isEmbedded */ @@ -514,6 +519,36 @@ public void setAccounts(List accounts) { this.accounts = accounts; } + public TemplateResponse attachments(List attachments) { + this.attachments = attachments; + return this; + } + + public TemplateResponse addAttachmentsItem(SignatureRequestResponseAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Signer attachments. + * + * @return attachments + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttachments() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttachments(List attachments) { + this.attachments = attachments; + } + /** Return true if this TemplateResponse object is equal to o. */ @Override public boolean equals(Object o) { @@ -538,7 +573,8 @@ public boolean equals(Object o) { && Objects.equals(this.documents, templateResponse.documents) && Objects.equals(this.customFields, templateResponse.customFields) && Objects.equals(this.namedFormFields, templateResponse.namedFormFields) - && Objects.equals(this.accounts, templateResponse.accounts); + && Objects.equals(this.accounts, templateResponse.accounts) + && Objects.equals(this.attachments, templateResponse.attachments); } @Override @@ -558,7 +594,8 @@ public int hashCode() { documents, customFields, namedFormFields, - accounts); + accounts, + attachments); } @Override @@ -580,6 +617,7 @@ public String toString() { sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" namedFormFields: ").append(toIndentedString(namedFormFields)).append("\n"); sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); sb.append("}"); return sb.toString(); } @@ -876,6 +914,26 @@ public Map createFormData() throws ApiException { map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); } } + if (attachments != null) { + if (isFileTypeOrListOfFiles(attachments)) { + fileTypeFound = true; + } + + if (attachments.getClass().equals(java.io.File.class) + || attachments.getClass().equals(Integer.class) + || attachments.getClass().equals(String.class) + || attachments.getClass().isEnum()) { + map.put("attachments", attachments); + } else if (isListOfFile(attachments)) { + for (int i = 0; i < getListSize(attachments); i++) { + map.put("attachments[" + i + "]", getFromList(attachments, i)); + } + } else { + map.put( + "attachments", + JSON.getDefault().getMapper().writeValueAsString(attachments)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 86b997464..36940640a 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 @@ -35,8 +35,7 @@ TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_Y, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_WIDTH, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_GROUP + TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -93,9 +92,6 @@ public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_REQUIRED = "required"; private Boolean required; - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - public TemplateResponseDocumentFormFieldBase() {} /** @@ -322,29 +318,6 @@ public void setRequired(Boolean required) { this.required = required; } - public TemplateResponseDocumentFormFieldBase group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - /** Return true if this TemplateResponseDocumentFormFieldBase object is equal to o. */ @Override public boolean equals(Object o) { @@ -364,13 +337,12 @@ public boolean equals(Object o) { && Objects.equals(this.y, templateResponseDocumentFormFieldBase.y) && Objects.equals(this.width, templateResponseDocumentFormFieldBase.width) && Objects.equals(this.height, templateResponseDocumentFormFieldBase.height) - && Objects.equals(this.required, templateResponseDocumentFormFieldBase.required) - && Objects.equals(this.group, templateResponseDocumentFormFieldBase.group); + && Objects.equals(this.required, templateResponseDocumentFormFieldBase.required); } @Override public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required, group); + return Objects.hash(type, apiId, name, signer, x, y, width, height, required); } @Override @@ -386,7 +358,6 @@ public String toString() { sb.append(" width: ").append(toIndentedString(width)).append("\n"); sb.append(" height: ").append(toIndentedString(height)).append("\n"); sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -557,24 +528,6 @@ public Map createFormData() throws ApiException { map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); } } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 e7469c5a5..b291ffdd8 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldCheckbox public static final String JSON_PROPERTY_TYPE = "type"; private String type = "checkbox"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldCheckbox() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldCheckbox group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldCheckbox object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldCheckbox templateResponseDocumentFormFieldCheckbox = (TemplateResponseDocumentFormFieldCheckbox) o; return Objects.equals(this.type, templateResponseDocumentFormFieldCheckbox.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldCheckbox.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldCheckbox {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 47a664adb..b43906f05 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldDateSigned public static final String JSON_PROPERTY_TYPE = "type"; private String type = "date_signed"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDateSigned() {} /** @@ -93,6 +99,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldDateSigned group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldDateSigned object is equal to o. */ @Override public boolean equals(Object o) { @@ -105,12 +134,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldDateSigned templateResponseDocumentFormFieldDateSigned = (TemplateResponseDocumentFormFieldDateSigned) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDateSigned.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldDateSigned.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -119,6 +149,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDateSigned {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -146,6 +177,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 548aebe5a..1c6289c42 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldDropdown public static final String JSON_PROPERTY_TYPE = "type"; private String type = "dropdown"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDropdown() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldDropdown group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldDropdown templateResponseDocumentFormFieldDropdown = (TemplateResponseDocumentFormFieldDropdown) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDropdown.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldDropdown.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDropdown {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 71ed8a6b1..b2af4e8f9 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 @@ -30,7 +30,8 @@ TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_AVG_TEXT_LENGTH, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY, + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_GROUP }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -60,6 +61,9 @@ public class TemplateResponseDocumentFormFieldHyperlink public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; private String fontFamily; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldHyperlink() {} /** @@ -200,6 +204,29 @@ public void setFontFamily(String fontFamily) { this.fontFamily = fontFamily; } + public TemplateResponseDocumentFormFieldHyperlink group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldHyperlink object is equal to o. */ @Override public boolean equals(Object o) { @@ -222,13 +249,20 @@ public boolean equals(Object o) { templateResponseDocumentFormFieldHyperlink.originalFontSize) && Objects.equals( this.fontFamily, templateResponseDocumentFormFieldHyperlink.fontFamily) + && Objects.equals(this.group, templateResponseDocumentFormFieldHyperlink.group) && super.equals(o); } @Override public int hashCode() { return Objects.hash( - type, avgTextLength, isMultiline, originalFontSize, fontFamily, super.hashCode()); + type, + avgTextLength, + isMultiline, + originalFontSize, + fontFamily, + group, + super.hashCode()); } @Override @@ -241,6 +275,7 @@ public String toString() { sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -348,6 +383,24 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(fontFamily)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 b2a1c740b..17bc3553e 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldInitials public static final String JSON_PROPERTY_TYPE = "type"; private String type = "initials"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldInitials() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldInitials group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldInitials object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldInitials templateResponseDocumentFormFieldInitials = (TemplateResponseDocumentFormFieldInitials) o; return Objects.equals(this.type, templateResponseDocumentFormFieldInitials.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldInitials.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldInitials {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 a9f10772c..75b7a72ad 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -41,6 +44,9 @@ public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocu public static final String JSON_PROPERTY_TYPE = "type"; private String type = "radio"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldRadio() {} /** @@ -90,6 +96,30 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldRadio group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldRadio object is equal to o. */ @Override public boolean equals(Object o) { @@ -102,12 +132,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldRadio templateResponseDocumentFormFieldRadio = (TemplateResponseDocumentFormFieldRadio) o; return Objects.equals(this.type, templateResponseDocumentFormFieldRadio.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldRadio.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -116,6 +147,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldRadio {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,6 +175,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 4155ba402..15630a485 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 @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldSignature public static final String JSON_PROPERTY_TYPE = "type"; private String type = "signature"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldSignature() {} /** @@ -93,6 +99,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldSignature group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldSignature object is equal to o. */ @Override public boolean equals(Object o) { @@ -105,12 +134,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldSignature templateResponseDocumentFormFieldSignature = (TemplateResponseDocumentFormFieldSignature) o; return Objects.equals(this.type, templateResponseDocumentFormFieldSignature.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldSignature.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -119,6 +149,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldSignature {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -146,6 +177,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 070454b47..dbb22a6d1 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 @@ -33,7 +33,8 @@ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_FONT_FAMILY, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE, + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -118,6 +119,9 @@ public static ValidationTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; private ValidationTypeEnum validationType; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldText() {} /** @@ -280,6 +284,29 @@ public void setValidationType(ValidationTypeEnum validationType) { this.validationType = validationType; } + public TemplateResponseDocumentFormFieldText group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldText object is equal to o. */ @Override public boolean equals(Object o) { @@ -302,6 +329,7 @@ public boolean equals(Object o) { && Objects.equals(this.fontFamily, templateResponseDocumentFormFieldText.fontFamily) && Objects.equals( this.validationType, templateResponseDocumentFormFieldText.validationType) + && Objects.equals(this.group, templateResponseDocumentFormFieldText.group) && super.equals(o); } @@ -314,6 +342,7 @@ public int hashCode() { originalFontSize, fontFamily, validationType, + group, super.hashCode()); } @@ -328,6 +357,7 @@ public String toString() { sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); sb.append(" validationType: ").append(toIndentedString(validationType)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -455,6 +485,24 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(validationType)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index 75edf1dcb..3b2e2a381 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.2-dev + 2.3-dev compile ``` @@ -72,7 +72,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:2.2-dev" + implementation "com.dropbox.sign:dropbox-sign:2.3-dev" } ``` @@ -86,7 +86,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-2.2-dev.jar` +- `target/dropbox-sign-2.3-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -153,6 +153,11 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**bulkSendJobList**](docs/BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**embeddedEditUrl**](docs/EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**embeddedSignUrl**](docs/EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxApi* | [**faxDelete**](docs/FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +*FaxApi* | [**faxFiles**](docs/FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +*FaxApi* | [**faxGet**](docs/FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +*FaxApi* | [**faxList**](docs/FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +*FaxApi* | [**faxSend**](docs/FaxApi.md#faxSend) | **POST** /fax/send | Send Fax *FaxLineApi* | [**faxLineAddUser**](docs/FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User *FaxLineApi* | [**faxLineAreaCodeGet**](docs/FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes *FaxLineApi* | [**faxLineCreate**](docs/FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line @@ -190,7 +195,7 @@ Class | Method | HTTP request | Description *TeamApi* | [**teamSubTeams**](docs/TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams *TeamApi* | [**teamUpdate**](docs/TeamApi.md#teamUpdate) | **PUT** /team | Update Team *TemplateApi* | [**templateAddUser**](docs/TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template *TemplateApi* | [**templateCreateEmbeddedDraft**](docs/TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft *TemplateApi* | [**templateDelete**](docs/TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template *TemplateApi* | [**templateFiles**](docs/TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -242,6 +247,7 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxGetResponse](docs/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -253,6 +259,10 @@ Class | Method | HTTP request | Description - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [FaxListResponse](docs/FaxListResponse.md) + - [FaxResponse](docs/FaxResponse.md) + - [FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [FaxSendRequest](docs/FaxSendRequest.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) @@ -425,7 +435,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.2-dev` + - Package version: `2.3-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v2/VERSION b/sdks/java-v2/VERSION index c78c4fff9..69c49c721 100644 --- a/sdks/java-v2/VERSION +++ b/sdks/java-v2/VERSION @@ -1 +1 @@ -2.2-dev +2.3-dev diff --git a/sdks/java-v2/build.gradle b/sdks/java-v2/build.gradle index 9c1bda425..bc7251f00 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.2-dev' +version = '2.3-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 180a4e618..cd67930d6 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.2-dev", + version := "2.3-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v2/docs/AccountResponseQuotas.md b/sdks/java-v2/docs/AccountResponseQuotas.md index 3b7fe4e58..e7510a8d7 100644 --- a/sdks/java-v2/docs/AccountResponseQuotas.md +++ b/sdks/java-v2/docs/AccountResponseQuotas.md @@ -12,7 +12,7 @@ Details concerning remaining monthly quotas. | `documentsLeft` | ```Integer``` | Signature requests remaining. | | | `templatesTotal` | ```Integer``` | Total API templates allowed. | | | `templatesLeft` | ```Integer``` | API templates remaining. | | -| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | | `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/java-v2/docs/FaxApi.md b/sdks/java-v2/docs/FaxApi.md new file mode 100644 index 000000000..a3d9baef9 --- /dev/null +++ b/sdks/java-v2/docs/FaxApi.md @@ -0,0 +1,364 @@ +# FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**faxDelete**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +[**faxGet**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +[**faxList**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +[**faxSend**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax + + + +## faxDelete + +> faxDelete(faxId) + +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + try { + faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxFiles + +> File faxFiles(faxId) + +List Fax Files + +Returns list of fax files + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.io.File; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + File result = faxApi.faxFiles(faxId); + result.renameTo(new File("file_response.pdf"));; + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxGet + +> FaxGetResponse faxGet(faxId) + +Get Fax + +Returns information about fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + FaxGetResponse result = faxApi.faxGet(faxId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxList + +> FaxListResponse faxList(page, pageSize) + +Lists Faxes + +Returns properties of multiple faxes + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var page = 1; + var pageSize = 2; + + try { + FaxListResponse result = faxApi.faxList(page, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Page | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxSend + +> FaxGetResponse faxSend(faxSendRequest) + +Send Fax + +Action to prepare and send a fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + + var data = new FaxSendRequest() + .addFilesItem(new File("example_fax.pdf")) + .testMode(true) + .recipient("16690000001") + .sender("16690000000") + .coverPageTo("Jill Fax") + .coverPageMessage("I'm sending you a fax!") + .coverPageFrom("Faxer Faxerson") + .title("This is what the fax is about!"); + + try { + FaxCreateResponse result = faxApi.faxSend(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md)| | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v2/docs/FaxGetResponse.md b/sdks/java-v2/docs/FaxGetResponse.md new file mode 100644 index 000000000..cc9dc6e57 --- /dev/null +++ b/sdks/java-v2/docs/FaxGetResponse.md @@ -0,0 +1,15 @@ + + +# FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v2/docs/FaxListResponse.md b/sdks/java-v2/docs/FaxListResponse.md new file mode 100644 index 000000000..f25379a27 --- /dev/null +++ b/sdks/java-v2/docs/FaxListResponse.md @@ -0,0 +1,15 @@ + + +# FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxes`*_required_ | [```List```](FaxResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + + + diff --git a/sdks/java-v2/docs/FaxResponse.md b/sdks/java-v2/docs/FaxResponse.md new file mode 100644 index 000000000..77ec7eb10 --- /dev/null +++ b/sdks/java-v2/docs/FaxResponse.md @@ -0,0 +1,23 @@ + + +# FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxId`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `originalTitle`*_required_ | ```String``` | Fax Original Title | | +| `subject`*_required_ | ```String``` | Fax Subject | | +| `message`*_required_ | ```String``` | Fax Message | | +| `metadata`*_required_ | ```Map``` | Fax Metadata | | +| `createdAt`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `transmissions`*_required_ | [```List```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `filesUrl`*_required_ | ```String``` | Fax Files URL | | + + + diff --git a/sdks/java-v2/docs/FaxResponseTransmission.md b/sdks/java-v2/docs/FaxResponseTransmission.md new file mode 100644 index 000000000..09db223e9 --- /dev/null +++ b/sdks/java-v2/docs/FaxResponseTransmission.md @@ -0,0 +1,32 @@ + + +# FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```String``` | Fax Transmission Sender | | +| `statusCode`*_required_ | [```StatusCodeEnum```](#StatusCodeEnum) | Fax Transmission Status Code | | +| `sentAt` | ```Integer``` | Fax Transmission Sent Timestamp | | + + + +## Enum: StatusCodeEnum + +| Name | Value | +---- | ----- +| SUCCESS | "success" | +| TRANSMITTING | "transmitting" | +| ERROR_COULD_NOT_FAX | "error_could_not_fax" | +| ERROR_UNKNOWN | "error_unknown" | +| ERROR_BUSY | "error_busy" | +| ERROR_NO_ANSWER | "error_no_answer" | +| ERROR_DISCONNECTED | "error_disconnected" | +| ERROR_BAD_DESTINATION | "error_bad_destination" | + + + diff --git a/sdks/java-v2/docs/FaxSendRequest.md b/sdks/java-v2/docs/FaxSendRequest.md new file mode 100644 index 000000000..5b939a0af --- /dev/null +++ b/sdks/java-v2/docs/FaxSendRequest.md @@ -0,0 +1,22 @@ + + +# FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```List``` | Fax File to Send | | +| `fileUrls` | ```List``` | Fax File URL to Send | | +| `testMode` | ```Boolean``` | API Test Mode Setting | | +| `coverPageTo` | ```String``` | Fax Cover Page for Recipient | | +| `coverPageFrom` | ```String``` | Fax Cover Page for Sender | | +| `coverPageMessage` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + + + diff --git a/sdks/java-v2/docs/OAuthApi.md b/sdks/java-v2/docs/OAuthApi.md index 533052ba2..a2eaa2508 100644 --- a/sdks/java-v2/docs/OAuthApi.md +++ b/sdks/java-v2/docs/OAuthApi.md @@ -77,6 +77,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | ## oauthTokenRefresh @@ -144,4 +145,5 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | diff --git a/sdks/java-v2/docs/OAuthTokenRefreshRequest.md b/sdks/java-v2/docs/OAuthTokenRefreshRequest.md index 2b985fa91..f0ce43061 100644 --- a/sdks/java-v2/docs/OAuthTokenRefreshRequest.md +++ b/sdks/java-v2/docs/OAuthTokenRefreshRequest.md @@ -10,6 +10,8 @@ |------------ | ------------- | ------------- | -------------| | `grantType`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | | | `refreshToken`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `clientId` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `clientSecret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | diff --git a/sdks/java-v2/docs/SignatureRequestApi.md b/sdks/java-v2/docs/SignatureRequestApi.md index ee42461ce..60e02426f 100644 --- a/sdks/java-v2/docs/SignatureRequestApi.md +++ b/sdks/java-v2/docs/SignatureRequestApi.md @@ -265,7 +265,7 @@ Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. -This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. +This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. diff --git a/sdks/java-v2/docs/TemplateApi.md b/sdks/java-v2/docs/TemplateApi.md index a3394d6a1..e6c7d1745 100644 --- a/sdks/java-v2/docs/TemplateApi.md +++ b/sdks/java-v2/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | |------------- | ------------- | -------------| [**templateAddUser**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template [**templateCreateEmbeddedDraft**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft [**templateDelete**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template [**templateFiles**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -100,7 +100,7 @@ public class Example { > TemplateCreateResponse templateCreate(templateCreateRequest) -Create Template +Create Template Creates a template that can then be used. diff --git a/sdks/java-v2/docs/TemplateResponse.md b/sdks/java-v2/docs/TemplateResponse.md index 078685ff1..27673e39b 100644 --- a/sdks/java-v2/docs/TemplateResponse.md +++ b/sdks/java-v2/docs/TemplateResponse.md @@ -12,7 +12,7 @@ Contains information about the templates you and your team have created. | `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updatedAt` | ```Integer``` | Time the template was last updated. | | -| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `isCreator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `canEdit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `isLocked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -23,6 +23,7 @@ Contains information about the templates you and your team have created. | `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `namedFormFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```List```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldBase.md index 656070ad4..6ff896074 100644 --- a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldBase.md @@ -17,7 +17,6 @@ An array of Form Field objects containing the name and type of each named field. | `width` | ```Integer``` | The width in pixels of this form field. | | | `height` | ```Integer``` | The height in pixels of this form field. | | | `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldCheckbox.md index 83d36e0f1..a7f2cadeb 100644 --- a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

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

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

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

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

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

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldText.md b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldText.md index 3581d3855..49cdfaad6 100644 --- a/sdks/java-v2/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/java-v2/docs/TemplateResponseDocumentFormFieldText.md @@ -14,6 +14,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | | `fontFamily` | ```String``` | Font family used in this form field's text. | | | `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/java-v2/gradle.properties b/sdks/java-v2/gradle.properties index 27fa3e3af..d0446faf1 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.2-dev +VERSION_NAME=2.3-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 a6d9cf26c..a48d05cd1 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.2-dev" + artifactVersion: "2.3-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 diff --git a/sdks/java-v2/pom.xml b/sdks/java-v2/pom.xml index bea89462f..9979d4d6e 100644 --- a/sdks/java-v2/pom.xml +++ b/sdks/java-v2/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 2.2-dev + 2.3-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! diff --git a/sdks/java-v2/run-build b/sdks/java-v2/run-build index 1e1cfec3e..778da00da 100755 --- a/sdks/java-v2/run-build +++ b/sdks/java-v2/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/java" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/main/java/com/dropbox/sign/api/"*.java +rm -f "${DIR}/src/main/java/com/dropbox/sign/model/"*.java + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java index 2e78822f3..43e0fb0d3 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 @@ -159,7 +159,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.2-dev/java"); + setUserAgent("OpenAPI-Generator/2.3-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); 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 78b62840f..520358e53 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 @@ -15,7 +15,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") public class Configuration { - public static final String VERSION = "2.2-dev"; + public static final String VERSION = "2.3-dev"; private static ApiClient defaultApiClient = new ApiClient(); 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 new file mode 100644 index 000000000..e010c8323 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -0,0 +1,416 @@ +package com.dropbox.sign.api; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.ApiClient; +import com.dropbox.sign.ApiResponse; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.Pair; + +import jakarta.ws.rs.core.GenericType; + +import com.dropbox.sign.model.ErrorResponse; +import com.dropbox.sign.model.FaxGetResponse; +import com.dropbox.sign.model.FaxListResponse; +import com.dropbox.sign.model.FaxSendRequest; +import java.io.File; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +public class FaxApi { + private ApiClient apiClient; + + public FaxApi() { + this(Configuration.getDefaultApiClient()); + } + + public FaxApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete Fax. + * Deletes the specified Fax from the system. + * @param faxId Fax ID (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public void faxDelete(String faxId) throws ApiException { + faxDeleteWithHttpInfo(faxId); + } + + + /** + * Delete Fax. + * Deletes the specified Fax from the system. + * @param faxId Fax ID (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException(400, "Missing the required parameter 'faxId' when calling faxDelete"); + } + + // Path parameters + String localVarPath = "/fax/{fax_id}" + .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + return apiClient.invokeAPI( + "FaxApi.faxDelete", + localVarPath, + "DELETE", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + false + ); + } + /** + * List Fax Files. + * Returns list of fax files + * @param faxId Fax ID (required) + * @return File + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public File faxFiles(String faxId) throws ApiException { + return faxFilesWithHttpInfo(faxId).getData(); + } + + + /** + * List Fax Files. + * Returns list of fax files + * @param faxId Fax ID (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException(400, "Missing the required parameter 'faxId' when calling faxFiles"); + } + + // Path parameters + String localVarPath = "/fax/files/{fax_id}" + .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/pdf", "application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxFiles", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Get Fax. + * Returns information about fax + * @param faxId Fax ID (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxGet(String faxId) throws ApiException { + return faxGetWithHttpInfo(faxId).getData(); + } + + + /** + * Get Fax. + * Returns information about fax + * @param faxId Fax ID (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException(400, "Missing the required parameter 'faxId' when calling faxGet"); + } + + // Path parameters + String localVarPath = "/fax/{fax_id}" + .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxGet", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Lists Faxes. + * Returns properties of multiple faxes + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return FaxListResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxListResponse faxList(Integer page, Integer pageSize) throws ApiException { + return faxListWithHttpInfo(page, pageSize).getData(); + } + + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + + /** + * Lists Faxes. + * Returns properties of multiple faxes + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return ApiResponse<FaxListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxListWithHttpInfo(Integer page, Integer pageSize) throws ApiException { + + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 20; + } + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "page", page) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxList", + "/fax/list", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Send Fax. + * Action to prepare and send a fax + * @param faxSendRequest (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException { + return faxSendWithHttpInfo(faxSendRequest).getData(); + } + + + /** + * Send Fax. + * Action to prepare and send a fax + * @param faxSendRequest (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxSendWithHttpInfo(FaxSendRequest faxSendRequest) throws ApiException { + + // Check required parameters + if (faxSendRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxSendRequest' when calling faxSend"); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = faxSendRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxSend", + "/fax/send", + "POST", + new ArrayList<>(), + isFileTypeFound ? null : faxSendRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } +} \ No newline at end of file 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 98b580202..4d881a94e 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 @@ -8,6 +8,7 @@ import jakarta.ws.rs.core.GenericType; +import com.dropbox.sign.model.ErrorResponse; import com.dropbox.sign.model.OAuthTokenGenerateRequest; import com.dropbox.sign.model.OAuthTokenRefreshRequest; import com.dropbox.sign.model.OAuthTokenResponse; @@ -58,6 +59,7 @@ public void setApiClient(ApiClient apiClient) { +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenGenerate(OAuthTokenGenerateRequest oauthTokenGenerateRequest) throws ApiException { @@ -75,6 +77,7 @@ public OAuthTokenResponse oauthTokenGenerate(OAuthTokenGenerateRequest oauthToke +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenGenerateWithHttpInfo(OAuthTokenGenerateRequest oauthTokenGenerateRequest) throws ApiException { @@ -116,6 +119,7 @@ public ApiResponse oauthTokenGenerateWithHttpInfo(OAuthToken +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenRefreshRequest) throws ApiException { @@ -133,6 +137,7 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenRefreshWithHttpInfo(OAuthTokenRefreshRequest oauthTokenRefreshRequest) throws ApiException { 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 c326a36dc..711191bc9 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 @@ -184,7 +184,7 @@ public ApiResponse signatureRequestBulkSendWithTemplate } /** * 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]`. + * 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 @@ -201,7 +201,7 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio /** * 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]`. + * 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 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 7fb8db518..c64166a85 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 @@ -130,7 +130,7 @@ public ApiResponse templateAddUserWithHttpInfo(String templ ); } /** - * Create Template. + * Create Template. * Creates a template that can then be used. * @param templateCreateRequest (required) * @return TemplateCreateResponse @@ -148,7 +148,7 @@ public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreat /** - * Create Template. + * Create Template. * Creates a template that can then be used. * @param templateCreateRequest (required) * @return ApiResponse<TemplateCreateResponse> 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 04c1fe763..f8a7b6c2d 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 @@ -185,7 +185,7 @@ public AccountResponseQuotas smsVerificationsLeft(Integer smsVerificationsLeft) } /** - * SMS verifications remaining. + * SMS verifications remaining. * @return smsVerificationsLeft */ @jakarta.annotation.Nullable 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 new file mode 100644 index 000000000..7b08c8e76 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -0,0 +1,240 @@ +/* + * 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.FaxResponse; +import com.dropbox.sign.model.WarningResponse; +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.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * FaxGetResponse + */ +@JsonPropertyOrder({ + FaxGetResponse.JSON_PROPERTY_FAX, + FaxGetResponse.JSON_PROPERTY_WARNINGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class FaxGetResponse { + public static final String JSON_PROPERTY_FAX = "fax"; + private FaxResponse fax; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private List warnings = null; + + public FaxGetResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxGetResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxGetResponse.class); + } + + static public FaxGetResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxGetResponse.class + ); + } + + public FaxGetResponse fax(FaxResponse fax) { + this.fax = fax; + return this; + } + + /** + * Get fax + * @return fax + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public FaxResponse getFax() { + return fax; + } + + + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFax(FaxResponse fax) { + this.fax = fax; + } + + + public FaxGetResponse warnings(List warnings) { + this.warnings = warnings; + return this; + } + + public FaxGetResponse addWarningsItem(WarningResponse warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * A list of warnings. + * @return warnings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(List warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this FaxGetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxGetResponse faxGetResponse = (FaxGetResponse) o; + return Objects.equals(this.fax, faxGetResponse.fax) && + Objects.equals(this.warnings, faxGetResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(fax, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxGetResponse {\n"); + sb.append(" fax: ").append(toIndentedString(fax)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (fax != null) { + if (isFileTypeOrListOfFiles(fax)) { + fileTypeFound = true; + } + + if (fax.getClass().equals(java.io.File.class) || + fax.getClass().equals(Integer.class) || + fax.getClass().equals(String.class) || + fax.getClass().isEnum()) { + map.put("fax", fax); + } else if (isListOfFile(fax)) { + for(int i = 0; i< getListSize(fax); i++) { + map.put("fax[" + i + "]", getFromList(fax, i)); + } + } + else { + map.put("fax", JSON.getDefault().getMapper().writeValueAsString(fax)); + } + } + if (warnings != null) { + if (isFileTypeOrListOfFiles(warnings)) { + fileTypeFound = true; + } + + if (warnings.getClass().equals(java.io.File.class) || + warnings.getClass().equals(Integer.class) || + warnings.getClass().equals(String.class) || + warnings.getClass().isEnum()) { + map.put("warnings", warnings); + } else if (isListOfFile(warnings)) { + for(int i = 0; i< getListSize(warnings); i++) { + map.put("warnings[" + i + "]", getFromList(warnings, i)); + } + } + else { + map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/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 new file mode 100644 index 000000000..13c0d94e3 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -0,0 +1,240 @@ +/* + * 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.FaxResponse; +import com.dropbox.sign.model.ListInfoResponse; +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.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * FaxListResponse + */ +@JsonPropertyOrder({ + FaxListResponse.JSON_PROPERTY_FAXES, + FaxListResponse.JSON_PROPERTY_LIST_INFO +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class FaxListResponse { + public static final String JSON_PROPERTY_FAXES = "faxes"; + private List faxes = new ArrayList<>(); + + public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + private ListInfoResponse listInfo; + + public FaxListResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxListResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxListResponse.class); + } + + static public FaxListResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxListResponse.class + ); + } + + public FaxListResponse faxes(List faxes) { + this.faxes = faxes; + return this; + } + + public FaxListResponse addFaxesItem(FaxResponse faxesItem) { + if (this.faxes == null) { + this.faxes = new ArrayList<>(); + } + this.faxes.add(faxesItem); + return this; + } + + /** + * Get faxes + * @return faxes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getFaxes() { + return faxes; + } + + + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxes(List faxes) { + this.faxes = faxes; + } + + + public FaxListResponse listInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + return this; + } + + /** + * Get listInfo + * @return listInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ListInfoResponse getListInfo() { + return listInfo; + } + + + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setListInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + } + + + /** + * Return true if this FaxListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxListResponse faxListResponse = (FaxListResponse) o; + return Objects.equals(this.faxes, faxListResponse.faxes) && + Objects.equals(this.listInfo, faxListResponse.listInfo); + } + + @Override + public int hashCode() { + return Objects.hash(faxes, listInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxListResponse {\n"); + sb.append(" faxes: ").append(toIndentedString(faxes)).append("\n"); + sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxes != null) { + if (isFileTypeOrListOfFiles(faxes)) { + fileTypeFound = true; + } + + if (faxes.getClass().equals(java.io.File.class) || + faxes.getClass().equals(Integer.class) || + faxes.getClass().equals(String.class) || + faxes.getClass().isEnum()) { + map.put("faxes", faxes); + } else if (isListOfFile(faxes)) { + for(int i = 0; i< getListSize(faxes); i++) { + map.put("faxes[" + i + "]", getFromList(faxes, i)); + } + } + else { + map.put("faxes", JSON.getDefault().getMapper().writeValueAsString(faxes)); + } + } + if (listInfo != null) { + if (isFileTypeOrListOfFiles(listInfo)) { + fileTypeFound = true; + } + + if (listInfo.getClass().equals(java.io.File.class) || + listInfo.getClass().equals(Integer.class) || + listInfo.getClass().equals(String.class) || + listInfo.getClass().isEnum()) { + map.put("list_info", listInfo); + } else if (isListOfFile(listInfo)) { + for(int i = 0; i< getListSize(listInfo); i++) { + map.put("list_info[" + i + "]", getFromList(listInfo, i)); + } + } + else { + map.put("list_info", JSON.getDefault().getMapper().writeValueAsString(listInfo)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/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 new file mode 100644 index 000000000..35f4ffc6a --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -0,0 +1,649 @@ +/* + * 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.FaxResponseTransmission; +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.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; +/** + * FaxResponse + */ +@JsonPropertyOrder({ + FaxResponse.JSON_PROPERTY_FAX_ID, + FaxResponse.JSON_PROPERTY_TITLE, + FaxResponse.JSON_PROPERTY_ORIGINAL_TITLE, + FaxResponse.JSON_PROPERTY_SUBJECT, + FaxResponse.JSON_PROPERTY_MESSAGE, + FaxResponse.JSON_PROPERTY_METADATA, + FaxResponse.JSON_PROPERTY_CREATED_AT, + FaxResponse.JSON_PROPERTY_SENDER, + FaxResponse.JSON_PROPERTY_TRANSMISSIONS, + FaxResponse.JSON_PROPERTY_FILES_URL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class FaxResponse { + public static final String JSON_PROPERTY_FAX_ID = "fax_id"; + private String faxId; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + private String originalTitle; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Integer createdAt; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + private List transmissions = new ArrayList<>(); + + public static final String JSON_PROPERTY_FILES_URL = "files_url"; + private String filesUrl; + + public FaxResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponse.class); + } + + static public FaxResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxResponse.class + ); + } + + public FaxResponse faxId(String faxId) { + this.faxId = faxId; + return this; + } + + /** + * Fax ID + * @return faxId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFaxId() { + return faxId; + } + + + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxId(String faxId) { + this.faxId = faxId; + } + + + public FaxResponse title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * @return title + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(String title) { + this.title = title; + } + + + public FaxResponse originalTitle(String originalTitle) { + this.originalTitle = originalTitle; + return this; + } + + /** + * Fax Original Title + * @return originalTitle + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOriginalTitle() { + return originalTitle; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOriginalTitle(String originalTitle) { + this.originalTitle = originalTitle; + } + + + public FaxResponse subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Fax Subject + * @return subject + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSubject() { + return subject; + } + + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubject(String subject) { + this.subject = subject; + } + + + public FaxResponse message(String message) { + this.message = message; + return this; + } + + /** + * Fax Message + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + + public FaxResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public FaxResponse putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Fax Metadata + * @return metadata + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + + public FaxResponse createdAt(Integer createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Fax Created At Timestamp + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(Integer createdAt) { + this.createdAt = createdAt; + } + + + public FaxResponse sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Sender Email + * @return sender + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSender() { + return sender; + } + + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + + public FaxResponse transmissions(List transmissions) { + this.transmissions = transmissions; + return this; + } + + public FaxResponse addTransmissionsItem(FaxResponseTransmission transmissionsItem) { + if (this.transmissions == null) { + this.transmissions = new ArrayList<>(); + } + this.transmissions.add(transmissionsItem); + return this; + } + + /** + * Fax Transmissions List + * @return transmissions + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTransmissions() { + return transmissions; + } + + + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransmissions(List transmissions) { + this.transmissions = transmissions; + } + + + public FaxResponse filesUrl(String filesUrl) { + this.filesUrl = filesUrl; + return this; + } + + /** + * Fax Files URL + * @return filesUrl + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getFilesUrl() { + return filesUrl; + } + + + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilesUrl(String filesUrl) { + this.filesUrl = filesUrl; + } + + + /** + * Return true if this FaxResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponse faxResponse = (FaxResponse) o; + return Objects.equals(this.faxId, faxResponse.faxId) && + Objects.equals(this.title, faxResponse.title) && + Objects.equals(this.originalTitle, faxResponse.originalTitle) && + Objects.equals(this.subject, faxResponse.subject) && + Objects.equals(this.message, faxResponse.message) && + Objects.equals(this.metadata, faxResponse.metadata) && + Objects.equals(this.createdAt, faxResponse.createdAt) && + Objects.equals(this.sender, faxResponse.sender) && + Objects.equals(this.transmissions, faxResponse.transmissions) && + Objects.equals(this.filesUrl, faxResponse.filesUrl); + } + + @Override + public int hashCode() { + return Objects.hash(faxId, title, originalTitle, subject, message, metadata, createdAt, sender, transmissions, filesUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponse {\n"); + sb.append(" faxId: ").append(toIndentedString(faxId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" transmissions: ").append(toIndentedString(transmissions)).append("\n"); + sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxId != null) { + if (isFileTypeOrListOfFiles(faxId)) { + fileTypeFound = true; + } + + if (faxId.getClass().equals(java.io.File.class) || + faxId.getClass().equals(Integer.class) || + faxId.getClass().equals(String.class) || + faxId.getClass().isEnum()) { + map.put("fax_id", faxId); + } else if (isListOfFile(faxId)) { + for(int i = 0; i< getListSize(faxId); i++) { + map.put("fax_id[" + i + "]", getFromList(faxId, i)); + } + } + else { + map.put("fax_id", JSON.getDefault().getMapper().writeValueAsString(faxId)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) || + title.getClass().equals(Integer.class) || + title.getClass().equals(String.class) || + title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for(int i = 0; i< getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } + else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + if (originalTitle != null) { + if (isFileTypeOrListOfFiles(originalTitle)) { + fileTypeFound = true; + } + + if (originalTitle.getClass().equals(java.io.File.class) || + originalTitle.getClass().equals(Integer.class) || + originalTitle.getClass().equals(String.class) || + originalTitle.getClass().isEnum()) { + map.put("original_title", originalTitle); + } else if (isListOfFile(originalTitle)) { + for(int i = 0; i< getListSize(originalTitle); i++) { + map.put("original_title[" + i + "]", getFromList(originalTitle, i)); + } + } + else { + map.put("original_title", JSON.getDefault().getMapper().writeValueAsString(originalTitle)); + } + } + if (subject != null) { + if (isFileTypeOrListOfFiles(subject)) { + fileTypeFound = true; + } + + if (subject.getClass().equals(java.io.File.class) || + subject.getClass().equals(Integer.class) || + subject.getClass().equals(String.class) || + subject.getClass().isEnum()) { + map.put("subject", subject); + } else if (isListOfFile(subject)) { + for(int i = 0; i< getListSize(subject); i++) { + map.put("subject[" + i + "]", getFromList(subject, i)); + } + } + else { + map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); + } + } + if (message != null) { + if (isFileTypeOrListOfFiles(message)) { + fileTypeFound = true; + } + + if (message.getClass().equals(java.io.File.class) || + message.getClass().equals(Integer.class) || + message.getClass().equals(String.class) || + message.getClass().isEnum()) { + map.put("message", message); + } else if (isListOfFile(message)) { + for(int i = 0; i< getListSize(message); i++) { + map.put("message[" + i + "]", getFromList(message, i)); + } + } + else { + map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); + } + } + if (metadata != null) { + if (isFileTypeOrListOfFiles(metadata)) { + fileTypeFound = true; + } + + if (metadata.getClass().equals(java.io.File.class) || + metadata.getClass().equals(Integer.class) || + metadata.getClass().equals(String.class) || + metadata.getClass().isEnum()) { + map.put("metadata", metadata); + } else if (isListOfFile(metadata)) { + for(int i = 0; i< getListSize(metadata); i++) { + map.put("metadata[" + i + "]", getFromList(metadata, i)); + } + } + else { + map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); + } + } + if (createdAt != null) { + if (isFileTypeOrListOfFiles(createdAt)) { + fileTypeFound = true; + } + + if (createdAt.getClass().equals(java.io.File.class) || + createdAt.getClass().equals(Integer.class) || + createdAt.getClass().equals(String.class) || + createdAt.getClass().isEnum()) { + map.put("created_at", createdAt); + } else if (isListOfFile(createdAt)) { + for(int i = 0; i< getListSize(createdAt); i++) { + map.put("created_at[" + i + "]", getFromList(createdAt, i)); + } + } + else { + map.put("created_at", JSON.getDefault().getMapper().writeValueAsString(createdAt)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) || + sender.getClass().equals(Integer.class) || + sender.getClass().equals(String.class) || + sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for(int i = 0; i< getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } + else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (transmissions != null) { + if (isFileTypeOrListOfFiles(transmissions)) { + fileTypeFound = true; + } + + if (transmissions.getClass().equals(java.io.File.class) || + transmissions.getClass().equals(Integer.class) || + transmissions.getClass().equals(String.class) || + transmissions.getClass().isEnum()) { + map.put("transmissions", transmissions); + } else if (isListOfFile(transmissions)) { + for(int i = 0; i< getListSize(transmissions); i++) { + map.put("transmissions[" + i + "]", getFromList(transmissions, i)); + } + } + else { + map.put("transmissions", JSON.getDefault().getMapper().writeValueAsString(transmissions)); + } + } + if (filesUrl != null) { + if (isFileTypeOrListOfFiles(filesUrl)) { + fileTypeFound = true; + } + + if (filesUrl.getClass().equals(java.io.File.class) || + filesUrl.getClass().equals(Integer.class) || + filesUrl.getClass().equals(String.class) || + filesUrl.getClass().isEnum()) { + map.put("files_url", filesUrl); + } else if (isListOfFile(filesUrl)) { + for(int i = 0; i< getListSize(filesUrl); i++) { + map.put("files_url[" + i + "]", getFromList(filesUrl, i)); + } + } + else { + map.put("files_url", JSON.getDefault().getMapper().writeValueAsString(filesUrl)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/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 new file mode 100644 index 000000000..dc7bb06a4 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -0,0 +1,375 @@ +/* + * 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.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.util.Arrays; +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; +/** + * FaxResponseTransmission + */ +@JsonPropertyOrder({ + FaxResponseTransmission.JSON_PROPERTY_RECIPIENT, + FaxResponseTransmission.JSON_PROPERTY_SENDER, + 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") +@JsonIgnoreProperties(ignoreUnknown=true) +public class FaxResponseTransmission { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + /** + * Fax Transmission Status Code + */ + public enum StatusCodeEnum { + SUCCESS("success"), + + TRANSMITTING("transmitting"), + + ERROR_COULD_NOT_FAX("error_could_not_fax"), + + ERROR_UNKNOWN("error_unknown"), + + ERROR_BUSY("error_busy"), + + ERROR_NO_ANSWER("error_no_answer"), + + ERROR_DISCONNECTED("error_disconnected"), + + ERROR_BAD_DESTINATION("error_bad_destination"); + + private String value; + + StatusCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCodeEnum fromValue(String value) { + for (StatusCodeEnum b : StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; + private StatusCodeEnum statusCode; + + public static final String JSON_PROPERTY_SENT_AT = "sent_at"; + private Integer sentAt; + + public FaxResponseTransmission() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxResponseTransmission init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponseTransmission.class); + } + + static public FaxResponseTransmission init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxResponseTransmission.class + ); + } + + public FaxResponseTransmission recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Transmission Recipient + * @return recipient + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRecipient() { + return recipient; + } + + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + + public FaxResponseTransmission sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Transmission Sender + * @return sender + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getSender() { + return sender; + } + + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + + public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Fax Transmission Status Code + * @return statusCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public StatusCodeEnum getStatusCode() { + return statusCode; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + } + + + public FaxResponseTransmission sentAt(Integer sentAt) { + this.sentAt = sentAt; + return this; + } + + /** + * Fax Transmission Sent Timestamp + * @return sentAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getSentAt() { + return sentAt; + } + + + @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSentAt(Integer sentAt) { + this.sentAt = sentAt; + } + + + /** + * Return true if this FaxResponseTransmission object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponseTransmission faxResponseTransmission = (FaxResponseTransmission) o; + return Objects.equals(this.recipient, faxResponseTransmission.recipient) && + Objects.equals(this.sender, faxResponseTransmission.sender) && + Objects.equals(this.statusCode, faxResponseTransmission.statusCode) && + Objects.equals(this.sentAt, faxResponseTransmission.sentAt); + } + + @Override + public int hashCode() { + return Objects.hash(recipient, sender, statusCode, sentAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponseTransmission {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" sentAt: ").append(toIndentedString(sentAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) || + recipient.getClass().equals(Integer.class) || + recipient.getClass().equals(String.class) || + recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for(int i = 0; i< getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } + else { + map.put("recipient", JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) || + sender.getClass().equals(Integer.class) || + sender.getClass().equals(String.class) || + sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for(int i = 0; i< getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } + else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (statusCode != null) { + if (isFileTypeOrListOfFiles(statusCode)) { + fileTypeFound = true; + } + + if (statusCode.getClass().equals(java.io.File.class) || + statusCode.getClass().equals(Integer.class) || + statusCode.getClass().equals(String.class) || + statusCode.getClass().isEnum()) { + map.put("status_code", statusCode); + } else if (isListOfFile(statusCode)) { + for(int i = 0; i< getListSize(statusCode); i++) { + map.put("status_code[" + i + "]", getFromList(statusCode, i)); + } + } + else { + map.put("status_code", JSON.getDefault().getMapper().writeValueAsString(statusCode)); + } + } + if (sentAt != null) { + if (isFileTypeOrListOfFiles(sentAt)) { + fileTypeFound = true; + } + + if (sentAt.getClass().equals(java.io.File.class) || + sentAt.getClass().equals(Integer.class) || + sentAt.getClass().equals(String.class) || + sentAt.getClass().isEnum()) { + map.put("sent_at", sentAt); + } else if (isListOfFile(sentAt)) { + for(int i = 0; i< getListSize(sentAt); i++) { + map.put("sent_at[" + i + "]", getFromList(sentAt, i)); + } + } + else { + map.put("sent_at", JSON.getDefault().getMapper().writeValueAsString(sentAt)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/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 new file mode 100644 index 000000000..bb4a6e8a1 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -0,0 +1,597 @@ +/* + * 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.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.List; +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; +/** + * FaxSendRequest + */ +@JsonPropertyOrder({ + FaxSendRequest.JSON_PROPERTY_RECIPIENT, + FaxSendRequest.JSON_PROPERTY_SENDER, + FaxSendRequest.JSON_PROPERTY_FILES, + FaxSendRequest.JSON_PROPERTY_FILE_URLS, + FaxSendRequest.JSON_PROPERTY_TEST_MODE, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_TO, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_FROM, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_MESSAGE, + FaxSendRequest.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class FaxSendRequest { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + private List fileUrls = null; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + private Boolean testMode = false; + + public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; + private String coverPageTo; + + public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; + private String coverPageFrom; + + public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; + private String coverPageMessage; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public FaxSendRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxSendRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxSendRequest.class); + } + + static public FaxSendRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxSendRequest.class + ); + } + + public FaxSendRequest recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Send To Recipient + * @return recipient + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRecipient() { + return recipient; + } + + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + + public FaxSendRequest sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Send From Sender (used only with fax number) + * @return sender + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSender() { + return sender; + } + + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSender(String sender) { + this.sender = sender; + } + + + public FaxSendRequest files(List files) { + this.files = files; + return this; + } + + public FaxSendRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Fax File to Send + * @return files + */ + @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(List files) { + this.files = files; + } + + + public FaxSendRequest fileUrls(List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Fax File URL to Send + * @return fileUrls + */ + @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(List fileUrls) { + this.fileUrls = fileUrls; + } + + + public FaxSendRequest testMode(Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * API Test Mode Setting + * @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(Boolean testMode) { + this.testMode = testMode; + } + + + public FaxSendRequest coverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + return this; + } + + /** + * Fax Cover Page for Recipient + * @return coverPageTo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCoverPageTo() { + return coverPageTo; + } + + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + } + + + public FaxSendRequest coverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + return this; + } + + /** + * Fax Cover Page for Sender + * @return coverPageFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCoverPageFrom() { + return coverPageFrom; + } + + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + } + + + public FaxSendRequest coverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + return this; + } + + /** + * Fax Cover Page Message + * @return coverPageMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCoverPageMessage() { + return coverPageMessage; + } + + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + } + + + public FaxSendRequest title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * @return title + */ + @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(String title) { + this.title = title; + } + + + /** + * Return true if this FaxSendRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxSendRequest faxSendRequest = (FaxSendRequest) o; + return Objects.equals(this.recipient, faxSendRequest.recipient) && + Objects.equals(this.sender, faxSendRequest.sender) && + Objects.equals(this.files, faxSendRequest.files) && + Objects.equals(this.fileUrls, faxSendRequest.fileUrls) && + Objects.equals(this.testMode, faxSendRequest.testMode) && + Objects.equals(this.coverPageTo, faxSendRequest.coverPageTo) && + Objects.equals(this.coverPageFrom, faxSendRequest.coverPageFrom) && + Objects.equals(this.coverPageMessage, faxSendRequest.coverPageMessage) && + Objects.equals(this.title, faxSendRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash(recipient, sender, files, fileUrls, testMode, coverPageTo, coverPageFrom, coverPageMessage, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxSendRequest {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" coverPageTo: ").append(toIndentedString(coverPageTo)).append("\n"); + sb.append(" coverPageFrom: ").append(toIndentedString(coverPageFrom)).append("\n"); + sb.append(" coverPageMessage: ").append(toIndentedString(coverPageMessage)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) || + recipient.getClass().equals(Integer.class) || + recipient.getClass().equals(String.class) || + recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for(int i = 0; i< getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } + else { + map.put("recipient", JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) || + sender.getClass().equals(Integer.class) || + sender.getClass().equals(String.class) || + sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for(int i = 0; i< getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } + else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (files != null) { + if (isFileTypeOrListOfFiles(files)) { + fileTypeFound = true; + } + + if (files.getClass().equals(java.io.File.class) || + files.getClass().equals(Integer.class) || + files.getClass().equals(String.class) || + files.getClass().isEnum()) { + map.put("files", files); + } else if (isListOfFile(files)) { + for(int i = 0; i< getListSize(files); i++) { + map.put("files[" + i + "]", getFromList(files, i)); + } + } + else { + map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); + } + } + if (fileUrls != null) { + if (isFileTypeOrListOfFiles(fileUrls)) { + fileTypeFound = true; + } + + if (fileUrls.getClass().equals(java.io.File.class) || + fileUrls.getClass().equals(Integer.class) || + fileUrls.getClass().equals(String.class) || + fileUrls.getClass().isEnum()) { + map.put("file_urls", fileUrls); + } else if (isListOfFile(fileUrls)) { + for(int i = 0; i< getListSize(fileUrls); i++) { + map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); + } + } + else { + map.put("file_urls", JSON.getDefault().getMapper().writeValueAsString(fileUrls)); + } + } + if (testMode != null) { + if (isFileTypeOrListOfFiles(testMode)) { + fileTypeFound = true; + } + + if (testMode.getClass().equals(java.io.File.class) || + testMode.getClass().equals(Integer.class) || + testMode.getClass().equals(String.class) || + testMode.getClass().isEnum()) { + map.put("test_mode", testMode); + } else if (isListOfFile(testMode)) { + for(int i = 0; i< getListSize(testMode); i++) { + map.put("test_mode[" + i + "]", getFromList(testMode, i)); + } + } + else { + map.put("test_mode", JSON.getDefault().getMapper().writeValueAsString(testMode)); + } + } + if (coverPageTo != null) { + if (isFileTypeOrListOfFiles(coverPageTo)) { + fileTypeFound = true; + } + + if (coverPageTo.getClass().equals(java.io.File.class) || + coverPageTo.getClass().equals(Integer.class) || + coverPageTo.getClass().equals(String.class) || + coverPageTo.getClass().isEnum()) { + map.put("cover_page_to", coverPageTo); + } else if (isListOfFile(coverPageTo)) { + for(int i = 0; i< getListSize(coverPageTo); i++) { + map.put("cover_page_to[" + i + "]", getFromList(coverPageTo, i)); + } + } + else { + map.put("cover_page_to", JSON.getDefault().getMapper().writeValueAsString(coverPageTo)); + } + } + if (coverPageFrom != null) { + if (isFileTypeOrListOfFiles(coverPageFrom)) { + fileTypeFound = true; + } + + if (coverPageFrom.getClass().equals(java.io.File.class) || + coverPageFrom.getClass().equals(Integer.class) || + coverPageFrom.getClass().equals(String.class) || + coverPageFrom.getClass().isEnum()) { + map.put("cover_page_from", coverPageFrom); + } else if (isListOfFile(coverPageFrom)) { + for(int i = 0; i< getListSize(coverPageFrom); i++) { + map.put("cover_page_from[" + i + "]", getFromList(coverPageFrom, i)); + } + } + else { + map.put("cover_page_from", JSON.getDefault().getMapper().writeValueAsString(coverPageFrom)); + } + } + if (coverPageMessage != null) { + if (isFileTypeOrListOfFiles(coverPageMessage)) { + fileTypeFound = true; + } + + if (coverPageMessage.getClass().equals(java.io.File.class) || + coverPageMessage.getClass().equals(Integer.class) || + coverPageMessage.getClass().equals(String.class) || + coverPageMessage.getClass().isEnum()) { + map.put("cover_page_message", coverPageMessage); + } else if (isListOfFile(coverPageMessage)) { + for(int i = 0; i< getListSize(coverPageMessage); i++) { + map.put("cover_page_message[" + i + "]", getFromList(coverPageMessage, i)); + } + } + else { + map.put("cover_page_message", JSON.getDefault().getMapper().writeValueAsString(coverPageMessage)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) || + title.getClass().equals(Integer.class) || + title.getClass().equals(String.class) || + title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for(int i = 0; i< getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } + else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/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 28eb1cdfb..fafe689fc 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 @@ -34,7 +34,9 @@ */ @JsonPropertyOrder({ OAuthTokenRefreshRequest.JSON_PROPERTY_GRANT_TYPE, - OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN + OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_ID, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_SECRET }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties(ignoreUnknown=true) @@ -45,6 +47,12 @@ public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; private String refreshToken; + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + public OAuthTokenRefreshRequest() { } @@ -113,6 +121,56 @@ public void setRefreshToken(String refreshToken) { } + public OAuthTokenRefreshRequest clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + * @return clientId + */ + @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(String clientId) { + this.clientId = clientId; + } + + + public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + * @return clientSecret + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getClientSecret() { + return clientSecret; + } + + + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + /** * Return true if this OAuthTokenRefreshRequest object is equal to o. */ @@ -126,12 +184,14 @@ public boolean equals(Object o) { } OAuthTokenRefreshRequest oauthTokenRefreshRequest = (OAuthTokenRefreshRequest) o; return Objects.equals(this.grantType, oauthTokenRefreshRequest.grantType) && - Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken); + Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken) && + Objects.equals(this.clientId, oauthTokenRefreshRequest.clientId) && + Objects.equals(this.clientSecret, oauthTokenRefreshRequest.clientSecret); } @Override public int hashCode() { - return Objects.hash(grantType, refreshToken); + return Objects.hash(grantType, refreshToken, clientId, clientSecret); } @Override @@ -140,6 +200,8 @@ public String toString() { sb.append("class OAuthTokenRefreshRequest {\n"); sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); sb.append("}"); return sb.toString(); } @@ -186,6 +248,44 @@ public Map createFormData() throws ApiException { map.put("refresh_token", JSON.getDefault().getMapper().writeValueAsString(refreshToken)); } } + if (clientId != null) { + if (isFileTypeOrListOfFiles(clientId)) { + fileTypeFound = true; + } + + if (clientId.getClass().equals(java.io.File.class) || + clientId.getClass().equals(Integer.class) || + clientId.getClass().equals(String.class) || + clientId.getClass().isEnum()) { + map.put("client_id", clientId); + } else if (isListOfFile(clientId)) { + for(int i = 0; i< getListSize(clientId); i++) { + map.put("client_id[" + i + "]", getFromList(clientId, i)); + } + } + else { + map.put("client_id", JSON.getDefault().getMapper().writeValueAsString(clientId)); + } + } + if (clientSecret != null) { + if (isFileTypeOrListOfFiles(clientSecret)) { + fileTypeFound = true; + } + + if (clientSecret.getClass().equals(java.io.File.class) || + clientSecret.getClass().equals(Integer.class) || + clientSecret.getClass().equals(String.class) || + clientSecret.getClass().isEnum()) { + map.put("client_secret", clientSecret); + } else if (isListOfFile(clientSecret)) { + for(int i = 0; i< getListSize(clientSecret); i++) { + map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); + } + } + else { + map.put("client_secret", JSON.getDefault().getMapper().writeValueAsString(clientSecret)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 4f0a57b1f..a14d8cc1a 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 @@ -53,7 +53,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1A1A1A"; + private String headerBackgroundColor = "#1a1a1a"; /** * Gets or Sets legalVersion @@ -94,40 +94,40 @@ public static LegalVersionEnum fromValue(String value) { private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#00B3E6"; + private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#F7F8F9"; + private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#00B3E6"; + private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover = "#00B3E6"; + private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor = "#FFFFFF"; + private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#FFFFFF"; + private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#FFFFFF"; + private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#FFFFFF"; + private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor = "#00B3E6"; + private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#00B3E6"; + private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#FFFFFF"; + private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; private Boolean resetToDefault; diff --git a/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 577975bea..5924befa8 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 @@ -16,6 +16,7 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.dropbox.sign.model.SignatureRequestResponseAttachment; import com.dropbox.sign.model.TemplateResponseAccount; import com.dropbox.sign.model.TemplateResponseCCRole; import com.dropbox.sign.model.TemplateResponseDocument; @@ -55,7 +56,8 @@ TemplateResponse.JSON_PROPERTY_DOCUMENTS, TemplateResponse.JSON_PROPERTY_CUSTOM_FIELDS, TemplateResponse.JSON_PROPERTY_NAMED_FORM_FIELDS, - TemplateResponse.JSON_PROPERTY_ACCOUNTS + TemplateResponse.JSON_PROPERTY_ACCOUNTS, + TemplateResponse.JSON_PROPERTY_ATTACHMENTS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties(ignoreUnknown=true) @@ -107,6 +109,9 @@ public class TemplateResponse { public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; private List accounts = null; + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private List attachments = null; + public TemplateResponse() { } @@ -231,7 +236,7 @@ public TemplateResponse isEmbedded(Boolean isEmbedded) { } /** - * `true` if this template was created using an embedded flow, `false` if it was created on our website. + * `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. * @return isEmbedded */ @jakarta.annotation.Nullable @@ -556,6 +561,39 @@ public void setAccounts(List accounts) { } + public TemplateResponse attachments(List attachments) { + this.attachments = attachments; + return this; + } + + public TemplateResponse addAttachmentsItem(SignatureRequestResponseAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Signer attachments. + * @return attachments + */ + @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(List attachments) { + this.attachments = attachments; + } + + /** * Return true if this TemplateResponse object is equal to o. */ @@ -582,12 +620,13 @@ public boolean equals(Object o) { Objects.equals(this.documents, templateResponse.documents) && Objects.equals(this.customFields, templateResponse.customFields) && Objects.equals(this.namedFormFields, templateResponse.namedFormFields) && - Objects.equals(this.accounts, templateResponse.accounts); + Objects.equals(this.accounts, templateResponse.accounts) && + Objects.equals(this.attachments, templateResponse.attachments); } @Override public int hashCode() { - return Objects.hash(templateId, title, message, updatedAt, isEmbedded, isCreator, canEdit, isLocked, metadata, signerRoles, ccRoles, documents, customFields, namedFormFields, accounts); + return Objects.hash(templateId, title, message, updatedAt, isEmbedded, isCreator, canEdit, isLocked, metadata, signerRoles, ccRoles, documents, customFields, namedFormFields, accounts, attachments); } @Override @@ -609,6 +648,7 @@ public String toString() { sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" namedFormFields: ").append(toIndentedString(namedFormFields)).append("\n"); sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); sb.append("}"); return sb.toString(); } @@ -902,6 +942,25 @@ public Map createFormData() throws ApiException { map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); } } + if (attachments != null) { + if (isFileTypeOrListOfFiles(attachments)) { + fileTypeFound = true; + } + + if (attachments.getClass().equals(java.io.File.class) || + attachments.getClass().equals(Integer.class) || + attachments.getClass().equals(String.class) || + attachments.getClass().isEnum()) { + map.put("attachments", attachments); + } else if (isListOfFile(attachments)) { + for(int i = 0; i< getListSize(attachments); i++) { + map.put("attachments[" + i + "]", getFromList(attachments, i)); + } + } + else { + map.put("attachments", JSON.getDefault().getMapper().writeValueAsString(attachments)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 cbef92e0f..25ee2dc73 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 @@ -44,8 +44,7 @@ TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_Y, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_WIDTH, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_GROUP + TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -92,9 +91,6 @@ public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_REQUIRED = "required"; private Boolean required; - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - public TemplateResponseDocumentFormFieldBase() { } @@ -346,31 +342,6 @@ public void setRequired(Boolean required) { } - public TemplateResponseDocumentFormFieldBase group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - * @return group - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getGroup() { - return group; - } - - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** * Return true if this TemplateResponseDocumentFormFieldBase object is equal to o. */ @@ -391,13 +362,12 @@ public boolean equals(Object o) { Objects.equals(this.y, templateResponseDocumentFormFieldBase.y) && Objects.equals(this.width, templateResponseDocumentFormFieldBase.width) && Objects.equals(this.height, templateResponseDocumentFormFieldBase.height) && - Objects.equals(this.required, templateResponseDocumentFormFieldBase.required) && - Objects.equals(this.group, templateResponseDocumentFormFieldBase.group); + Objects.equals(this.required, templateResponseDocumentFormFieldBase.required); } @Override public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required, group); + return Objects.hash(type, apiId, name, signer, x, y, width, height, required); } @Override @@ -413,7 +383,6 @@ public String toString() { sb.append(" width: ").append(toIndentedString(width)).append("\n"); sb.append(" height: ").append(toIndentedString(height)).append("\n"); sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -593,25 +562,6 @@ public Map createFormData() throws ApiException { map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); } } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) || - group.getClass().equals(Integer.class) || - group.getClass().equals(String.class) || - group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for(int i = 0; i< getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } - else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 8354a7a23..110468a28 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseD public static final String JSON_PROPERTY_TYPE = "type"; private String type = "checkbox"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldCheckbox() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldCheckbox group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldCheckbox object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldCheckbox templateResponseDocumentFormFieldCheckbox = (TemplateResponseDocumentFormFieldCheckbox) o; return Objects.equals(this.type, templateResponseDocumentFormFieldCheckbox.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldCheckbox.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldCheckbox {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 202991168..67ec89a5c 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldDateSigned extends TemplateRespons public static final String JSON_PROPERTY_TYPE = "type"; private String type = "date_signed"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDateSigned() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldDateSigned group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldDateSigned object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldDateSigned templateResponseDocumentFormFieldDateSigned = (TemplateResponseDocumentFormFieldDateSigned) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDateSigned.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldDateSigned.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDateSigned {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 ca033ad09..8003f4c05 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseD public static final String JSON_PROPERTY_TYPE = "type"; private String type = "dropdown"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDropdown() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldDropdown group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldDropdown templateResponseDocumentFormFieldDropdown = (TemplateResponseDocumentFormFieldDropdown) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDropdown.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldDropdown.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDropdown {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 acaa254b4..6ce907e55 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 @@ -42,7 +42,8 @@ TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_AVG_TEXT_LENGTH, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY, + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -67,6 +68,9 @@ public class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponse public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; private String fontFamily; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldHyperlink() { } @@ -210,6 +214,31 @@ public void setFontFamily(String fontFamily) { } + public TemplateResponseDocumentFormFieldHyperlink group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldHyperlink object is equal to o. */ @@ -227,12 +256,13 @@ public boolean equals(Object o) { Objects.equals(this.isMultiline, templateResponseDocumentFormFieldHyperlink.isMultiline) && Objects.equals(this.originalFontSize, templateResponseDocumentFormFieldHyperlink.originalFontSize) && Objects.equals(this.fontFamily, templateResponseDocumentFormFieldHyperlink.fontFamily) && + Objects.equals(this.group, templateResponseDocumentFormFieldHyperlink.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, super.hashCode()); + return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, group, super.hashCode()); } @Override @@ -245,6 +275,7 @@ public String toString() { sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -349,6 +380,25 @@ public Map createFormData() throws ApiException { map.put("fontFamily", JSON.getDefault().getMapper().writeValueAsString(fontFamily)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 749d70157..7aa96f533 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldInitials extends TemplateResponseD public static final String JSON_PROPERTY_TYPE = "type"; private String type = "initials"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldInitials() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldInitials group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldInitials object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldInitials templateResponseDocumentFormFieldInitials = (TemplateResponseDocumentFormFieldInitials) o; return Objects.equals(this.type, templateResponseDocumentFormFieldInitials.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldInitials.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldInitials {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 aa71ef521..5e9365793 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocu public static final String JSON_PROPERTY_TYPE = "type"; private String type = "radio"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldRadio() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldRadio group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldRadio object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldRadio templateResponseDocumentFormFieldRadio = (TemplateResponseDocumentFormFieldRadio) o; return Objects.equals(this.type, templateResponseDocumentFormFieldRadio.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldRadio.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldRadio {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 9ff154afe..ac0a0c321 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 @@ -37,7 +37,8 @@ * This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ - TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -50,6 +51,9 @@ public class TemplateResponseDocumentFormFieldSignature extends TemplateResponse public static final String JSON_PROPERTY_TYPE = "type"; private String type = "signature"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldSignature() { } @@ -93,6 +97,31 @@ public void setType(String type) { } + public TemplateResponseDocumentFormFieldSignature group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldSignature object is equal to o. */ @@ -106,12 +135,13 @@ public boolean equals(Object o) { } TemplateResponseDocumentFormFieldSignature templateResponseDocumentFormFieldSignature = (TemplateResponseDocumentFormFieldSignature) o; return Objects.equals(this.type, templateResponseDocumentFormFieldSignature.type) && + Objects.equals(this.group, templateResponseDocumentFormFieldSignature.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -120,6 +150,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldSignature {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -148,6 +179,25 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/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 db2192813..db5fce4c8 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 @@ -43,7 +43,8 @@ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_FONT_FAMILY, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE, + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @JsonIgnoreProperties( @@ -122,6 +123,9 @@ public static ValidationTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; private ValidationTypeEnum validationType; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldText() { } @@ -290,6 +294,31 @@ public void setValidationType(ValidationTypeEnum validationType) { } + public TemplateResponseDocumentFormFieldText group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getGroup() { + return group; + } + + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + + /** * Return true if this TemplateResponseDocumentFormFieldText object is equal to o. */ @@ -308,12 +337,13 @@ public boolean equals(Object o) { Objects.equals(this.originalFontSize, templateResponseDocumentFormFieldText.originalFontSize) && Objects.equals(this.fontFamily, templateResponseDocumentFormFieldText.fontFamily) && Objects.equals(this.validationType, templateResponseDocumentFormFieldText.validationType) && + Objects.equals(this.group, templateResponseDocumentFormFieldText.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, validationType, super.hashCode()); + return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, validationType, group, super.hashCode()); } @Override @@ -327,6 +357,7 @@ public String toString() { sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); sb.append(" validationType: ").append(toIndentedString(validationType)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -450,6 +481,25 @@ public Map createFormData() throws ApiException { map.put("validation_type", JSON.getDefault().getMapper().writeValueAsString(validationType)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) || + group.getClass().equals(Integer.class) || + group.getClass().equals(String.class) || + group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for(int i = 0; i< getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } + else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/node/README.md b/sdks/node/README.md index 4aca5d208..bfee7884f 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -120,6 +120,11 @@ All URIs are relative to *https://api.hellosign.com/v3* | *BulkSendJobApi* | [**bulkSendJobList**](./docs/api/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs | | *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* | [**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 | | *FaxLineApi* | [**faxLineAddUser**](./docs/api/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User | | *FaxLineApi* | [**faxLineAreaCodeGet**](./docs/api/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | | *FaxLineApi* | [**faxLineCreate**](./docs/api/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line | @@ -157,7 +162,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TeamApi* | [**teamSubTeams**](./docs/api/TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | *TeamApi* | [**teamUpdate**](./docs/api/TeamApi.md#teamupdate) | **PUT** /team | Update Team | | *TemplateApi* | [**templateAddUser**](./docs/api/TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template | -| *TemplateApi* | [**templateCreate**](./docs/api/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | +| *TemplateApi* | [**templateCreate**](./docs/api/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | | *TemplateApi* | [**templateCreateEmbeddedDraft**](./docs/api/TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | *TemplateApi* | [**templateDelete**](./docs/api/TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template | | *TemplateApi* | [**templateFiles**](./docs/api/TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -208,6 +213,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [EventCallbackRequest](./docs/model/EventCallbackRequest.md) - [EventCallbackRequestEvent](./docs/model/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](./docs/model/EventCallbackRequestEventMetadata.md) +- [FaxGetResponse](./docs/model/FaxGetResponse.md) - [FaxLineAddUserRequest](./docs/model/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](./docs/model/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](./docs/model/FaxLineAreaCodeGetProvinceEnum.md) @@ -219,6 +225,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FaxLineRemoveUserRequest](./docs/model/FaxLineRemoveUserRequest.md) - [FaxLineResponse](./docs/model/FaxLineResponse.md) - [FaxLineResponseFaxLine](./docs/model/FaxLineResponseFaxLine.md) +- [FaxListResponse](./docs/model/FaxListResponse.md) +- [FaxResponse](./docs/model/FaxResponse.md) +- [FaxResponseTransmission](./docs/model/FaxResponseTransmission.md) +- [FaxSendRequest](./docs/model/FaxSendRequest.md) - [FileResponse](./docs/model/FileResponse.md) - [FileResponseDataUri](./docs/model/FileResponseDataUri.md) - [ListInfoResponse](./docs/model/ListInfoResponse.md) diff --git a/sdks/node/VERSION b/sdks/node/VERSION index 78ca9a102..b19f5be06 100644 --- a/sdks/node/VERSION +++ b/sdks/node/VERSION @@ -1 +1 @@ -1.6-dev +1.7-dev diff --git a/sdks/node/api/apis.ts b/sdks/node/api/apis.ts index 5059bbea6..9cbae1aed 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.6-dev/node"; +export const USER_AGENT = "OpenAPI-Generator/1.7-dev/node"; /** * Generates an object containing form data. diff --git a/sdks/node/api/faxApi.ts b/sdks/node/api/faxApi.ts new file mode 100644 index 000000000..dd9c6df2a --- /dev/null +++ b/sdks/node/api/faxApi.ts @@ -0,0 +1,779 @@ +/** + * 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 axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios"; + +import { + Authentication, + FaxGetResponse, + FaxListResponse, + FaxSendRequest, + HttpBasicAuth, + HttpBearerAuth, + Interceptor, + ObjectSerializer, + VoidAuth, +} from "../model"; + +import { + generateFormData, + HttpError, + optionsI, + queryParamsSerializer, + returnTypeI, + returnTypeT, + toFormData, + USER_AGENT, +} from "./"; + +let defaultBasePath = "https://api.hellosign.com/v3"; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum FaxApiApiKeys {} + +export class FaxApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders: any = { "User-Agent": USER_AGENT }; + protected _useQuerystring: boolean = false; + + protected authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth(), + }; + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string) { + if (basePath) { + this.basePath = basePath; + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: string) { + this.authentications.api_key.username = key; + } + + set username(username: string) { + this.authentications.api_key.username = username; + } + + set password(password: string) { + this.authentications.api_key.password = password; + } + + set accessToken(accessToken: string | (() => string)) { + this.authentications.oauth2.accessToken = accessToken; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Deletes the specified Fax from the system. + * @summary Delete Fax + * @param faxId Fax ID + * @param options + */ + public async faxDelete( + faxId: string, + options: optionsI = { headers: {} } + ): Promise { + const localVarPath = + this.basePath + + "/fax/{fax_id}".replace( + "{" + "fax_id" + "}", + encodeURIComponent(String(faxId)) + ); + 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 'faxId' is not null or undefined + if (faxId === null || faxId === undefined) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxDelete." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: AxiosRequestConfig = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + 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) + ); + + 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); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns list of fax files + * @summary List Fax Files + * @param faxId Fax ID + * @param options + */ + public async faxFiles( + faxId: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = + this.basePath + + "/fax/files/{fax_id}".replace( + "{" + "fax_id" + "}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "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 'faxId' is not null or undefined + if (faxId === null || faxId === undefined) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxFiles." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: AxiosRequestConfig = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + 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) + ); + + 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, + "Buffer" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "RequestFile" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns information about fax + * @summary Get Fax + * @param faxId Fax ID + * @param options + */ + public async faxGet( + faxId: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = + this.basePath + + "/fax/{fax_id}".replace( + "{" + "fax_id" + "}", + encodeURIComponent(String(faxId)) + ); + 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 'faxId' is not null or undefined + if (faxId === null || faxId === undefined) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxGet." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: AxiosRequestConfig = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + 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) + ); + + 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, + "FaxGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "FaxGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns properties of multiple faxes + * @summary Lists Faxes + * @param page Page + * @param pageSize Page size + * @param options + */ + public async faxList( + page?: number, + pageSize?: number, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/fax/list"; + 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; + + if (page !== undefined) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + + if (pageSize !== undefined) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: AxiosRequestConfig = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + 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) + ); + + 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, + "FaxListResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "FaxListResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Action to prepare and send a fax + * @summary Send Fax + * @param faxSendRequest + * @param options + */ + public async faxSend( + faxSendRequest: FaxSendRequest, + options: optionsI = { headers: {} } + ): Promise> { + faxSendRequest = deserializeIfNeeded(faxSendRequest, "FaxSendRequest"); + const localVarPath = this.basePath + "/fax/send"; + 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 'faxSendRequest' is not null or undefined + if (faxSendRequest === null || faxSendRequest === undefined) { + 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 formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "POST", + 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) + ); + } + 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, + "FaxGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "FaxGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + }); + }); + } +} + +function deserializeIfNeeded(obj: T, classname: string): T { + if (obj !== null && obj !== undefined && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + + return obj; +} + +type AxiosResolve = ( + value: returnTypeT | PromiseLike> +) => void; + +type AxiosReject = (reason?: any) => void; + +function handleSuccessfulResponse( + resolve: AxiosResolve, + reject: AxiosReject, + response: AxiosResponse, + returnType?: string +) { + let body = response.data; + + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} + +function handleErrorCodeResponse( + reject: AxiosReject, + response: AxiosResponse, + code: number, + returnType: string +): boolean { + if (response.status !== code) { + return false; + } + + const body = ObjectSerializer.deserialize(response.data, returnType); + + reject(new HttpError(response, body, response.status)); + + return true; +} + +function handleErrorRangeResponse( + reject: AxiosReject, + response: AxiosResponse, + code: string, + returnType: string +): boolean { + 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; +} diff --git a/sdks/node/api/index.ts b/sdks/node/api/index.ts index 1304b009a..d32b5b1b7 100644 --- a/sdks/node/api/index.ts +++ b/sdks/node/api/index.ts @@ -2,6 +2,7 @@ import { AccountApi } from "./accountApi"; import { ApiAppApi } from "./apiAppApi"; import { BulkSendJobApi } from "./bulkSendJobApi"; import { EmbeddedApi } from "./embeddedApi"; +import { FaxApi } from "./faxApi"; import { FaxLineApi } from "./faxLineApi"; import { OAuthApi } from "./oAuthApi"; import { ReportApi } from "./reportApi"; @@ -15,6 +16,7 @@ export { ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxApi, FaxLineApi, OAuthApi, ReportApi, @@ -40,6 +42,7 @@ export const APIS = [ ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxApi, FaxLineApi, OAuthApi, ReportApi, diff --git a/sdks/node/api/oAuthApi.ts b/sdks/node/api/oAuthApi.ts index c1b080359..1478d53e0 100644 --- a/sdks/node/api/oAuthApi.ts +++ b/sdks/node/api/oAuthApi.ts @@ -236,6 +236,17 @@ export class OAuthApi { return; } + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + reject(error); } ); @@ -361,6 +372,17 @@ export class OAuthApi { return; } + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + reject(error); } ); diff --git a/sdks/node/api/signatureRequestApi.ts b/sdks/node/api/signatureRequestApi.ts index 51ccd93bf..3fd0d611e 100644 --- a/sdks/node/api/signatureRequestApi.ts +++ b/sdks/node/api/signatureRequestApi.ts @@ -422,7 +422,7 @@ export class SignatureRequestApi { }); } /** - * 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]`. + * 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 diff --git a/sdks/node/api/templateApi.ts b/sdks/node/api/templateApi.ts index 50ff0b4e7..35ac24648 100644 --- a/sdks/node/api/templateApi.ts +++ b/sdks/node/api/templateApi.ts @@ -291,7 +291,7 @@ export class TemplateApi { } /** * Creates a template that can then be used. - * @summary Create Template + * @summary Create Template * @param templateCreateRequest * @param options */ diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 69fdca0c9..e92bff233 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -12976,6 +12976,8 @@ __export(api_exports, { EventCallbackRequest: () => EventCallbackRequest, EventCallbackRequestEvent: () => EventCallbackRequestEvent, EventCallbackRequestEventMetadata: () => EventCallbackRequestEventMetadata, + FaxApi: () => FaxApi, + FaxGetResponse: () => FaxGetResponse, FaxLineAddUserRequest: () => FaxLineAddUserRequest, FaxLineApi: () => FaxLineApi, FaxLineAreaCodeGetCountryEnum: () => FaxLineAreaCodeGetCountryEnum, @@ -12988,6 +12990,10 @@ __export(api_exports, { FaxLineRemoveUserRequest: () => FaxLineRemoveUserRequest, FaxLineResponse: () => FaxLineResponse, FaxLineResponseFaxLine: () => FaxLineResponseFaxLine, + FaxListResponse: () => FaxListResponse, + FaxResponse: () => FaxResponse, + FaxResponseTransmission: () => FaxResponseTransmission, + FaxSendRequest: () => FaxSendRequest, FileResponse: () => FileResponse, FileResponseDataUri: () => FileResponseDataUri, HttpBasicAuth: () => HttpBasicAuth, @@ -17692,6 +17698,30 @@ EventCallbackRequestEventMetadata.attributeTypeMap = [ } ]; +// model/faxGetResponse.ts +var _FaxGetResponse = class { + static getAttributeTypeMap() { + return _FaxGetResponse.attributeTypeMap; + } + 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 { static getAttributeTypeMap() { @@ -17999,6 +18029,203 @@ FaxLineResponseFaxLine.attributeTypeMap = [ } ]; +// model/faxListResponse.ts +var _FaxListResponse = class { + static getAttributeTypeMap() { + return _FaxListResponse.attributeTypeMap; + } + 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 { + static getAttributeTypeMap() { + return _FaxResponse.attributeTypeMap; + } + 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: "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: "sender", + baseName: "sender", + type: "string" + }, + { + name: "transmissions", + baseName: "transmissions", + type: "Array" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + } +]; + +// model/faxResponseTransmission.ts +var _FaxResponseTransmission = class { + static getAttributeTypeMap() { + return _FaxResponseTransmission.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxResponseTransmission"); + } +}; +var FaxResponseTransmission = _FaxResponseTransmission; +FaxResponseTransmission.discriminator = void 0; +FaxResponseTransmission.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "statusCode", + baseName: "status_code", + type: "FaxResponseTransmission.StatusCodeEnum" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + } +]; +((FaxResponseTransmission2) => { + let StatusCodeEnum; + ((StatusCodeEnum2) => { + StatusCodeEnum2["Success"] = "success"; + StatusCodeEnum2["Transmitting"] = "transmitting"; + StatusCodeEnum2["ErrorCouldNotFax"] = "error_could_not_fax"; + StatusCodeEnum2["ErrorUnknown"] = "error_unknown"; + StatusCodeEnum2["ErrorBusy"] = "error_busy"; + StatusCodeEnum2["ErrorNoAnswer"] = "error_no_answer"; + StatusCodeEnum2["ErrorDisconnected"] = "error_disconnected"; + StatusCodeEnum2["ErrorBadDestination"] = "error_bad_destination"; + })(StatusCodeEnum = FaxResponseTransmission2.StatusCodeEnum || (FaxResponseTransmission2.StatusCodeEnum = {})); +})(FaxResponseTransmission || (FaxResponseTransmission = {})); + +// model/faxSendRequest.ts +var _FaxSendRequest = class { + constructor() { + this["testMode"] = false; + } + static getAttributeTypeMap() { + return _FaxSendRequest.attributeTypeMap; + } + 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 { static getAttributeTypeMap() { @@ -18331,6 +18558,16 @@ OAuthTokenRefreshRequest.attributeTypeMap = [ name: "refreshToken", baseName: "refresh_token", type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" } ]; @@ -21433,20 +21670,20 @@ SubUnclaimedDraftTemplateSigner.attributeTypeMap = [ // model/subWhiteLabelingOptions.ts var _SubWhiteLabelingOptions = class { constructor() { - this["headerBackgroundColor"] = "#1A1A1A"; + this["headerBackgroundColor"] = "#1a1a1a"; this["legalVersion"] = _SubWhiteLabelingOptions.LegalVersionEnum.Terms1; - this["linkColor"] = "#00B3E6"; - this["pageBackgroundColor"] = "#F7F8F9"; - this["primaryButtonColor"] = "#00B3E6"; - this["primaryButtonColorHover"] = "#00B3E6"; - this["primaryButtonTextColor"] = "#FFFFFF"; - this["primaryButtonTextColorHover"] = "#FFFFFF"; - this["secondaryButtonColor"] = "#FFFFFF"; - this["secondaryButtonColorHover"] = "#FFFFFF"; - this["secondaryButtonTextColor"] = "#00B3E6"; - this["secondaryButtonTextColorHover"] = "#00B3E6"; + this["linkColor"] = "#0061FE"; + this["pageBackgroundColor"] = "#f7f8f9"; + this["primaryButtonColor"] = "#0061FE"; + this["primaryButtonColorHover"] = "#0061FE"; + this["primaryButtonTextColor"] = "#ffffff"; + this["primaryButtonTextColorHover"] = "#ffffff"; + this["secondaryButtonColor"] = "#ffffff"; + this["secondaryButtonColorHover"] = "#ffffff"; + this["secondaryButtonTextColor"] = "#0061FE"; + this["secondaryButtonTextColorHover"] = "#0061FE"; this["textColor1"] = "#808080"; - this["textColor2"] = "#FFFFFF"; + this["textColor2"] = "#ffffff"; } static getAttributeTypeMap() { return _SubWhiteLabelingOptions.attributeTypeMap; @@ -22552,6 +22789,11 @@ TemplateResponse.attributeTypeMap = [ name: "accounts", baseName: "accounts", type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" } ]; @@ -22978,11 +23220,6 @@ TemplateResponseDocumentFormFieldBase.attributeTypeMap = [ name: "required", baseName: "required", type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" } ]; @@ -23009,6 +23246,11 @@ TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23035,6 +23277,11 @@ TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23061,6 +23308,11 @@ TemplateResponseDocumentFormFieldDropdown.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23107,6 +23359,11 @@ TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap = [ name: "fontFamily", baseName: "fontFamily", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23133,6 +23390,11 @@ TemplateResponseDocumentFormFieldInitials.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23159,6 +23421,11 @@ TemplateResponseDocumentFormFieldRadio.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23185,6 +23452,11 @@ TemplateResponseDocumentFormFieldSignature.attributeTypeMap = [ name: "type", baseName: "type", type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; @@ -23236,6 +23508,11 @@ TemplateResponseDocumentFormFieldText.attributeTypeMap = [ name: "validationType", baseName: "validation_type", type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" + }, + { + name: "group", + baseName: "group", + type: "string" } ]; ((TemplateResponseDocumentFormFieldText2) => { @@ -24412,6 +24689,7 @@ var enumsMap = { FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetStateEnum, "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, + "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum, @@ -24474,6 +24752,7 @@ var typeMap = { EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetResponse, FaxLineCreateRequest, @@ -24482,6 +24761,10 @@ var typeMap = { FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, + FaxListResponse, + FaxResponse, + FaxResponseTransmission, + FaxSendRequest, FileResponse, FileResponseDataUri, ListInfoResponse, @@ -26342,9 +26625,9 @@ function handleErrorRangeResponse4(reject, response, code, returnType) { return false; } -// api/faxLineApi.ts +// api/faxApi.ts var defaultBasePath5 = "https://api.hellosign.com/v3"; -var FaxLineApi = class { +var FaxApi = class { constructor(basePath) { this._basePath = defaultBasePath5; this._defaultHeaders = { "User-Agent": USER_AGENT }; @@ -26392,13 +26675,12 @@ var FaxLineApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxLineAddUser(_0) { - return __async(this, arguments, function* (faxLineAddUserRequest, options = { headers: {} }) { - faxLineAddUserRequest = deserializeIfNeeded4( - faxLineAddUserRequest, - "FaxLineAddUserRequest" + faxDelete(_0) { + return __async(this, arguments, function* (faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) ); - const localVarPath = this.basePath + "/fax_line/add_user"; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign( {}, @@ -26412,39 +26694,22 @@ var FaxLineApi = class { } let localVarFormParams = {}; let localVarBodyParams = void 0; - if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { + if (faxId === null || faxId === void 0) { throw new Error( - "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." + "Required parameter faxId was null or undefined when calling faxDelete." ); } 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", + method: "DELETE", params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, maxContentLength: Infinity, maxBodyLength: Infinity, - responseType: "json", - data + responseType: "json" }; let authenticationPromise = Promise.resolve(); if (this.authentications.api_key.username) { @@ -26465,26 +26730,13 @@ var FaxLineApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxLineResponse" - ); + handleSuccessfulResponse5(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } if (handleErrorRangeResponse5( reject, error.response, @@ -26500,15 +26752,18 @@ var FaxLineApi = class { }); }); } - faxLineAreaCodeGet(_0, _1, _2, _3) { - return __async(this, arguments, function* (country, state, province, city, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/area_codes"; + faxFiles(_0) { + return __async(this, arguments, function* (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/json"]; + const produces = ["application/pdf", "application/json"]; if (produces.indexOf("application/json") >= 0) { localVarHeaderParams["content-type"] = "application/json"; } else { @@ -26516,9 +26771,577 @@ var FaxLineApi = class { } let localVarFormParams = {}; let localVarBodyParams = void 0; - if (country === null || country === void 0) { + if (faxId === null || faxId === void 0) { throw new Error( - "Required parameter country was null or undefined when calling faxLineAreaCodeGet." + "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) + ); + 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; + } + 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 + ); + 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) + ); + } + 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) + ); + } + 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 + }; + 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) => { + 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); + } + ); + }); + }); + }); + } +}; +function deserializeIfNeeded4(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse5(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 handleErrorCodeResponse5(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 handleErrorRangeResponse5(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/faxLineApi.ts +var defaultBasePath6 = "https://api.hellosign.com/v3"; +var FaxLineApi = class { + constructor(basePath) { + this._basePath = defaultBasePath6; + 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); + } + faxLineAddUser(_0) { + return __async(this, arguments, function* (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 = __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) + ); + } + 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); + } + ); + }); + }); + }); + } + 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) { @@ -26577,7 +27400,7 @@ var FaxLineApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( + handleSuccessfulResponse6( resolve, reject, response, @@ -26589,7 +27412,7 @@ var FaxLineApi = class { reject(error); return; } - if (handleErrorCodeResponse5( + if (handleErrorCodeResponse6( reject, error.response, 200, @@ -26597,7 +27420,7 @@ var FaxLineApi = class { )) { return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -26615,7 +27438,7 @@ var FaxLineApi = class { } faxLineCreate(_0) { return __async(this, arguments, function* (faxLineCreateRequest, options = { headers: {} }) { - faxLineCreateRequest = deserializeIfNeeded4( + faxLineCreateRequest = deserializeIfNeeded5( faxLineCreateRequest, "FaxLineCreateRequest" ); @@ -26686,7 +27509,7 @@ var FaxLineApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( + handleSuccessfulResponse6( resolve, reject, response, @@ -26698,7 +27521,7 @@ var FaxLineApi = class { reject(error); return; } - if (handleErrorCodeResponse5( + if (handleErrorCodeResponse6( reject, error.response, 200, @@ -26706,7 +27529,7 @@ var FaxLineApi = class { )) { return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -26723,7 +27546,7 @@ var FaxLineApi = class { } faxLineDelete(_0) { return __async(this, arguments, function* (faxLineDeleteRequest, options = { headers: {} }) { - faxLineDeleteRequest = deserializeIfNeeded4( + faxLineDeleteRequest = deserializeIfNeeded5( faxLineDeleteRequest, "FaxLineDeleteRequest" ); @@ -26794,14 +27617,14 @@ var FaxLineApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5(resolve, reject, response); + handleSuccessfulResponse6(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -26874,7 +27697,7 @@ var FaxLineApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( + handleSuccessfulResponse6( resolve, reject, response, @@ -26886,7 +27709,7 @@ var FaxLineApi = class { reject(error); return; } - if (handleErrorCodeResponse5( + if (handleErrorCodeResponse6( reject, error.response, 200, @@ -26894,7 +27717,7 @@ var FaxLineApi = class { )) { return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -26981,7 +27804,7 @@ var FaxLineApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( + handleSuccessfulResponse6( resolve, reject, response, @@ -26993,7 +27816,7 @@ var FaxLineApi = class { reject(error); return; } - if (handleErrorCodeResponse5( + if (handleErrorCodeResponse6( reject, error.response, 200, @@ -27001,7 +27824,7 @@ var FaxLineApi = class { )) { return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -27019,7 +27842,7 @@ var FaxLineApi = class { } faxLineRemoveUser(_0) { return __async(this, arguments, function* (faxLineRemoveUserRequest, options = { headers: {} }) { - faxLineRemoveUserRequest = deserializeIfNeeded4( + faxLineRemoveUserRequest = deserializeIfNeeded5( faxLineRemoveUserRequest, "FaxLineRemoveUserRequest" ); @@ -27090,7 +27913,7 @@ var FaxLineApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse5( + handleSuccessfulResponse6( resolve, reject, response, @@ -27102,7 +27925,7 @@ var FaxLineApi = class { reject(error); return; } - if (handleErrorCodeResponse5( + if (handleErrorCodeResponse6( reject, error.response, 200, @@ -27110,7 +27933,7 @@ var FaxLineApi = class { )) { return; } - if (handleErrorRangeResponse5( + if (handleErrorRangeResponse6( reject, error.response, "4XX", @@ -27126,13 +27949,13 @@ var FaxLineApi = class { }); } }; -function deserializeIfNeeded4(obj, classname) { +function deserializeIfNeeded5(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse5(resolve, reject, response, returnType) { +function handleSuccessfulResponse6(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -27143,7 +27966,7 @@ function handleSuccessfulResponse5(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse5(reject, response, code, returnType) { +function handleErrorCodeResponse6(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -27151,7 +27974,7 @@ function handleErrorCodeResponse5(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse5(reject, response, code, returnType) { +function handleErrorRangeResponse6(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -27163,10 +27986,10 @@ function handleErrorRangeResponse5(reject, response, code, returnType) { } // api/oAuthApi.ts -var defaultBasePath6 = "https://app.hellosign.com"; +var defaultBasePath7 = "https://app.hellosign.com"; var OAuthApi = class { constructor(basePath) { - this._basePath = defaultBasePath6; + this._basePath = defaultBasePath7; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -27214,7 +28037,7 @@ var OAuthApi = class { } oauthTokenGenerate(_0) { return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { - oAuthTokenGenerateRequest = deserializeIfNeeded5( + oAuthTokenGenerateRequest = deserializeIfNeeded6( oAuthTokenGenerateRequest, "OAuthTokenGenerateRequest" ); @@ -27280,7 +28103,7 @@ var OAuthApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse6( + handleSuccessfulResponse7( resolve, reject, response, @@ -27292,7 +28115,7 @@ var OAuthApi = class { reject(error); return; } - if (handleErrorCodeResponse6( + if (handleErrorCodeResponse7( reject, error.response, 200, @@ -27300,6 +28123,14 @@ var OAuthApi = class { )) { return; } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } reject(error); } ); @@ -27309,7 +28140,7 @@ var OAuthApi = class { } oauthTokenRefresh(_0) { return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { - oAuthTokenRefreshRequest = deserializeIfNeeded5( + oAuthTokenRefreshRequest = deserializeIfNeeded6( oAuthTokenRefreshRequest, "OAuthTokenRefreshRequest" ); @@ -27375,7 +28206,7 @@ var OAuthApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse6( + handleSuccessfulResponse7( resolve, reject, response, @@ -27387,11 +28218,19 @@ var OAuthApi = class { reject(error); return; } - if (handleErrorCodeResponse6( + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( reject, error.response, - 200, - "OAuthTokenResponse" + "4XX", + "ErrorResponse" )) { return; } @@ -27403,13 +28242,13 @@ var OAuthApi = class { }); } }; -function deserializeIfNeeded5(obj, classname) { +function deserializeIfNeeded6(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse6(resolve, reject, response, returnType) { +function handleSuccessfulResponse7(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -27420,7 +28259,7 @@ function handleSuccessfulResponse6(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse6(reject, response, code, returnType) { +function handleErrorCodeResponse7(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -27428,12 +28267,22 @@ function handleErrorCodeResponse6(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } +function handleErrorRangeResponse7(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/reportApi.ts -var defaultBasePath7 = "https://api.hellosign.com/v3"; +var defaultBasePath8 = "https://api.hellosign.com/v3"; var ReportApi = class { constructor(basePath) { - this._basePath = defaultBasePath7; + this._basePath = defaultBasePath8; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -27481,7 +28330,7 @@ var ReportApi = class { } reportCreate(_0) { return __async(this, arguments, function* (reportCreateRequest, options = { headers: {} }) { - reportCreateRequest = deserializeIfNeeded6( + reportCreateRequest = deserializeIfNeeded7( reportCreateRequest, "ReportCreateRequest" ); @@ -27553,7 +28402,7 @@ var ReportApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse7( + handleSuccessfulResponse8( resolve, reject, response, @@ -27565,7 +28414,7 @@ var ReportApi = class { reject(error); return; } - if (handleErrorCodeResponse7( + if (handleErrorCodeResponse8( reject, error.response, 200, @@ -27573,7 +28422,7 @@ var ReportApi = class { )) { return; } - if (handleErrorRangeResponse6( + if (handleErrorRangeResponse8( reject, error.response, "4XX", @@ -27590,13 +28439,13 @@ var ReportApi = class { }); } }; -function deserializeIfNeeded6(obj, classname) { +function deserializeIfNeeded7(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse7(resolve, reject, response, returnType) { +function handleSuccessfulResponse8(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -27607,7 +28456,7 @@ function handleSuccessfulResponse7(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse7(reject, response, code, returnType) { +function handleErrorCodeResponse8(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -27615,7 +28464,7 @@ function handleErrorCodeResponse7(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse6(reject, response, code, returnType) { +function handleErrorRangeResponse8(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -27627,10 +28476,10 @@ function handleErrorRangeResponse6(reject, response, code, returnType) { } // api/signatureRequestApi.ts -var defaultBasePath8 = "https://api.hellosign.com/v3"; +var defaultBasePath9 = "https://api.hellosign.com/v3"; var SignatureRequestApi = class { constructor(basePath) { - this._basePath = defaultBasePath8; + this._basePath = defaultBasePath9; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -27678,7 +28527,7 @@ var SignatureRequestApi = class { } signatureRequestBulkCreateEmbeddedWithTemplate(_0) { return __async(this, arguments, function* (signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded7( + signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( signatureRequestBulkCreateEmbeddedWithTemplateRequest, "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" ); @@ -27750,7 +28599,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -27762,7 +28611,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -27770,7 +28619,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -27788,7 +28637,7 @@ var SignatureRequestApi = class { } signatureRequestBulkSendWithTemplate(_0) { return __async(this, arguments, function* (signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded7( + signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( signatureRequestBulkSendWithTemplateRequest, "SignatureRequestBulkSendWithTemplateRequest" ); @@ -27865,7 +28714,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -27877,7 +28726,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -27885,7 +28734,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -27961,14 +28810,14 @@ var SignatureRequestApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8(resolve, reject, response); + handleSuccessfulResponse9(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -27985,7 +28834,7 @@ var SignatureRequestApi = class { } signatureRequestCreateEmbedded(_0) { return __async(this, arguments, function* (signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedRequest = deserializeIfNeeded7( + signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( signatureRequestCreateEmbeddedRequest, "SignatureRequestCreateEmbeddedRequest" ); @@ -28062,7 +28911,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28074,7 +28923,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28082,7 +28931,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28100,7 +28949,7 @@ var SignatureRequestApi = class { } signatureRequestCreateEmbeddedWithTemplate(_0) { return __async(this, arguments, function* (signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded7( + signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( signatureRequestCreateEmbeddedWithTemplateRequest, "SignatureRequestCreateEmbeddedWithTemplateRequest" ); @@ -28177,7 +29026,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28189,7 +29038,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28197,7 +29046,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28279,7 +29128,7 @@ var SignatureRequestApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28291,7 +29140,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28299,7 +29148,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28375,7 +29224,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28387,7 +29236,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28395,7 +29244,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28477,7 +29326,7 @@ var SignatureRequestApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28489,7 +29338,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28497,7 +29346,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28573,7 +29422,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28585,7 +29434,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28593,7 +29442,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28686,7 +29535,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28698,7 +29547,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28706,7 +29555,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28783,7 +29632,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28795,7 +29644,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28803,7 +29652,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28821,7 +29670,7 @@ var SignatureRequestApi = class { } signatureRequestRemind(_0, _1) { return __async(this, arguments, function* (signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { - signatureRequestRemindRequest = deserializeIfNeeded7( + signatureRequestRemindRequest = deserializeIfNeeded8( signatureRequestRemindRequest, "SignatureRequestRemindRequest" ); @@ -28906,7 +29755,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -28918,7 +29767,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -28926,7 +29775,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -28997,14 +29846,14 @@ var SignatureRequestApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8(resolve, reject, response); + handleSuccessfulResponse9(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -29021,7 +29870,7 @@ var SignatureRequestApi = class { } signatureRequestSend(_0) { return __async(this, arguments, function* (signatureRequestSendRequest, options = { headers: {} }) { - signatureRequestSendRequest = deserializeIfNeeded7( + signatureRequestSendRequest = deserializeIfNeeded8( signatureRequestSendRequest, "SignatureRequestSendRequest" ); @@ -29098,7 +29947,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -29110,7 +29959,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -29118,7 +29967,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -29136,7 +29985,7 @@ var SignatureRequestApi = class { } signatureRequestSendWithTemplate(_0) { return __async(this, arguments, function* (signatureRequestSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestSendWithTemplateRequest = deserializeIfNeeded7( + signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( signatureRequestSendWithTemplateRequest, "SignatureRequestSendWithTemplateRequest" ); @@ -29213,7 +30062,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -29225,7 +30074,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -29233,7 +30082,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -29251,7 +30100,7 @@ var SignatureRequestApi = class { } signatureRequestUpdate(_0, _1) { return __async(this, arguments, function* (signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { - signatureRequestUpdateRequest = deserializeIfNeeded7( + signatureRequestUpdateRequest = deserializeIfNeeded8( signatureRequestUpdateRequest, "SignatureRequestUpdateRequest" ); @@ -29336,7 +30185,7 @@ var SignatureRequestApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse8( + handleSuccessfulResponse9( resolve, reject, response, @@ -29348,7 +30197,7 @@ var SignatureRequestApi = class { reject(error); return; } - if (handleErrorCodeResponse8( + if (handleErrorCodeResponse9( reject, error.response, 200, @@ -29356,7 +30205,7 @@ var SignatureRequestApi = class { )) { return; } - if (handleErrorRangeResponse7( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -29373,13 +30222,13 @@ var SignatureRequestApi = class { }); } }; -function deserializeIfNeeded7(obj, classname) { +function deserializeIfNeeded8(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse8(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) { @@ -29390,7 +30239,7 @@ function handleSuccessfulResponse8(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse8(reject, response, code, returnType) { +function handleErrorCodeResponse9(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -29398,7 +30247,7 @@ function handleErrorCodeResponse8(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse7(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) { @@ -29410,10 +30259,10 @@ function handleErrorRangeResponse7(reject, response, code, returnType) { } // api/teamApi.ts -var defaultBasePath9 = "https://api.hellosign.com/v3"; +var defaultBasePath10 = "https://api.hellosign.com/v3"; var TeamApi = class { constructor(basePath) { - this._basePath = defaultBasePath9; + this._basePath = defaultBasePath10; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -29461,7 +30310,7 @@ var TeamApi = class { } teamAddMember(_0, _1) { return __async(this, arguments, function* (teamAddMemberRequest, teamId, options = { headers: {} }) { - teamAddMemberRequest = deserializeIfNeeded8( + teamAddMemberRequest = deserializeIfNeeded9( teamAddMemberRequest, "TeamAddMemberRequest" ); @@ -29543,7 +30392,7 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -29555,7 +30404,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -29563,7 +30412,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -29580,7 +30429,7 @@ var TeamApi = class { } teamCreate(_0) { return __async(this, arguments, function* (teamCreateRequest, options = { headers: {} }) { - teamCreateRequest = deserializeIfNeeded8( + teamCreateRequest = deserializeIfNeeded9( teamCreateRequest, "TeamCreateRequest" ); @@ -29653,7 +30502,7 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -29665,7 +30514,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -29673,7 +30522,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -29740,14 +30589,14 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse10(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -29814,7 +30663,7 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -29826,7 +30675,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -29834,7 +30683,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -29908,7 +30757,7 @@ var TeamApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -29920,7 +30769,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -29928,7 +30777,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30003,7 +30852,7 @@ var TeamApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -30015,7 +30864,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -30023,7 +30872,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30112,7 +30961,7 @@ var TeamApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -30124,7 +30973,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -30132,7 +30981,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30150,7 +30999,7 @@ var TeamApi = class { } teamRemoveMember(_0) { return __async(this, arguments, function* (teamRemoveMemberRequest, options = { headers: {} }) { - teamRemoveMemberRequest = deserializeIfNeeded8( + teamRemoveMemberRequest = deserializeIfNeeded9( teamRemoveMemberRequest, "TeamRemoveMemberRequest" ); @@ -30226,7 +31075,7 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -30238,7 +31087,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 201, @@ -30246,7 +31095,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30334,7 +31183,7 @@ var TeamApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -30346,7 +31195,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -30354,7 +31203,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30372,7 +31221,7 @@ var TeamApi = class { } teamUpdate(_0) { return __async(this, arguments, function* (teamUpdateRequest, options = { headers: {} }) { - teamUpdateRequest = deserializeIfNeeded8( + teamUpdateRequest = deserializeIfNeeded9( teamUpdateRequest, "TeamUpdateRequest" ); @@ -30445,7 +31294,7 @@ var TeamApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9( + handleSuccessfulResponse10( resolve, reject, response, @@ -30457,7 +31306,7 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse9( + if (handleErrorCodeResponse10( reject, error.response, 200, @@ -30465,7 +31314,7 @@ var TeamApi = class { )) { return; } - if (handleErrorRangeResponse8( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -30481,13 +31330,13 @@ var TeamApi = class { }); } }; -function deserializeIfNeeded8(obj, classname) { +function deserializeIfNeeded9(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) { +function handleSuccessfulResponse10(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -30498,7 +31347,7 @@ function handleSuccessfulResponse9(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse9(reject, response, code, returnType) { +function handleErrorCodeResponse10(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -30506,7 +31355,7 @@ function handleErrorCodeResponse9(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse8(reject, response, code, returnType) { +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) { @@ -30518,10 +31367,10 @@ function handleErrorRangeResponse8(reject, response, code, returnType) { } // api/templateApi.ts -var defaultBasePath10 = "https://api.hellosign.com/v3"; +var defaultBasePath11 = "https://api.hellosign.com/v3"; var TemplateApi = class { constructor(basePath) { - this._basePath = defaultBasePath10; + this._basePath = defaultBasePath11; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -30569,7 +31418,7 @@ var TemplateApi = class { } templateAddUser(_0, _1) { return __async(this, arguments, function* (templateId, templateAddUserRequest, options = { headers: {} }) { - templateAddUserRequest = deserializeIfNeeded9( + templateAddUserRequest = deserializeIfNeeded10( templateAddUserRequest, "TemplateAddUserRequest" ); @@ -30654,7 +31503,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -30666,7 +31515,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -30674,7 +31523,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -30692,7 +31541,7 @@ var TemplateApi = class { } templateCreate(_0) { return __async(this, arguments, function* (templateCreateRequest, options = { headers: {} }) { - templateCreateRequest = deserializeIfNeeded9( + templateCreateRequest = deserializeIfNeeded10( templateCreateRequest, "TemplateCreateRequest" ); @@ -30769,7 +31618,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -30781,7 +31630,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -30789,7 +31638,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -30807,7 +31656,7 @@ var TemplateApi = class { } templateCreateEmbeddedDraft(_0) { return __async(this, arguments, function* (templateCreateEmbeddedDraftRequest, options = { headers: {} }) { - templateCreateEmbeddedDraftRequest = deserializeIfNeeded9( + templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( templateCreateEmbeddedDraftRequest, "TemplateCreateEmbeddedDraftRequest" ); @@ -30884,7 +31733,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -30896,7 +31745,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -30904,7 +31753,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -30980,14 +31829,14 @@ var TemplateApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10(resolve, reject, response); + handleSuccessfulResponse11(resolve, reject, response); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31068,7 +31917,7 @@ var TemplateApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31080,7 +31929,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31088,7 +31937,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31164,7 +32013,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31176,7 +32025,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31184,7 +32033,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31266,7 +32115,7 @@ var TemplateApi = class { return new Promise((resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31278,7 +32127,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31286,7 +32135,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31362,7 +32211,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31374,7 +32223,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31382,7 +32231,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31475,7 +32324,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31487,7 +32336,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31495,7 +32344,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31513,7 +32362,7 @@ var TemplateApi = class { } templateRemoveUser(_0, _1) { return __async(this, arguments, function* (templateId, templateRemoveUserRequest, options = { headers: {} }) { - templateRemoveUserRequest = deserializeIfNeeded9( + templateRemoveUserRequest = deserializeIfNeeded10( templateRemoveUserRequest, "TemplateRemoveUserRequest" ); @@ -31598,7 +32447,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31610,7 +32459,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31618,7 +32467,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31636,7 +32485,7 @@ var TemplateApi = class { } templateUpdateFiles(_0, _1) { return __async(this, arguments, function* (templateId, templateUpdateFilesRequest, options = { headers: {} }) { - templateUpdateFilesRequest = deserializeIfNeeded9( + templateUpdateFilesRequest = deserializeIfNeeded10( templateUpdateFilesRequest, "TemplateUpdateFilesRequest" ); @@ -31721,7 +32570,7 @@ var TemplateApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse11( resolve, reject, response, @@ -31733,7 +32582,7 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse11( reject, error.response, 200, @@ -31741,7 +32590,7 @@ var TemplateApi = class { )) { return; } - if (handleErrorRangeResponse9( + if (handleErrorRangeResponse11( reject, error.response, "4XX", @@ -31758,13 +32607,13 @@ var TemplateApi = class { }); } }; -function deserializeIfNeeded9(obj, classname) { +function deserializeIfNeeded10(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) { +function handleSuccessfulResponse11(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -31775,7 +32624,7 @@ function handleSuccessfulResponse10(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse10(reject, response, code, returnType) { +function handleErrorCodeResponse11(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -31783,7 +32632,7 @@ function handleErrorCodeResponse10(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse9(reject, response, code, returnType) { +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) { @@ -31795,10 +32644,10 @@ function handleErrorRangeResponse9(reject, response, code, returnType) { } // api/unclaimedDraftApi.ts -var defaultBasePath11 = "https://api.hellosign.com/v3"; +var defaultBasePath12 = "https://api.hellosign.com/v3"; var UnclaimedDraftApi = class { constructor(basePath) { - this._basePath = defaultBasePath11; + this._basePath = defaultBasePath12; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -31846,7 +32695,7 @@ var UnclaimedDraftApi = class { } unclaimedDraftCreate(_0) { return __async(this, arguments, function* (unclaimedDraftCreateRequest, options = { headers: {} }) { - unclaimedDraftCreateRequest = deserializeIfNeeded10( + unclaimedDraftCreateRequest = deserializeIfNeeded11( unclaimedDraftCreateRequest, "UnclaimedDraftCreateRequest" ); @@ -31923,7 +32772,7 @@ var UnclaimedDraftApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse12( resolve, reject, response, @@ -31935,7 +32784,7 @@ var UnclaimedDraftApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse12( reject, error.response, 200, @@ -31943,7 +32792,7 @@ var UnclaimedDraftApi = class { )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse12( reject, error.response, "4XX", @@ -31961,7 +32810,7 @@ var UnclaimedDraftApi = class { } unclaimedDraftCreateEmbedded(_0) { return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded10( + unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( unclaimedDraftCreateEmbeddedRequest, "UnclaimedDraftCreateEmbeddedRequest" ); @@ -32038,7 +32887,7 @@ var UnclaimedDraftApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse12( resolve, reject, response, @@ -32050,7 +32899,7 @@ var UnclaimedDraftApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse12( reject, error.response, 200, @@ -32058,7 +32907,7 @@ var UnclaimedDraftApi = class { )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse12( reject, error.response, "4XX", @@ -32076,7 +32925,7 @@ var UnclaimedDraftApi = class { } unclaimedDraftCreateEmbeddedWithTemplate(_0) { return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded10( + unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( unclaimedDraftCreateEmbeddedWithTemplateRequest, "UnclaimedDraftCreateEmbeddedWithTemplateRequest" ); @@ -32153,7 +33002,7 @@ var UnclaimedDraftApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse12( resolve, reject, response, @@ -32165,7 +33014,7 @@ var UnclaimedDraftApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse12( reject, error.response, 200, @@ -32173,7 +33022,7 @@ var UnclaimedDraftApi = class { )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse12( reject, error.response, "4XX", @@ -32191,7 +33040,7 @@ var UnclaimedDraftApi = class { } unclaimedDraftEditAndResend(_0, _1) { return __async(this, arguments, function* (signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { - unclaimedDraftEditAndResendRequest = deserializeIfNeeded10( + unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( unclaimedDraftEditAndResendRequest, "UnclaimedDraftEditAndResendRequest" ); @@ -32276,7 +33125,7 @@ var UnclaimedDraftApi = class { (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse12( resolve, reject, response, @@ -32288,7 +33137,7 @@ var UnclaimedDraftApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse12( reject, error.response, 200, @@ -32296,7 +33145,7 @@ var UnclaimedDraftApi = class { )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse12( reject, error.response, "4XX", @@ -32313,13 +33162,13 @@ var UnclaimedDraftApi = class { }); } }; -function deserializeIfNeeded10(obj, classname) { +function deserializeIfNeeded11(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 handleSuccessfulResponse12(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -32330,7 +33179,7 @@ function handleSuccessfulResponse11(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse11(reject, response, code, returnType) { +function handleErrorCodeResponse12(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -32338,7 +33187,7 @@ function handleErrorCodeResponse11(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse10(reject, response, code, returnType) { +function handleErrorRangeResponse12(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -32364,7 +33213,7 @@ var HttpError = class extends Error { var queryParamsSerializer = (params) => { return import_qs.default.stringify(params, { arrayFormat: "brackets" }); }; -var USER_AGENT = "OpenAPI-Generator/1.6-dev/node"; +var USER_AGENT = "OpenAPI-Generator/1.7-dev/node"; var generateFormData = (obj, typemap) => { const data = {}; let localVarUseFormData = false; @@ -32428,6 +33277,7 @@ var APIS = [ ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxApi, FaxLineApi, OAuthApi, ReportApi, @@ -32479,6 +33329,8 @@ var APIS = [ EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxApi, + FaxGetResponse, FaxLineAddUserRequest, FaxLineApi, FaxLineAreaCodeGetCountryEnum, @@ -32491,6 +33343,10 @@ var APIS = [ FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, + FaxListResponse, + FaxResponse, + FaxResponseTransmission, + FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, diff --git a/sdks/node/docs/api/FaxApi.md b/sdks/node/docs/api/FaxApi.md new file mode 100644 index 000000000..84ccc7b39 --- /dev/null +++ b/sdks/node/docs/api/FaxApi.md @@ -0,0 +1,458 @@ +# FaxApi + +All URIs are relative to https://api.hellosign.com/v3. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**faxDelete()**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**faxGet()**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax | +| [**faxList()**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes | +| [**faxSend()**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax | + + +## `faxDelete()` + +```typescript +faxDelete(faxId: string) +``` + +Delete Fax + +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"; + +const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + +result.catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxId** | **string**| Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxFiles()` + +```typescript +faxFiles(faxId: string): Buffer +``` + +List Fax Files + +Returns list of fax files + +### 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'; + +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); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxId** | **string**| Fax ID | | + +### Return type + +**Buffer** + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/pdf`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxGet()` + +```typescript +faxGet(faxId: string): FaxGetResponse +``` + +Get Fax + +Returns information about 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"; + +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); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxId** | **string**| Fax ID | | + +### Return type + +[**FaxGetResponse**](../model/FaxGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxList()` + +```typescript +faxList(page: number, pageSize: number): FaxListResponse +``` + +Lists 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"; + +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); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **page** | **number**| Page | [optional] [default to 1] | +| **pageSize** | **number**| Page size | [optional] [default to 20] | + +### Return type + +[**FaxListResponse**](../model/FaxListResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxSend()` + +```typescript +faxSend(faxSendRequest: FaxSendRequest): FaxGetResponse +``` + +Send Fax + +Action to prepare and send 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"; + +// 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); +}); + +``` + +### 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", + 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); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxSendRequest** | [**FaxSendRequest**](../model/FaxSendRequest.md)| | | + +### Return type + +[**FaxGetResponse**](../model/FaxGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) diff --git a/sdks/node/docs/api/SignatureRequestApi.md b/sdks/node/docs/api/SignatureRequestApi.md index 189d58b92..459c8c120 100644 --- a/sdks/node/docs/api/SignatureRequestApi.md +++ b/sdks/node/docs/api/SignatureRequestApi.md @@ -379,7 +379,7 @@ signatureRequestCancel(signatureRequestId: string) 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]`. +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]`. ### TypeScript Example diff --git a/sdks/node/docs/api/TemplateApi.md b/sdks/node/docs/api/TemplateApi.md index 995945f30..e73e5930d 100644 --- a/sdks/node/docs/api/TemplateApi.md +++ b/sdks/node/docs/api/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**templateAddUser()**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template | -| [**templateCreate()**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template | +| [**templateCreate()**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template | | [**templateCreateEmbeddedDraft()**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | [**templateDelete()**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template | | [**templateFiles()**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -115,7 +115,7 @@ result.then(response => { templateCreate(templateCreateRequest: TemplateCreateRequest): TemplateCreateResponse ``` -Create Template +Create Template Creates a template that can then be used. diff --git a/sdks/node/docs/model/AccountResponseQuotas.md b/sdks/node/docs/model/AccountResponseQuotas.md index 55beed9cb..bc02d3242 100644 --- a/sdks/node/docs/model/AccountResponseQuotas.md +++ b/sdks/node/docs/model/AccountResponseQuotas.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `documentsLeft` | ```number``` | Signature requests remaining. | | | `templatesTotal` | ```number``` | Total API templates allowed. | | | `templatesLeft` | ```number``` | API templates remaining. | | -| `smsVerificationsLeft` | ```number``` | SMS verifications remaining. | | +| `smsVerificationsLeft` | ```number``` | SMS verifications remaining. | | | `numFaxPagesLeft` | ```number``` | Number of fax pages left | | [[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/FaxGetResponse.md b/sdks/node/docs/model/FaxGetResponse.md new file mode 100644 index 000000000..d688d55b8 --- /dev/null +++ b/sdks/node/docs/model/FaxGetResponse.md @@ -0,0 +1,12 @@ +# # FaxGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | + +[[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/FaxListResponse.md b/sdks/node/docs/model/FaxListResponse.md new file mode 100644 index 000000000..53d9cf57c --- /dev/null +++ b/sdks/node/docs/model/FaxListResponse.md @@ -0,0 +1,12 @@ +# # FaxListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxes`*_required_ | [```Array```](FaxResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + +[[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/FaxResponse.md b/sdks/node/docs/model/FaxResponse.md new file mode 100644 index 000000000..413a36b71 --- /dev/null +++ b/sdks/node/docs/model/FaxResponse.md @@ -0,0 +1,20 @@ +# # FaxResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxId`*_required_ | ```string``` | Fax ID | | +| `title`*_required_ | ```string``` | Fax Title | | +| `originalTitle`*_required_ | ```string``` | Fax Original Title | | +| `subject`*_required_ | ```string``` | Fax Subject | | +| `message`*_required_ | ```string``` | Fax Message | | +| `metadata`*_required_ | ```{ [key: string]: any; }``` | Fax Metadata | | +| `createdAt`*_required_ | ```number``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```string``` | Fax Sender Email | | +| `transmissions`*_required_ | [```Array```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `filesUrl`*_required_ | ```string``` | Fax Files URL | | + +[[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/FaxResponseTransmission.md b/sdks/node/docs/model/FaxResponseTransmission.md new file mode 100644 index 000000000..c0d8491c0 --- /dev/null +++ b/sdks/node/docs/model/FaxResponseTransmission.md @@ -0,0 +1,14 @@ +# # FaxResponseTransmission + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```string``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```string``` | Fax Transmission Sender | | +| `statusCode`*_required_ | ```string``` | Fax Transmission Status Code | | +| `sentAt` | ```number``` | Fax Transmission Sent Timestamp | | + +[[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 new file mode 100644 index 000000000..72ebb6fb0 --- /dev/null +++ b/sdks/node/docs/model/FaxSendRequest.md @@ -0,0 +1,19 @@ +# # FaxSendRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```Array``` | Fax File to Send | | +| `fileUrls` | ```Array``` | Fax File URL to Send | | +| `testMode` | ```boolean``` | API Test Mode Setting | [default to false] | +| `coverPageTo` | ```string``` | Fax Cover Page for Recipient | | +| `coverPageFrom` | ```string``` | Fax Cover Page for Sender | | +| `coverPageMessage` | ```string``` | Fax Cover Page Message | | +| `title` | ```string``` | Fax Title | | + +[[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/OAuthTokenRefreshRequest.md b/sdks/node/docs/model/OAuthTokenRefreshRequest.md index d5dc06d1b..8a24bdc15 100644 --- a/sdks/node/docs/model/OAuthTokenRefreshRequest.md +++ b/sdks/node/docs/model/OAuthTokenRefreshRequest.md @@ -8,5 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `grantType`*_required_ | ```string``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refreshToken`*_required_ | ```string``` | The token provided when you got the expired access token. | | +| `clientId` | ```string``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `clientSecret` | ```string``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | [[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/SubWhiteLabelingOptions.md b/sdks/node/docs/model/SubWhiteLabelingOptions.md index 6306db07d..b800c3f6b 100644 --- a/sdks/node/docs/model/SubWhiteLabelingOptions.md +++ b/sdks/node/docs/model/SubWhiteLabelingOptions.md @@ -8,20 +8,20 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `headerBackgroundColor` | ```string``` | | [default to '#1A1A1A'] | +| `headerBackgroundColor` | ```string``` | | [default to '#1a1a1a'] | | `legalVersion` | ```string``` | | [default to LegalVersionEnum.Terms1] | -| `linkColor` | ```string``` | | [default to '#00B3E6'] | -| `pageBackgroundColor` | ```string``` | | [default to '#F7F8F9'] | -| `primaryButtonColor` | ```string``` | | [default to '#00B3E6'] | -| `primaryButtonColorHover` | ```string``` | | [default to '#00B3E6'] | -| `primaryButtonTextColor` | ```string``` | | [default to '#FFFFFF'] | -| `primaryButtonTextColorHover` | ```string``` | | [default to '#FFFFFF'] | -| `secondaryButtonColor` | ```string``` | | [default to '#FFFFFF'] | -| `secondaryButtonColorHover` | ```string``` | | [default to '#FFFFFF'] | -| `secondaryButtonTextColor` | ```string``` | | [default to '#00B3E6'] | -| `secondaryButtonTextColorHover` | ```string``` | | [default to '#00B3E6'] | +| `linkColor` | ```string``` | | [default to '#0061FE'] | +| `pageBackgroundColor` | ```string``` | | [default to '#f7f8f9'] | +| `primaryButtonColor` | ```string``` | | [default to '#0061FE'] | +| `primaryButtonColorHover` | ```string``` | | [default to '#0061FE'] | +| `primaryButtonTextColor` | ```string``` | | [default to '#ffffff'] | +| `primaryButtonTextColorHover` | ```string``` | | [default to '#ffffff'] | +| `secondaryButtonColor` | ```string``` | | [default to '#ffffff'] | +| `secondaryButtonColorHover` | ```string``` | | [default to '#ffffff'] | +| `secondaryButtonTextColor` | ```string``` | | [default to '#0061FE'] | +| `secondaryButtonTextColorHover` | ```string``` | | [default to '#0061FE'] | | `textColor1` | ```string``` | | [default to '#808080'] | -| `textColor2` | ```string``` | | [default to '#FFFFFF'] | +| `textColor2` | ```string``` | | [default to '#ffffff'] | | `resetToDefault` | ```boolean``` | Resets white labeling options to defaults. Only useful when updating an API App. | | [[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/TemplateResponse.md b/sdks/node/docs/model/TemplateResponse.md index e82af4305..90ed7af2e 100644 --- a/sdks/node/docs/model/TemplateResponse.md +++ b/sdks/node/docs/model/TemplateResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `title` | ```string``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```string``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updatedAt` | ```number``` | Time the template was last updated. | | -| `isEmbedded` | ```boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `isEmbedded` | ```boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `isCreator` | ```boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `canEdit` | ```boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `isLocked` | ```boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -21,5 +21,6 @@ Name | Type | Description | Notes | `customFields` | [```Array```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `namedFormFields` | [```Array```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```Array```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```Array```](SignatureRequestResponseAttachment.md) | Signer attachments. | | [[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/TemplateResponseDocumentFormFieldBase.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldBase.md index 859662984..648b7fd5d 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldBase.md @@ -15,6 +15,5 @@ Name | Type | Description | Notes | `width` | ```number``` | The width in pixels of this form field. | | | `height` | ```number``` | The height in pixels of this form field. | | | `required` | ```boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldCheckbox.md index f2153cbc1..2ee1b9e5e 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldCheckbox.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'checkbox'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldDateSigned.md index ada92f315..8996ce7a3 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldDateSigned.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'date_signed'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldDropdown.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldDropdown.md index c868840bd..35cadabb5 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldDropdown.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'dropdown'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldHyperlink.md index fadb22b4f..6ba74dff4 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldHyperlink.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `isMultiline` | ```boolean``` | Whether this form field is multiline text. | | | `originalFontSize` | ```number``` | Original font size used in this form field's text. | | | `fontFamily` | ```string``` | Font family used in this form field's text. | | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldInitials.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldInitials.md index 9040699a9..ab0ccda06 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldInitials.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'initials'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldRadio.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldRadio.md index 409352e50..3b888caf7 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldRadio.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'radio'] | +| `group`*_required_ | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldSignature.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldSignature.md index 3336b5b0d..b46f1d963 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldSignature.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'signature'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldText.md b/sdks/node/docs/model/TemplateResponseDocumentFormFieldText.md index c335bce0a..25a86e871 100644 --- a/sdks/node/docs/model/TemplateResponseDocumentFormFieldText.md +++ b/sdks/node/docs/model/TemplateResponseDocumentFormFieldText.md @@ -12,5 +12,6 @@ Name | Type | Description | Notes | `originalFontSize` | ```number``` | Original font size used in this form field's text. | | | `fontFamily` | ```string``` | Font family used in this form field's text. | | | `validationType` | ```string``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/accountResponseQuotas.ts b/sdks/node/model/accountResponseQuotas.ts index 3553070d7..5bc605e4f 100644 --- a/sdks/node/model/accountResponseQuotas.ts +++ b/sdks/node/model/accountResponseQuotas.ts @@ -45,7 +45,7 @@ export class AccountResponseQuotas { */ "templatesLeft"?: number | null; /** - * SMS verifications remaining. + * SMS verifications remaining. */ "smsVerificationsLeft"?: number | null; /** diff --git a/sdks/node/model/apiAppResponseOAuth.ts b/sdks/node/model/apiAppResponseOAuth.ts index bd8d8fd29..cefb71be1 100644 --- a/sdks/node/model/apiAppResponseOAuth.ts +++ b/sdks/node/model/apiAppResponseOAuth.ts @@ -35,7 +35,7 @@ export class ApiAppResponseOAuth { /** * The app\'s OAuth secret, or null if the app does not belong to user. */ - "secret"?: string; + "secret"?: string | null; /** * Array of OAuth scopes used by the app. */ diff --git a/sdks/node/model/faxGetResponse.ts b/sdks/node/model/faxGetResponse.ts new file mode 100644 index 000000000..aa016746a --- /dev/null +++ b/sdks/node/model/faxGetResponse.ts @@ -0,0 +1,59 @@ +/** + * 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 } from "./"; +import { FaxResponse } from "./faxResponse"; +import { WarningResponse } from "./warningResponse"; + +export class FaxGetResponse { + "fax": FaxResponse; + /** + * A list of warnings. + */ + "warnings"?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "fax", + baseName: "fax", + type: "FaxResponse", + }, + { + name: "warnings", + baseName: "warnings", + type: "Array", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxGetResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxGetResponse { + return ObjectSerializer.deserialize(data, "FaxGetResponse"); + } +} diff --git a/sdks/node/model/faxListResponse.ts b/sdks/node/model/faxListResponse.ts new file mode 100644 index 000000000..f3bb7bec7 --- /dev/null +++ b/sdks/node/model/faxListResponse.ts @@ -0,0 +1,56 @@ +/** + * 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 } from "./"; +import { FaxResponse } from "./faxResponse"; +import { ListInfoResponse } from "./listInfoResponse"; + +export class FaxListResponse { + "faxes": Array; + "listInfo": ListInfoResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "faxes", + baseName: "faxes", + type: "Array", + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxListResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxListResponse { + return ObjectSerializer.deserialize(data, "FaxListResponse"); + } +} diff --git a/sdks/node/model/faxResponse.ts b/sdks/node/model/faxResponse.ts new file mode 100644 index 000000000..1697d212a --- /dev/null +++ b/sdks/node/model/faxResponse.ts @@ -0,0 +1,133 @@ +/** + * 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 } from "./"; +import { FaxResponseTransmission } from "./faxResponseTransmission"; + +export class FaxResponse { + /** + * Fax ID + */ + "faxId": string; + /** + * Fax Title + */ + "title": string; + /** + * Fax Original Title + */ + "originalTitle": string; + /** + * Fax Subject + */ + "subject": string; + /** + * Fax Message + */ + "message": string; + /** + * Fax Metadata + */ + "metadata": { [key: string]: any }; + /** + * Fax Created At Timestamp + */ + "createdAt": number; + /** + * Fax Sender Email + */ + "sender": string; + /** + * Fax Transmissions List + */ + "transmissions": Array; + /** + * Fax Files URL + */ + "filesUrl": string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "faxId", + baseName: "fax_id", + 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: "sender", + baseName: "sender", + type: "string", + }, + { + name: "transmissions", + baseName: "transmissions", + type: "Array", + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxResponse { + return ObjectSerializer.deserialize(data, "FaxResponse"); + } +} diff --git a/sdks/node/model/faxResponseTransmission.ts b/sdks/node/model/faxResponseTransmission.ts new file mode 100644 index 000000000..f43034a9d --- /dev/null +++ b/sdks/node/model/faxResponseTransmission.ts @@ -0,0 +1,91 @@ +/** + * 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 } from "./"; + +export class FaxResponseTransmission { + /** + * Fax Transmission Recipient + */ + "recipient": string; + /** + * Fax Transmission Sender + */ + "sender": string; + /** + * Fax Transmission Status Code + */ + "statusCode": FaxResponseTransmission.StatusCodeEnum; + /** + * Fax Transmission Sent Timestamp + */ + "sentAt"?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string", + }, + { + name: "sender", + baseName: "sender", + type: "string", + }, + { + name: "statusCode", + baseName: "status_code", + type: "FaxResponseTransmission.StatusCodeEnum", + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxResponseTransmission.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxResponseTransmission { + return ObjectSerializer.deserialize(data, "FaxResponseTransmission"); + } +} + +export namespace FaxResponseTransmission { + export enum StatusCodeEnum { + Success = "success", + Transmitting = "transmitting", + ErrorCouldNotFax = "error_could_not_fax", + ErrorUnknown = "error_unknown", + ErrorBusy = "error_busy", + ErrorNoAnswer = "error_no_answer", + ErrorDisconnected = "error_disconnected", + ErrorBadDestination = "error_bad_destination", + } +} diff --git a/sdks/node/model/faxSendRequest.ts b/sdks/node/model/faxSendRequest.ts new file mode 100644 index 000000000..11ee71ef4 --- /dev/null +++ b/sdks/node/model/faxSendRequest.ts @@ -0,0 +1,123 @@ +/** + * 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 "./"; + +export class FaxSendRequest { + /** + * Fax Send To Recipient + */ + "recipient": string; + /** + * Fax Send From Sender (used only with fax number) + */ + "sender"?: string; + /** + * Fax File to Send + */ + "files"?: Array; + /** + * Fax File URL to Send + */ + "fileUrls"?: Array; + /** + * API Test Mode Setting + */ + "testMode"?: boolean = false; + /** + * Fax Cover Page for Recipient + */ + "coverPageTo"?: string; + /** + * Fax Cover Page for Sender + */ + "coverPageFrom"?: string; + /** + * Fax Cover Page Message + */ + "coverPageMessage"?: string; + /** + * Fax Title + */ + "title"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: 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(): AttributeTypeMap { + return FaxSendRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxSendRequest { + return ObjectSerializer.deserialize(data, "FaxSendRequest"); + } +} diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index c59b28024..7813c02fc 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -33,6 +33,7 @@ import { EventCallbackHelper } from "./eventCallbackHelper"; import { EventCallbackRequest } from "./eventCallbackRequest"; import { EventCallbackRequestEvent } from "./eventCallbackRequestEvent"; import { EventCallbackRequestEventMetadata } from "./eventCallbackRequestEventMetadata"; +import { FaxGetResponse } from "./faxGetResponse"; import { FaxLineAddUserRequest } from "./faxLineAddUserRequest"; import { FaxLineAreaCodeGetCountryEnum } from "./faxLineAreaCodeGetCountryEnum"; import { FaxLineAreaCodeGetProvinceEnum } from "./faxLineAreaCodeGetProvinceEnum"; @@ -44,6 +45,10 @@ import { FaxLineListResponse } from "./faxLineListResponse"; import { FaxLineRemoveUserRequest } from "./faxLineRemoveUserRequest"; import { FaxLineResponse } from "./faxLineResponse"; import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { FaxListResponse } from "./faxListResponse"; +import { FaxResponse } from "./faxResponse"; +import { FaxResponseTransmission } from "./faxResponseTransmission"; +import { FaxSendRequest } from "./faxSendRequest"; import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; @@ -203,6 +208,8 @@ export let enumsMap: { [index: string]: any } = { FaxLineAreaCodeGetProvinceEnum: FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetStateEnum: FaxLineAreaCodeGetStateEnum, "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, + "FaxResponseTransmission.StatusCodeEnum": + FaxResponseTransmission.StatusCodeEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum: @@ -279,6 +286,7 @@ export let typeMap: { [index: string]: any } = { EventCallbackRequest: EventCallbackRequest, EventCallbackRequestEvent: EventCallbackRequestEvent, EventCallbackRequestEventMetadata: EventCallbackRequestEventMetadata, + FaxGetResponse: FaxGetResponse, FaxLineAddUserRequest: FaxLineAddUserRequest, FaxLineAreaCodeGetResponse: FaxLineAreaCodeGetResponse, FaxLineCreateRequest: FaxLineCreateRequest, @@ -287,6 +295,10 @@ export let typeMap: { [index: string]: any } = { FaxLineRemoveUserRequest: FaxLineRemoveUserRequest, FaxLineResponse: FaxLineResponse, FaxLineResponseFaxLine: FaxLineResponseFaxLine, + FaxListResponse: FaxListResponse, + FaxResponse: FaxResponse, + FaxResponseTransmission: FaxResponseTransmission, + FaxSendRequest: FaxSendRequest, FileResponse: FileResponse, FileResponseDataUri: FileResponseDataUri, ListInfoResponse: ListInfoResponse, @@ -499,6 +511,7 @@ export { EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, @@ -510,6 +523,10 @@ export { FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, + FaxListResponse, + FaxResponse, + FaxResponseTransmission, + FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, diff --git a/sdks/node/model/oAuthTokenRefreshRequest.ts b/sdks/node/model/oAuthTokenRefreshRequest.ts index e6c6848b6..2f8971dd5 100644 --- a/sdks/node/model/oAuthTokenRefreshRequest.ts +++ b/sdks/node/model/oAuthTokenRefreshRequest.ts @@ -33,6 +33,14 @@ export class OAuthTokenRefreshRequest { * The token provided when you got the expired access token. */ "refreshToken": string; + /** + * The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + */ + "clientId"?: string; + /** + * The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + */ + "clientSecret"?: string; static discriminator: string | undefined = undefined; @@ -47,6 +55,16 @@ export class OAuthTokenRefreshRequest { baseName: "refresh_token", type: "string", }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/subWhiteLabelingOptions.ts b/sdks/node/model/subWhiteLabelingOptions.ts index 17a64f32e..0c1c50286 100644 --- a/sdks/node/model/subWhiteLabelingOptions.ts +++ b/sdks/node/model/subWhiteLabelingOptions.ts @@ -28,21 +28,21 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; * An array of elements and values serialized to a string, to be used to customize the app\'s signer page. (Only applies to some API plans) Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. */ export class SubWhiteLabelingOptions { - "headerBackgroundColor"?: string = "#1A1A1A"; + "headerBackgroundColor"?: string = "#1a1a1a"; "legalVersion"?: SubWhiteLabelingOptions.LegalVersionEnum = SubWhiteLabelingOptions.LegalVersionEnum.Terms1; - "linkColor"?: string = "#00B3E6"; - "pageBackgroundColor"?: string = "#F7F8F9"; - "primaryButtonColor"?: string = "#00B3E6"; - "primaryButtonColorHover"?: string = "#00B3E6"; - "primaryButtonTextColor"?: string = "#FFFFFF"; - "primaryButtonTextColorHover"?: string = "#FFFFFF"; - "secondaryButtonColor"?: string = "#FFFFFF"; - "secondaryButtonColorHover"?: string = "#FFFFFF"; - "secondaryButtonTextColor"?: string = "#00B3E6"; - "secondaryButtonTextColorHover"?: string = "#00B3E6"; + "linkColor"?: string = "#0061FE"; + "pageBackgroundColor"?: string = "#f7f8f9"; + "primaryButtonColor"?: string = "#0061FE"; + "primaryButtonColorHover"?: string = "#0061FE"; + "primaryButtonTextColor"?: string = "#ffffff"; + "primaryButtonTextColorHover"?: string = "#ffffff"; + "secondaryButtonColor"?: string = "#ffffff"; + "secondaryButtonColorHover"?: string = "#ffffff"; + "secondaryButtonTextColor"?: string = "#0061FE"; + "secondaryButtonTextColorHover"?: string = "#0061FE"; "textColor1"?: string = "#808080"; - "textColor2"?: string = "#FFFFFF"; + "textColor2"?: string = "#ffffff"; /** * Resets white labeling options to defaults. Only useful when updating an API App. */ diff --git a/sdks/node/model/templateResponse.ts b/sdks/node/model/templateResponse.ts index 88df4c09b..81dc1a4a3 100644 --- a/sdks/node/model/templateResponse.ts +++ b/sdks/node/model/templateResponse.ts @@ -23,6 +23,7 @@ */ import { AttributeTypeMap, ObjectSerializer } from "./"; +import { SignatureRequestResponseAttachment } from "./signatureRequestResponseAttachment"; import { TemplateResponseAccount } from "./templateResponseAccount"; import { TemplateResponseCCRole } from "./templateResponseCCRole"; import { TemplateResponseDocument } from "./templateResponseDocument"; @@ -51,21 +52,21 @@ export class TemplateResponse { */ "updatedAt"?: number; /** - * `true` if this template was created using an embedded flow, `false` if it was created on our website. + * `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. */ "isEmbedded"?: boolean | null; /** * `true` if you are the owner of this template, `false` if it\'s been shared with you by a team member. */ - "isCreator"?: boolean | null; + "isCreator"?: boolean; /** * Indicates whether edit rights have been granted to you by the owner (always `true` if that\'s you). */ - "canEdit"?: boolean | null; + "canEdit"?: boolean; /** * Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. */ - "isLocked"?: boolean | null; + "isLocked"?: boolean; /** * The metadata attached to the template. */ @@ -93,7 +94,11 @@ export class TemplateResponse { /** * An array of the Accounts that can use this Template. */ - "accounts"?: Array | null; + "accounts"?: Array; + /** + * Signer attachments. + */ + "attachments"?: Array; static discriminator: string | undefined = undefined; @@ -173,6 +178,11 @@ export class TemplateResponse { baseName: "accounts", type: "Array", }, + { + name: "attachments", + baseName: "attachments", + type: "Array", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocument.ts b/sdks/node/model/templateResponseDocument.ts index 0c7a19e02..681736701 100644 --- a/sdks/node/model/templateResponseDocument.ts +++ b/sdks/node/model/templateResponseDocument.ts @@ -52,7 +52,7 @@ export class TemplateResponseDocument { /** * An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. */ - "staticFields"?: Array | null; + "staticFields"?: Array; static discriminator: string | undefined = undefined; diff --git a/sdks/node/model/templateResponseDocumentFormFieldBase.ts b/sdks/node/model/templateResponseDocumentFormFieldBase.ts index 94242a4a9..e28159b30 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldBase.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldBase.ts @@ -61,10 +61,6 @@ export abstract class TemplateResponseDocumentFormFieldBase { * Boolean showing whether or not this field is required. */ "required"?: boolean; - /** - * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - */ - "group"?: string | null; static discriminator: string | undefined = "type"; @@ -114,11 +110,6 @@ export abstract class TemplateResponseDocumentFormFieldBase { baseName: "required", type: "boolean", }, - { - name: "group", - baseName: "group", - type: "string", - }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldCheckbox.ts b/sdks/node/model/templateResponseDocumentFormFieldCheckbox.ts index 5e0b6d88b..e27a9fd0a 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldCheckbox.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldCheckbox.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseD * 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` */ "type": string = "checkbox"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseD baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldDateSigned.ts b/sdks/node/model/templateResponseDocumentFormFieldDateSigned.ts index b510aa57f..08ce11026 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldDateSigned.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldDateSigned.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldDateSigned extends TemplateRespons * 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` */ "type": string = "date_signed"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldDateSigned extends TemplateRespons baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldDropdown.ts b/sdks/node/model/templateResponseDocumentFormFieldDropdown.ts index e2878febc..0aeb3e4e0 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldDropdown.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldDropdown.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseD * 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` */ "type": string = "dropdown"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseD baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldHyperlink.ts b/sdks/node/model/templateResponseDocumentFormFieldHyperlink.ts index 4a5998959..a3693ec83 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldHyperlink.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldHyperlink.ts @@ -47,6 +47,10 @@ export class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponse * Font family used in this form field\'s text. */ "fontFamily"?: string; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -76,6 +80,11 @@ export class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponse baseName: "fontFamily", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldInitials.ts b/sdks/node/model/templateResponseDocumentFormFieldInitials.ts index 1b14087a4..02f89a99e 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldInitials.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldInitials.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldInitials extends TemplateResponseD * 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` */ "type": string = "initials"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldInitials extends TemplateResponseD baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldRadio.ts b/sdks/node/model/templateResponseDocumentFormFieldRadio.ts index 3a20f95a0..0841c0d5a 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldRadio.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldRadio.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocu * 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` */ "type": string = "radio"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group": string; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocu baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldSignature.ts b/sdks/node/model/templateResponseDocumentFormFieldSignature.ts index c069e00aa..8467c9103 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldSignature.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldSignature.ts @@ -33,6 +33,10 @@ export class TemplateResponseDocumentFormFieldSignature extends TemplateResponse * 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` */ "type": string = "signature"; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -42,6 +46,11 @@ export class TemplateResponseDocumentFormFieldSignature extends TemplateResponse baseName: "type", type: "string", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/templateResponseDocumentFormFieldText.ts b/sdks/node/model/templateResponseDocumentFormFieldText.ts index 2c320d342..e758496f8 100644 --- a/sdks/node/model/templateResponseDocumentFormFieldText.ts +++ b/sdks/node/model/templateResponseDocumentFormFieldText.ts @@ -51,6 +51,10 @@ export class TemplateResponseDocumentFormFieldText extends TemplateResponseDocum * 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. */ "validationType"?: TemplateResponseDocumentFormFieldText.ValidationTypeEnum; + /** + * The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + */ + "group"?: string | null; static discriminator: string | undefined = undefined; @@ -85,6 +89,11 @@ export class TemplateResponseDocumentFormFieldText extends TemplateResponseDocum baseName: "validation_type", type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum", }, + { + name: "group", + baseName: "group", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/openapi-config.yaml b/sdks/node/openapi-config.yaml index a2a896d93..96b59f548 100644 --- a/sdks/node/openapi-config.yaml +++ b/sdks/node/openapi-config.yaml @@ -2,7 +2,7 @@ generatorName: typescript-node typeMappings: {} additionalProperties: npmName: "@dropbox/sign" - npmVersion: 1.6-dev + npmVersion: 1.7-dev supportsES6: true apiDocPath: ./docs/api modelDocPath: ./docs/model diff --git a/sdks/node/package-lock.json b/sdks/node/package-lock.json index 6596183a2..b39abe1d3 100644 --- a/sdks/node/package-lock.json +++ b/sdks/node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dropbox/sign", - "version": "1.6-dev", + "version": "1.7-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dropbox/sign", - "version": "1.6-dev", + "version": "1.7-dev", "dependencies": { "axios": "^1.7.0", "bluebird": "^3.7.2", diff --git a/sdks/node/package.json b/sdks/node/package.json index 2468838c0..36bde1ba6 100644 --- a/sdks/node/package.json +++ b/sdks/node/package.json @@ -1,6 +1,6 @@ { "name": "@dropbox/sign", - "version": "1.6-dev", + "version": "1.7-dev", "description": "Official Node client for Dropbox Sign", "repository": { "type": "git", diff --git a/sdks/node/run-build b/sdks/node/run-build index 9bf210d4a..09afd7e37 100755 --- a/sdks/node/run-build +++ b/sdks/node/run-build @@ -7,6 +7,17 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/javascript" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/api/"*.ts +rm -f "${DIR}/model/"*.ts +rm -f "${DIR}/types/api/"*.ts +rm -f "${DIR}/types/model/"*.ts + # Generate code docker run --rm \ -v "${DIR}/:/local" \ diff --git a/sdks/node/types/api/apis.d.ts b/sdks/node/types/api/apis.d.ts index 8530ae249..032a26ad8 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.6-dev/node"; +export declare const USER_AGENT = "OpenAPI-Generator/1.7-dev/node"; export declare const generateFormData: (obj: any, typemap: AttributeTypeMap) => { localVarUseFormData: boolean; data: object; diff --git a/sdks/node/types/api/faxApi.d.ts b/sdks/node/types/api/faxApi.d.ts new file mode 100644 index 000000000..f18e42259 --- /dev/null +++ b/sdks/node/types/api/faxApi.d.ts @@ -0,0 +1,32 @@ +import { Authentication, FaxGetResponse, FaxListResponse, FaxSendRequest, HttpBasicAuth, HttpBearerAuth, Interceptor } from "../model"; +import { optionsI, returnTypeI, returnTypeT } from "./"; +export declare enum FaxApiApiKeys { +} +export declare class FaxApi { + protected _basePath: string; + protected _defaultHeaders: any; + protected _useQuerystring: boolean; + protected authentications: { + default: Authentication; + api_key: HttpBasicAuth; + oauth2: HttpBearerAuth; + }; + protected interceptors: Interceptor[]; + constructor(basePath?: string); + set useQuerystring(value: boolean); + set basePath(basePath: string); + set defaultHeaders(defaultHeaders: any); + get defaultHeaders(): any; + get basePath(): string; + setDefaultAuthentication(auth: Authentication): void; + setApiKey(key: string): void; + set username(username: string); + set password(password: string); + set accessToken(accessToken: string | (() => string)); + addInterceptor(interceptor: Interceptor): void; + faxDelete(faxId: string, options?: optionsI): Promise; + faxFiles(faxId: string, options?: optionsI): Promise>; + faxGet(faxId: string, options?: optionsI): Promise>; + faxList(page?: number, pageSize?: number, options?: optionsI): Promise>; + faxSend(faxSendRequest: FaxSendRequest, options?: optionsI): Promise>; +} diff --git a/sdks/node/types/api/index.d.ts b/sdks/node/types/api/index.d.ts index 567248c08..4fb28dcef 100644 --- a/sdks/node/types/api/index.d.ts +++ b/sdks/node/types/api/index.d.ts @@ -2,6 +2,7 @@ import { AccountApi } from "./accountApi"; import { ApiAppApi } from "./apiAppApi"; import { BulkSendJobApi } from "./bulkSendJobApi"; import { EmbeddedApi } from "./embeddedApi"; +import { FaxApi } from "./faxApi"; import { FaxLineApi } from "./faxLineApi"; import { OAuthApi } from "./oAuthApi"; import { ReportApi } from "./reportApi"; @@ -9,6 +10,6 @@ import { SignatureRequestApi } from "./signatureRequestApi"; import { TeamApi } from "./teamApi"; import { TemplateApi } from "./templateApi"; import { UnclaimedDraftApi } from "./unclaimedDraftApi"; -export { AccountApi, ApiAppApi, BulkSendJobApi, EmbeddedApi, FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, TeamApi, TemplateApi, UnclaimedDraftApi, }; +export { AccountApi, ApiAppApi, BulkSendJobApi, EmbeddedApi, FaxApi, FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, TeamApi, TemplateApi, UnclaimedDraftApi, }; export { generateFormData, HttpError, optionsI, queryParamsSerializer, returnTypeI, returnTypeT, toFormData, USER_AGENT, } from "./apis"; -export declare const APIS: (typeof AccountApi | typeof ApiAppApi | typeof BulkSendJobApi | typeof EmbeddedApi | typeof FaxLineApi | typeof OAuthApi | typeof ReportApi | typeof SignatureRequestApi | typeof TeamApi | typeof TemplateApi | typeof UnclaimedDraftApi)[]; +export declare const APIS: (typeof AccountApi | typeof ApiAppApi | typeof BulkSendJobApi | typeof EmbeddedApi | typeof FaxApi | typeof FaxLineApi | typeof OAuthApi | typeof ReportApi | typeof SignatureRequestApi | typeof TeamApi | typeof TemplateApi | typeof UnclaimedDraftApi)[]; diff --git a/sdks/node/types/model/apiAppResponseOAuth.d.ts b/sdks/node/types/model/apiAppResponseOAuth.d.ts index 13f00a82d..cd298f6fb 100644 --- a/sdks/node/types/model/apiAppResponseOAuth.d.ts +++ b/sdks/node/types/model/apiAppResponseOAuth.d.ts @@ -1,7 +1,7 @@ import { AttributeTypeMap } from "./"; export declare class ApiAppResponseOAuth { "callbackUrl"?: string; - "secret"?: string; + "secret"?: string | null; "scopes"?: Array; "chargesUsers"?: boolean; static discriminator: string | undefined; diff --git a/sdks/node/types/model/faxGetResponse.d.ts b/sdks/node/types/model/faxGetResponse.d.ts new file mode 100644 index 000000000..05b6196dd --- /dev/null +++ b/sdks/node/types/model/faxGetResponse.d.ts @@ -0,0 +1,11 @@ +import { AttributeTypeMap } from "./"; +import { FaxResponse } from "./faxResponse"; +import { WarningResponse } from "./warningResponse"; +export declare class FaxGetResponse { + "fax": FaxResponse; + "warnings"?: Array; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxGetResponse; +} diff --git a/sdks/node/types/model/faxListResponse.d.ts b/sdks/node/types/model/faxListResponse.d.ts new file mode 100644 index 000000000..e36e8a061 --- /dev/null +++ b/sdks/node/types/model/faxListResponse.d.ts @@ -0,0 +1,11 @@ +import { AttributeTypeMap } from "./"; +import { FaxResponse } from "./faxResponse"; +import { ListInfoResponse } from "./listInfoResponse"; +export declare class FaxListResponse { + "faxes": Array; + "listInfo": ListInfoResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxListResponse; +} diff --git a/sdks/node/types/model/faxResponse.d.ts b/sdks/node/types/model/faxResponse.d.ts new file mode 100644 index 000000000..6aa5f2d0a --- /dev/null +++ b/sdks/node/types/model/faxResponse.d.ts @@ -0,0 +1,20 @@ +import { AttributeTypeMap } from "./"; +import { FaxResponseTransmission } from "./faxResponseTransmission"; +export declare class FaxResponse { + "faxId": string; + "title": string; + "originalTitle": string; + "subject": string; + "message": string; + "metadata": { + [key: string]: any; + }; + "createdAt": number; + "sender": string; + "transmissions": Array; + "filesUrl": string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxResponse; +} diff --git a/sdks/node/types/model/faxResponseTransmission.d.ts b/sdks/node/types/model/faxResponseTransmission.d.ts new file mode 100644 index 000000000..f1d587fc4 --- /dev/null +++ b/sdks/node/types/model/faxResponseTransmission.d.ts @@ -0,0 +1,23 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxResponseTransmission { + "recipient": string; + "sender": string; + "statusCode": FaxResponseTransmission.StatusCodeEnum; + "sentAt"?: number; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxResponseTransmission; +} +export declare namespace FaxResponseTransmission { + enum StatusCodeEnum { + Success = "success", + Transmitting = "transmitting", + ErrorCouldNotFax = "error_could_not_fax", + ErrorUnknown = "error_unknown", + ErrorBusy = "error_busy", + ErrorNoAnswer = "error_no_answer", + ErrorDisconnected = "error_disconnected", + ErrorBadDestination = "error_bad_destination" + } +} diff --git a/sdks/node/types/model/faxSendRequest.d.ts b/sdks/node/types/model/faxSendRequest.d.ts new file mode 100644 index 000000000..95454724e --- /dev/null +++ b/sdks/node/types/model/faxSendRequest.d.ts @@ -0,0 +1,16 @@ +import { AttributeTypeMap, RequestFile } from "./"; +export declare class FaxSendRequest { + "recipient": string; + "sender"?: string; + "files"?: Array; + "fileUrls"?: Array; + "testMode"?: boolean; + "coverPageTo"?: string; + "coverPageFrom"?: string; + "coverPageMessage"?: string; + "title"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxSendRequest; +} diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index ad7859941..664b47950 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -33,6 +33,7 @@ import { EventCallbackHelper } from "./eventCallbackHelper"; import { EventCallbackRequest } from "./eventCallbackRequest"; import { EventCallbackRequestEvent } from "./eventCallbackRequestEvent"; import { EventCallbackRequestEventMetadata } from "./eventCallbackRequestEventMetadata"; +import { FaxGetResponse } from "./faxGetResponse"; import { FaxLineAddUserRequest } from "./faxLineAddUserRequest"; import { FaxLineAreaCodeGetCountryEnum } from "./faxLineAreaCodeGetCountryEnum"; import { FaxLineAreaCodeGetProvinceEnum } from "./faxLineAreaCodeGetProvinceEnum"; @@ -44,6 +45,10 @@ import { FaxLineListResponse } from "./faxLineListResponse"; import { FaxLineRemoveUserRequest } from "./faxLineRemoveUserRequest"; import { FaxLineResponse } from "./faxLineResponse"; import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { FaxListResponse } from "./faxListResponse"; +import { FaxResponse } from "./faxResponse"; +import { FaxResponseTransmission } from "./faxResponseTransmission"; +import { FaxSendRequest } from "./faxSendRequest"; import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; @@ -189,4 +194,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, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, 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, 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/oAuthTokenRefreshRequest.d.ts b/sdks/node/types/model/oAuthTokenRefreshRequest.d.ts index 53211884e..71f3d108f 100644 --- a/sdks/node/types/model/oAuthTokenRefreshRequest.d.ts +++ b/sdks/node/types/model/oAuthTokenRefreshRequest.d.ts @@ -2,6 +2,8 @@ import { AttributeTypeMap } from "./"; export declare class OAuthTokenRefreshRequest { "grantType": string; "refreshToken": string; + "clientId"?: string; + "clientSecret"?: string; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponse.d.ts b/sdks/node/types/model/templateResponse.d.ts index 8ac333e50..b063aef16 100644 --- a/sdks/node/types/model/templateResponse.d.ts +++ b/sdks/node/types/model/templateResponse.d.ts @@ -1,4 +1,5 @@ import { AttributeTypeMap } from "./"; +import { SignatureRequestResponseAttachment } from "./signatureRequestResponseAttachment"; import { TemplateResponseAccount } from "./templateResponseAccount"; import { TemplateResponseCCRole } from "./templateResponseCCRole"; import { TemplateResponseDocument } from "./templateResponseDocument"; @@ -11,16 +12,17 @@ export declare class TemplateResponse { "message"?: string; "updatedAt"?: number; "isEmbedded"?: boolean | null; - "isCreator"?: boolean | null; - "canEdit"?: boolean | null; - "isLocked"?: boolean | null; + "isCreator"?: boolean; + "canEdit"?: boolean; + "isLocked"?: boolean; "metadata"?: object; "signerRoles"?: Array; "ccRoles"?: Array; "documents"?: Array; "customFields"?: Array | null; "namedFormFields"?: Array | null; - "accounts"?: Array | null; + "accounts"?: Array; + "attachments"?: Array; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocument.d.ts b/sdks/node/types/model/templateResponseDocument.d.ts index 41b453769..c16b393ed 100644 --- a/sdks/node/types/model/templateResponseDocument.d.ts +++ b/sdks/node/types/model/templateResponseDocument.d.ts @@ -9,7 +9,7 @@ export declare class TemplateResponseDocument { "fieldGroups"?: Array; "formFields"?: Array; "customFields"?: Array; - "staticFields"?: Array | null; + "staticFields"?: Array; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldBase.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldBase.d.ts index 6df5fc173..f2ae3c899 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldBase.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldBase.d.ts @@ -9,7 +9,6 @@ export declare abstract class TemplateResponseDocumentFormFieldBase { "width"?: number; "height"?: number; "required"?: boolean; - "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldCheckbox.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldCheckbox.d.ts index 0748b1e43..40adf3c30 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldCheckbox.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldCheckbox.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { "type": string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldDateSigned.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldDateSigned.d.ts index d66f2cb86..d755cb483 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldDateSigned.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldDateSigned.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { "type": string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldDropdown.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldDropdown.d.ts index deb3e5bc7..b9f96a26f 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldDropdown.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldDropdown.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { "type": string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldHyperlink.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldHyperlink.d.ts index 4d10cf269..856574e09 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldHyperlink.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldHyperlink.d.ts @@ -7,6 +7,7 @@ export declare class TemplateResponseDocumentFormFieldHyperlink extends Template "isMultiline"?: boolean; "originalFontSize"?: number; "fontFamily"?: string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldInitials.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldInitials.d.ts index c935be083..6a1a035f5 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldInitials.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldInitials.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { "type": string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldRadio.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldRadio.d.ts index c3f174782..e0fc8a2bb 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldRadio.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldRadio.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { "type": string; + "group": string; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldSignature.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldSignature.d.ts index 06a96343d..d005bd0ee 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldSignature.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldSignature.d.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "./"; import { TemplateResponseDocumentFormFieldBase } from "./templateResponseDocumentFormFieldBase"; export declare class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { "type": string; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/templateResponseDocumentFormFieldText.d.ts b/sdks/node/types/model/templateResponseDocumentFormFieldText.d.ts index 9a65fc2ce..5f6dcb4f1 100644 --- a/sdks/node/types/model/templateResponseDocumentFormFieldText.d.ts +++ b/sdks/node/types/model/templateResponseDocumentFormFieldText.d.ts @@ -8,6 +8,7 @@ export declare class TemplateResponseDocumentFormFieldText extends TemplateRespo "originalFontSize"?: number; "fontFamily"?: string; "validationType"?: TemplateResponseDocumentFormFieldText.ValidationTypeEnum; + "group"?: string | null; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/php/README.md b/sdks/php/README.md index b68ace90a..a37c54fe5 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -53,7 +53,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow ```json { "require": { - "dropbox/sign": "^1.3.0" + "dropbox/sign": "^1.7.0" }, "minimum-stability": "dev" } @@ -64,7 +64,7 @@ Then run `composer install` Alternatively, install directly with ``` -composer require dropbox/sign:^1.3.0 +composer require dropbox/sign:^1.7.0 ``` ## Getting Started @@ -160,6 +160,11 @@ All URIs are relative to *https://api.hellosign.com/v3* | *BulkSendJobApi* | [**bulkSendJobList**](docs/Api/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs | | *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* | [**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 | | *FaxLineApi* | [**faxLineAddUser**](docs/Api/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User | | *FaxLineApi* | [**faxLineAreaCodeGet**](docs/Api/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | | *FaxLineApi* | [**faxLineCreate**](docs/Api/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line | @@ -197,7 +202,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TeamApi* | [**teamSubTeams**](docs/Api/TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | *TeamApi* | [**teamUpdate**](docs/Api/TeamApi.md#teamupdate) | **PUT** /team | Update Team | | *TemplateApi* | [**templateAddUser**](docs/Api/TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template | -| *TemplateApi* | [**templateCreate**](docs/Api/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | +| *TemplateApi* | [**templateCreate**](docs/Api/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | | *TemplateApi* | [**templateCreateEmbeddedDraft**](docs/Api/TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | *TemplateApi* | [**templateDelete**](docs/Api/TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template | | *TemplateApi* | [**templateFiles**](docs/Api/TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -249,6 +254,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [EventCallbackRequest](docs/Model/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/Model/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/Model/EventCallbackRequestEventMetadata.md) +- [FaxGetResponse](docs/Model/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/Model/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/Model/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/Model/FaxLineAreaCodeGetProvinceEnum.md) @@ -260,6 +266,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FaxLineRemoveUserRequest](docs/Model/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/Model/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/Model/FaxLineResponseFaxLine.md) +- [FaxListResponse](docs/Model/FaxListResponse.md) +- [FaxResponse](docs/Model/FaxResponse.md) +- [FaxResponseTransmission](docs/Model/FaxResponseTransmission.md) +- [FaxSendRequest](docs/Model/FaxSendRequest.md) - [FileResponse](docs/Model/FileResponse.md) - [FileResponseDataUri](docs/Model/FileResponseDataUri.md) - [ListInfoResponse](docs/Model/ListInfoResponse.md) @@ -429,6 +439,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.6-dev` + - Package version: `1.7-dev` - Generator version: `7.8.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/sdks/php/VERSION b/sdks/php/VERSION index 78ca9a102..b19f5be06 100644 --- a/sdks/php/VERSION +++ b/sdks/php/VERSION @@ -1 +1 @@ -1.6-dev +1.7-dev diff --git a/sdks/php/docs/Api/FaxApi.md b/sdks/php/docs/Api/FaxApi.md new file mode 100644 index 000000000..8b68458c6 --- /dev/null +++ b/sdks/php/docs/Api/FaxApi.md @@ -0,0 +1,314 @@ +# Dropbox\Sign\FaxApi + +All URIs are relative to https://api.hellosign.com/v3. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**faxDelete()**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**faxGet()**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax | +| [**faxList()**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes | +| [**faxSend()**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax | + + +## `faxDelete()` + +```php +faxDelete($fax_id) +``` +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +```php +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()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_id** | **string**| Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxFiles()` + +```php +faxFiles($fax_id): \SplFileObject +``` +List Fax Files + +Returns list of fax files + +### Example + +```php +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()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_id** | **string**| Fax ID | | + +### Return type + +**\SplFileObject** + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/pdf`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxGet()` + +```php +faxGet($fax_id): \Dropbox\Sign\Model\FaxGetResponse +``` +Get Fax + +Returns information about fax + +### Example + +```php +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()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_id** | **string**| Fax ID | | + +### Return type + +[**\Dropbox\Sign\Model\FaxGetResponse**](../Model/FaxGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxList()` + +```php +faxList($page, $page_size): \Dropbox\Sign\Model\FaxListResponse +``` +Lists Faxes + +Returns properties of multiple faxes + +### Example + +```php +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()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **page** | **int**| Page | [optional] [default to 1] | +| **page_size** | **int**| Page size | [optional] [default to 20] | + +### Return type + +[**\Dropbox\Sign\Model\FaxListResponse**](../Model/FaxListResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + +## `faxSend()` + +```php +faxSend($fax_send_request): \Dropbox\Sign\Model\FaxGetResponse +``` +Send Fax + +Action to prepare and send a fax + +### Example + +```php +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()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_send_request** | [**\Dropbox\Sign\Model\FaxSendRequest**](../Model/FaxSendRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\FaxGetResponse**](../Model/FaxGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) diff --git a/sdks/php/docs/Api/SignatureRequestApi.md b/sdks/php/docs/Api/SignatureRequestApi.md index 373d1215c..aa4979035 100644 --- a/sdks/php/docs/Api/SignatureRequestApi.md +++ b/sdks/php/docs/Api/SignatureRequestApi.md @@ -227,7 +227,7 @@ signatureRequestCancel($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]`. +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 diff --git a/sdks/php/docs/Api/TemplateApi.md b/sdks/php/docs/Api/TemplateApi.md index 3331db8dd..5381a8290 100644 --- a/sdks/php/docs/Api/TemplateApi.md +++ b/sdks/php/docs/Api/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to https://api.hellosign.com/v3. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**templateAddUser()**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template | -| [**templateCreate()**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template | +| [**templateCreate()**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template | | [**templateCreateEmbeddedDraft()**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | [**templateDelete()**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template | | [**templateFiles()**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -88,7 +88,7 @@ try { ```php templateCreate($template_create_request): \Dropbox\Sign\Model\TemplateCreateResponse ``` -Create Template +Create Template Creates a template that can then be used. diff --git a/sdks/php/docs/Model/AccountResponseQuotas.md b/sdks/php/docs/Model/AccountResponseQuotas.md index 9490fa320..96399403d 100644 --- a/sdks/php/docs/Model/AccountResponseQuotas.md +++ b/sdks/php/docs/Model/AccountResponseQuotas.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `documents_left` | ```int``` | Signature requests remaining. | | | `templates_total` | ```int``` | Total API templates allowed. | | | `templates_left` | ```int``` | API templates remaining. | | -| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | | `num_fax_pages_left` | ```int``` | Number of fax pages left | | [[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/FaxGetResponse.md b/sdks/php/docs/Model/FaxGetResponse.md new file mode 100644 index 000000000..59bea7dc3 --- /dev/null +++ b/sdks/php/docs/Model/FaxGetResponse.md @@ -0,0 +1,12 @@ +# # FaxGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax`*_required_ | [```\Dropbox\Sign\Model\FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```\Dropbox\Sign\Model\WarningResponse[]```](WarningResponse.md) | A list of warnings. | | + +[[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/FaxListResponse.md b/sdks/php/docs/Model/FaxListResponse.md new file mode 100644 index 000000000..5ccdafc91 --- /dev/null +++ b/sdks/php/docs/Model/FaxListResponse.md @@ -0,0 +1,12 @@ +# # FaxListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxes`*_required_ | [```\Dropbox\Sign\Model\FaxResponse[]```](FaxResponse.md) | | | +| `list_info`*_required_ | [```\Dropbox\Sign\Model\ListInfoResponse```](ListInfoResponse.md) | | | + +[[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/FaxResponse.md b/sdks/php/docs/Model/FaxResponse.md new file mode 100644 index 000000000..5ee5930ca --- /dev/null +++ b/sdks/php/docs/Model/FaxResponse.md @@ -0,0 +1,20 @@ +# # FaxResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax_id`*_required_ | ```string``` | Fax ID | | +| `title`*_required_ | ```string``` | Fax Title | | +| `original_title`*_required_ | ```string``` | Fax Original Title | | +| `subject`*_required_ | ```string``` | Fax Subject | | +| `message`*_required_ | ```string``` | Fax Message | | +| `metadata`*_required_ | ```array``` | Fax Metadata | | +| `created_at`*_required_ | ```int``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```string``` | Fax Sender Email | | +| `transmissions`*_required_ | [```\Dropbox\Sign\Model\FaxResponseTransmission[]```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `files_url`*_required_ | ```string``` | Fax Files URL | | + +[[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/FaxResponseTransmission.md b/sdks/php/docs/Model/FaxResponseTransmission.md new file mode 100644 index 000000000..421181a32 --- /dev/null +++ b/sdks/php/docs/Model/FaxResponseTransmission.md @@ -0,0 +1,14 @@ +# # FaxResponseTransmission + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```string``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```string``` | Fax Transmission Sender | | +| `status_code`*_required_ | ```string``` | Fax Transmission Status Code | | +| `sent_at` | ```int``` | Fax Transmission Sent Timestamp | | + +[[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 new file mode 100644 index 000000000..dcbf730c4 --- /dev/null +++ b/sdks/php/docs/Model/FaxSendRequest.md @@ -0,0 +1,19 @@ +# # FaxSendRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```\SplFileObject[]``` | Fax File to Send | | +| `file_urls` | ```string[]``` | Fax File URL to Send | | +| `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_message` | ```string``` | Fax Cover Page Message | | +| `title` | ```string``` | Fax Title | | + +[[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/OAuthTokenRefreshRequest.md b/sdks/php/docs/Model/OAuthTokenRefreshRequest.md index c9525386c..9ba09db42 100644 --- a/sdks/php/docs/Model/OAuthTokenRefreshRequest.md +++ b/sdks/php/docs/Model/OAuthTokenRefreshRequest.md @@ -8,5 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `grant_type`*_required_ | ```string``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```string``` | The token provided when you got the expired access token. | | +| `client_id` | ```string``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_secret` | ```string``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | [[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/SubWhiteLabelingOptions.md b/sdks/php/docs/Model/SubWhiteLabelingOptions.md index a8a07faac..976f55aaa 100644 --- a/sdks/php/docs/Model/SubWhiteLabelingOptions.md +++ b/sdks/php/docs/Model/SubWhiteLabelingOptions.md @@ -8,20 +8,20 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```string``` | | [default to '#1A1A1A'] | +| `header_background_color` | ```string``` | | [default to '#1a1a1a'] | | `legal_version` | ```string``` | | [default to 'terms1'] | -| `link_color` | ```string``` | | [default to '#00B3E6'] | -| `page_background_color` | ```string``` | | [default to '#F7F8F9'] | -| `primary_button_color` | ```string``` | | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```string``` | | [default to '#00B3E6'] | -| `primary_button_text_color` | ```string``` | | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```string``` | | [default to '#FFFFFF'] | -| `secondary_button_color` | ```string``` | | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```string``` | | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```string``` | | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```string``` | | [default to '#00B3E6'] | +| `link_color` | ```string``` | | [default to '#0061FE'] | +| `page_background_color` | ```string``` | | [default to '#f7f8f9'] | +| `primary_button_color` | ```string``` | | [default to '#0061FE'] | +| `primary_button_color_hover` | ```string``` | | [default to '#0061FE'] | +| `primary_button_text_color` | ```string``` | | [default to '#ffffff'] | +| `primary_button_text_color_hover` | ```string``` | | [default to '#ffffff'] | +| `secondary_button_color` | ```string``` | | [default to '#ffffff'] | +| `secondary_button_color_hover` | ```string``` | | [default to '#ffffff'] | +| `secondary_button_text_color` | ```string``` | | [default to '#0061FE'] | +| `secondary_button_text_color_hover` | ```string``` | | [default to '#0061FE'] | | `text_color1` | ```string``` | | [default to '#808080'] | -| `text_color2` | ```string``` | | [default to '#FFFFFF'] | +| `text_color2` | ```string``` | | [default to '#ffffff'] | | `reset_to_default` | ```bool``` | Resets white labeling options to defaults. Only useful when updating an API App. | | [[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/TemplateResponse.md b/sdks/php/docs/Model/TemplateResponse.md index 2d6d768fd..39a8ed303 100644 --- a/sdks/php/docs/Model/TemplateResponse.md +++ b/sdks/php/docs/Model/TemplateResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `title` | ```string``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```string``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updated_at` | ```int``` | Time the template was last updated. | | -| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `is_creator` | ```bool``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `can_edit` | ```bool``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `is_locked` | ```bool``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -21,5 +21,6 @@ Name | Type | Description | Notes | `custom_fields` | [```\Dropbox\Sign\Model\TemplateResponseDocumentCustomFieldBase[]```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `named_form_fields` | [```\Dropbox\Sign\Model\TemplateResponseDocumentFormFieldBase[]```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```\Dropbox\Sign\Model\TemplateResponseAccount[]```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | [[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/TemplateResponseDocumentFormFieldBase.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md index 087f01080..f792fdfed 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldBase.md @@ -15,6 +15,5 @@ Name | Type | Description | Notes | `width` | ```int``` | The width in pixels of this form field. | | | `height` | ```int``` | The height in pixels of this form field. | | | `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md index f2153cbc1..2ee1b9e5e 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldCheckbox.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'checkbox'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md index ada92f315..8996ce7a3 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDateSigned.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'date_signed'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldDropdown.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md index c868840bd..35cadabb5 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldDropdown.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'dropdown'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md index d7e53fb84..ce0ff23b5 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldHyperlink.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `is_multiline` | ```bool``` | Whether this form field is multiline text. | | | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```string``` | Font family used in this form field's text. | | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldInitials.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md index 9040699a9..ab0ccda06 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldInitials.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'initials'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldRadio.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md index 409352e50..3b888caf7 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldRadio.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'radio'] | +| `group`*_required_ | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldSignature.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md index 3336b5b0d..b46f1d963 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldSignature.md @@ -7,5 +7,6 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'signature'] | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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/TemplateResponseDocumentFormFieldText.md b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md index 512bb9f15..e6af0e041 100644 --- a/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md +++ b/sdks/php/docs/Model/TemplateResponseDocumentFormFieldText.md @@ -12,5 +12,6 @@ Name | Type | Description | Notes | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```string``` | Font family used in this form field's text. | | | `validation_type` | ```string``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```string``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 b7a3b76d5..a86f11b5b 100644 --- a/sdks/php/openapi-config.yaml +++ b/sdks/php/openapi-config.yaml @@ -3,8 +3,8 @@ typeMappings: "object": "array" additionalProperties: packageName: dropbox/sign - packageVersion: "^1.3.0" - artifactVersion: 1.6-dev + packageVersion: "^1.7.0" + artifactVersion: 1.7-dev invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src diff --git a/sdks/php/run-build b/sdks/php/run-build index f2d645a92..8723998b1 100755 --- a/sdks/php/run-build +++ b/sdks/php/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/php" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/Api/"*.php +rm -f "${DIR}/src/Model/"*.php + docker run --rm \ -v "${DIR}/:/local" \ -v "${DIR}/openapi-sdk.yaml:/local/openapi-sdk.yaml" \ diff --git a/sdks/php/src/Api/FaxApi.php b/sdks/php/src/Api/FaxApi.php new file mode 100644 index 000000000..0ae0cf38d --- /dev/null +++ b/sdks/php/src/Api/FaxApi.php @@ -0,0 +1,1803 @@ + [ + 'application/json', + ], + 'faxFiles' => [ + 'application/json', + ], + 'faxGet' => [ + 'application/json', + ], + 'faxList' => [ + 'application/json', + ], + 'faxSend' => [ + 'application/json', + 'multipart/form-data', + ], + ]; + + /** @var ResponseInterface|null */ + protected $response; + + /** + * @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, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + * @deprecated To be made private in the future + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + * @deprecated To be made private in the future + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Operation faxDelete + * + * Delete Fax + * + * @param string $fax_id Fax ID (required) + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function faxDelete(string $fax_id) + { + $this->faxDeleteWithHttpInfo($fax_id); + } + + /** + * Operation faxDeleteWithHttpInfo + * + * Delete Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxDelete'] to see the possible values for this operation + * + * @return array of null, 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 ::faxDelete. This method will eventually become unavailable + */ + public function faxDeleteWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxDelete'][0]) + { + $request = $this->faxDeleteRequest($fax_id, $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(); + + 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')) { + throw $e; + } + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation faxDeleteAsync + * + * Delete Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxDelete'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxDelete. This method will eventually become unavailable + */ + public function faxDeleteAsync(string $fax_id, string $contentType = self::contentTypes['faxDelete'][0]) + { + return $this->faxDeleteAsyncWithHttpInfo($fax_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxDeleteAsyncWithHttpInfo + * + * Delete Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxDelete'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxDelete. This method will eventually become unavailable + */ + public function faxDeleteAsyncWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxDelete'][0]) + { + $returnType = ''; + $request = $this->faxDeleteRequest($fax_id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) { + return [null, $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 'faxDelete' + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxDelete'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxDelete. This method will eventually become unavailable + */ + public function faxDeleteRequest(string $fax_id, string $contentType = self::contentTypes['faxDelete'][0]) + { + // verify the required parameter 'fax_id' is set + if ($fax_id === null || (is_array($fax_id) && count($fax_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_id when calling faxDelete' + ); + } + + $resourcePath = '/fax/{fax_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($fax_id !== null) { + $resourcePath = str_replace( + '{fax_id}', + ObjectSerializer::toPathValue($fax_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (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'], + ]; + } + + $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() . ':'); + } + + $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( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxFiles + * + * List Fax Files + * + * @param string $fax_id Fax ID (required) + * + * @return SplFileObject + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function faxFiles(string $fax_id) + { + list($response) = $this->faxFilesWithHttpInfo($fax_id); + return $response; + } + + /** + * Operation faxFilesWithHttpInfo + * + * List 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 + * + * @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 ::faxFiles. This method will eventually become unavailable + */ + public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxFiles'][0]) + { + $request = $this->faxFilesRequest($fax_id, $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(); + + 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', + '\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(), + ]; + } + + $returnType = '\SplFileObject'; + 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(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation faxFilesAsync + * + * List 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 + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxFiles. This method will eventually become unavailable + */ + public function faxFilesAsync(string $fax_id, string $contentType = self::contentTypes['faxFiles'][0]) + { + return $this->faxFilesAsyncWithHttpInfo($fax_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxFilesAsyncWithHttpInfo + * + * List 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 + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxFiles. This method will eventually become unavailable + */ + public function faxFilesAsyncWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxFiles'][0]) + { + $returnType = '\SplFileObject'; + $request = $this->faxFilesRequest($fax_id, $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 'faxFiles' + * + * @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 + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxFiles. This method will eventually become unavailable + */ + public function faxFilesRequest(string $fax_id, string $contentType = self::contentTypes['faxFiles'][0]) + { + // verify the required parameter 'fax_id' is set + if ($fax_id === null || (is_array($fax_id) && count($fax_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_id when calling faxFiles' + ); + } + + $resourcePath = '/fax/files/{fax_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($fax_id !== null) { + $resourcePath = str_replace( + '{fax_id}', + ObjectSerializer::toPathValue($fax_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/pdf', 'application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (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'], + ]; + } + + $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() . ':'); + } + + $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( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxGet + * + * Get Fax + * + * @param string $fax_id Fax ID (required) + * + * @return Model\FaxGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function faxGet(string $fax_id) + { + list($response) = $this->faxGetWithHttpInfo($fax_id); + return $response; + } + + /** + * Operation faxGetWithHttpInfo + * + * Get Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxGet'] to see the possible values for this operation + * + * @return array of Model\FaxGetResponse, 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 ::faxGet. This method will eventually become unavailable + */ + public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxGet'][0]) + { + $request = $this->faxGetRequest($fax_id, $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(); + + 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', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\FaxGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\FaxGetResponse' !== '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\FaxGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; + 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\FaxGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation faxGetAsync + * + * Get Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxGet. This method will eventually become unavailable + */ + public function faxGetAsync(string $fax_id, string $contentType = self::contentTypes['faxGet'][0]) + { + return $this->faxGetAsyncWithHttpInfo($fax_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxGetAsyncWithHttpInfo + * + * Get Fax + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxGet. This method will eventually become unavailable + */ + public function faxGetAsyncWithHttpInfo(string $fax_id, string $contentType = self::contentTypes['faxGet'][0]) + { + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; + $request = $this->faxGetRequest($fax_id, $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 'faxGet' + * + * @param string $fax_id Fax ID (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxGet'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxGet. This method will eventually become unavailable + */ + public function faxGetRequest(string $fax_id, string $contentType = self::contentTypes['faxGet'][0]) + { + // verify the required parameter 'fax_id' is set + if ($fax_id === null || (is_array($fax_id) && count($fax_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_id when calling faxGet' + ); + } + + $resourcePath = '/fax/{fax_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if ($fax_id !== null) { + $resourcePath = str_replace( + '{fax_id}', + ObjectSerializer::toPathValue($fax_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (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'], + ]; + } + + $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() . ':'); + } + + $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( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxList + * + * Lists Faxes + * + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (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) + { + list($response) = $this->faxListWithHttpInfo($page, $page_size); + return $response; + } + + /** + * Operation faxListWithHttpInfo + * + * 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 + * + * @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]) + { + $request = $this->faxListRequest($page, $page_size, $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(); + + 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', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\FaxListResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\FaxListResponse' !== '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\FaxListResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxListResponse'; + 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\FaxListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation faxListAsync + * + * 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 + * + * @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]) + { + return $this->faxListAsyncWithHttpInfo($page, $page_size, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxListAsyncWithHttpInfo + * + * 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 + * + * @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]) + { + $returnType = '\Dropbox\Sign\Model\FaxListResponse'; + $request = $this->faxListRequest($page, $page_size, $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 '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 + * + * @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]) + { + if ($page !== null && $page < 1) { + throw new InvalidArgumentException('invalid value for "$page" when calling FaxApi.faxList, must be bigger than or equal to 1.'); + } + + if ($page_size !== null && $page_size > 100) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling FaxApi.faxList, must be smaller than or equal to 100.'); + } + if ($page_size !== null && $page_size < 1) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling FaxApi.faxList, must be bigger than or equal to 1.'); + } + + $resourcePath = '/fax/list'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_size, + 'page_size', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (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'], + ]; + } + + $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() . ':'); + } + + $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( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxSend + * + * Send Fax + * + * @param Model\FaxSendRequest $fax_send_request fax_send_request (required) + * + * @return Model\FaxGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function faxSend(Model\FaxSendRequest $fax_send_request) + { + list($response) = $this->faxSendWithHttpInfo($fax_send_request); + return $response; + } + + /** + * Operation faxSendWithHttpInfo + * + * Send Fax + * + * @param Model\FaxSendRequest $fax_send_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxSend'] to see the possible values for this operation + * + * @return array of Model\FaxGetResponse, 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 ::faxSend. This method will eventually become unavailable + */ + public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, string $contentType = self::contentTypes['faxSend'][0]) + { + $request = $this->faxSendRequest($fax_send_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(); + + 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', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\FaxGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\FaxGetResponse' !== '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\FaxGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; + 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\FaxGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation faxSendAsync + * + * Send Fax + * + * @param Model\FaxSendRequest $fax_send_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxSend'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxSend. This method will eventually become unavailable + */ + public function faxSendAsync(Model\FaxSendRequest $fax_send_request, string $contentType = self::contentTypes['faxSend'][0]) + { + return $this->faxSendAsyncWithHttpInfo($fax_send_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxSendAsyncWithHttpInfo + * + * Send Fax + * + * @param Model\FaxSendRequest $fax_send_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxSend'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxSend. This method will eventually become unavailable + */ + public function faxSendAsyncWithHttpInfo(Model\FaxSendRequest $fax_send_request, string $contentType = self::contentTypes['faxSend'][0]) + { + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; + $request = $this->faxSendRequest($fax_send_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 'faxSend' + * + * @param Model\FaxSendRequest $fax_send_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxSend'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::faxSend. This method will eventually become unavailable + */ + public function faxSendRequest(Model\FaxSendRequest $fax_send_request, string $contentType = self::contentTypes['faxSend'][0]) + { + // verify the required parameter 'fax_send_request' is set + if ($fax_send_request === null || (is_array($fax_send_request) && count($fax_send_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_send_request when calling faxSend' + ); + } + + $resourcePath = '/fax/send'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $fax_send_request + ); + + $multipart = !empty($formParams); + + $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($fax_send_request)); + } else { + $httpBody = $fax_send_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, $fax_send_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() . ':'); + } + + $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( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @return array of http client options + * @throws RuntimeException on file opening failure + */ + protected function createHttpClientOption() + { + $options = $this->config->getOptions(); + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + /** + * @return object|array|null + */ + private function handleRangeCodeResponse( + ResponseInterface $response, + string $rangeCode, + string $returnDataType + ) { + $statusCode = $response->getStatusCode(); + $rangeCodeLeft = (int)(substr($rangeCode, 0, 1) . '00'); + $rangeCodeRight = (int)(substr($rangeCode, 0, 1) . '99'); + + if ( + $statusCode < $rangeCodeLeft + || $statusCode > $rangeCodeRight + ) { + return null; + } + + if ($returnDataType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnDataType, []), + $statusCode, + $response->getHeaders(), + ]; + } + + /** + * @return object|array|null + */ + private function handleRangeCodeException( + ApiException $e, + string $rangeCode, + string $exceptionDataType + ): bool { + $statusCode = $e->getCode(); + $rangeCodeLeft = (int)(substr($rangeCode, 0, 1) . '00'); + $rangeCodeRight = (int)(substr($rangeCode, 0, 1) . '99'); + + if ( + $statusCode < $rangeCodeLeft + || $statusCode > $rangeCodeRight + ) { + return false; + } + + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + $exceptionDataType, + $e->getResponseHeaders() + ); + + $e->setResponseObject($data); + + return true; + } +} diff --git a/sdks/php/src/Api/OAuthApi.php b/sdks/php/src/Api/OAuthApi.php index 6fa77398a..81468626d 100644 --- a/sdks/php/src/Api/OAuthApi.php +++ b/sdks/php/src/Api/OAuthApi.php @@ -211,6 +211,15 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ ); } + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + switch ($statusCode) { case 200: if ('\Dropbox\Sign\Model\OAuthTokenResponse' === '\SplFileObject') { @@ -269,6 +278,9 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $response->getHeaders(), ]; } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( @@ -582,6 +594,15 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ ); } + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + switch ($statusCode) { case 200: if ('\Dropbox\Sign\Model\OAuthTokenResponse' === '\SplFileObject') { @@ -640,6 +661,9 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $response->getHeaders(), ]; } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( diff --git a/sdks/php/src/Api/TemplateApi.php b/sdks/php/src/Api/TemplateApi.php index 6b356fc7b..091dc84d6 100644 --- a/sdks/php/src/Api/TemplateApi.php +++ b/sdks/php/src/Api/TemplateApi.php @@ -525,7 +525,7 @@ public function templateAddUserRequest(string $template_id, Model\TemplateAddUse /** * Operation templateCreate * - * Create Template + * Create Template * * @param Model\TemplateCreateRequest $template_create_request template_create_request (required) * @@ -542,7 +542,7 @@ public function templateCreate(Model\TemplateCreateRequest $template_create_requ /** * Operation templateCreateWithHttpInfo * - * Create Template + * Create Template * * @param Model\TemplateCreateRequest $template_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateCreate'] to see the possible values for this operation @@ -679,7 +679,7 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template /** * Operation templateCreateAsync * - * Create Template + * Create Template * * @param Model\TemplateCreateRequest $template_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateCreate'] to see the possible values for this operation @@ -701,7 +701,7 @@ function ($response) { /** * Operation templateCreateAsyncWithHttpInfo * - * Create Template + * Create Template * * @param Model\TemplateCreateRequest $template_create_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateCreate'] to see the possible values for this operation diff --git a/sdks/php/src/Configuration.php b/sdks/php/src/Configuration.php index 8d4d1a042..50242d164 100644 --- a/sdks/php/src/Configuration.php +++ b/sdks/php/src/Configuration.php @@ -97,7 +97,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.6-dev/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.7-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.6-dev' . PHP_EOL; + $report .= ' SDK Package Version: 1.7-dev' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/sdks/php/src/Model/AccountResponseQuotas.php b/sdks/php/src/Model/AccountResponseQuotas.php index 3ec8d7a9e..85d004055 100644 --- a/sdks/php/src/Model/AccountResponseQuotas.php +++ b/sdks/php/src/Model/AccountResponseQuotas.php @@ -479,7 +479,7 @@ public function getSmsVerificationsLeft() /** * Sets sms_verifications_left * - * @param int|null $sms_verifications_left SMS verifications remaining + * @param int|null $sms_verifications_left SMS verifications remaining * * @return self */ diff --git a/sdks/php/src/Model/ApiAppResponseOAuth.php b/sdks/php/src/Model/ApiAppResponseOAuth.php index 57a61134a..ac2ecf08b 100644 --- a/sdks/php/src/Model/ApiAppResponseOAuth.php +++ b/sdks/php/src/Model/ApiAppResponseOAuth.php @@ -85,7 +85,7 @@ class ApiAppResponseOAuth implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'callback_url' => false, - 'secret' => false, + 'secret' => true, 'scopes' => false, 'charges_users' => false, ]; @@ -364,7 +364,14 @@ public function getSecret() public function setSecret(?string $secret) { if (is_null($secret)) { - throw new InvalidArgumentException('non-nullable secret cannot be null'); + array_push($this->openAPINullablesSetToNull, 'secret'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('secret', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['secret'] = $secret; diff --git a/sdks/php/src/Model/FaxGetResponse.php b/sdks/php/src/Model/FaxGetResponse.php new file mode 100644 index 000000000..232943492 --- /dev/null +++ b/sdks/php/src/Model/FaxGetResponse.php @@ -0,0 +1,450 @@ + + */ +class FaxGetResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxGetResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fax' => '\Dropbox\Sign\Model\FaxResponse', + 'warnings' => '\Dropbox\Sign\Model\WarningResponse[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fax' => null, + 'warnings' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'fax' => false, + 'warnings' => 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 = [ + 'fax' => 'fax', + 'warnings' => 'warnings', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fax' => 'setFax', + 'warnings' => 'setWarnings', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fax' => 'getFax', + 'warnings' => 'getWarnings', + ]; + + /** + * 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[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('fax', $data ?? [], null); + $this->setIfExists('warnings', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): FaxGetResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): FaxGetResponse + { + /** @var FaxGetResponse */ + return ObjectSerializer::deserialize( + $data, + FaxGetResponse::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['fax'] === null) { + $invalidProperties[] = "'fax' can't be null"; + } + 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 fax + * + * @return FaxResponse + */ + public function getFax() + { + return $this->container['fax']; + } + + /** + * Sets fax + * + * @param FaxResponse $fax fax + * + * @return self + */ + public function setFax(FaxResponse $fax) + { + if (is_null($fax)) { + throw new InvalidArgumentException('non-nullable fax cannot be null'); + } + $this->container['fax'] = $fax; + + return $this; + } + + /** + * Gets warnings + * + * @return WarningResponse[]|null + */ + public function getWarnings() + { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param WarningResponse[]|null $warnings a list of warnings + * + * @return self + */ + public function setWarnings(?array $warnings) + { + if (is_null($warnings)) { + throw new InvalidArgumentException('non-nullable warnings cannot be null'); + } + $this->container['warnings'] = $warnings; + + 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/FaxListResponse.php b/sdks/php/src/Model/FaxListResponse.php new file mode 100644 index 000000000..21e89d342 --- /dev/null +++ b/sdks/php/src/Model/FaxListResponse.php @@ -0,0 +1,453 @@ + + */ +class FaxListResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'faxes' => '\Dropbox\Sign\Model\FaxResponse[]', + 'list_info' => '\Dropbox\Sign\Model\ListInfoResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'faxes' => null, + 'list_info' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'faxes' => false, + 'list_info' => 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 = [ + 'faxes' => 'faxes', + 'list_info' => 'list_info', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'faxes' => 'setFaxes', + 'list_info' => 'setListInfo', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'faxes' => 'getFaxes', + 'list_info' => 'getListInfo', + ]; + + /** + * 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[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('faxes', $data ?? [], null); + $this->setIfExists('list_info', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): FaxListResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): FaxListResponse + { + /** @var FaxListResponse */ + return ObjectSerializer::deserialize( + $data, + FaxListResponse::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['faxes'] === null) { + $invalidProperties[] = "'faxes' can't be null"; + } + if ($this->container['list_info'] === null) { + $invalidProperties[] = "'list_info' can't be null"; + } + 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 faxes + * + * @return FaxResponse[] + */ + public function getFaxes() + { + return $this->container['faxes']; + } + + /** + * Sets faxes + * + * @param FaxResponse[] $faxes faxes + * + * @return self + */ + public function setFaxes(array $faxes) + { + if (is_null($faxes)) { + throw new InvalidArgumentException('non-nullable faxes cannot be null'); + } + $this->container['faxes'] = $faxes; + + return $this; + } + + /** + * Gets list_info + * + * @return ListInfoResponse + */ + public function getListInfo() + { + return $this->container['list_info']; + } + + /** + * Sets list_info + * + * @param ListInfoResponse $list_info list_info + * + * @return self + */ + public function setListInfo(ListInfoResponse $list_info) + { + if (is_null($list_info)) { + throw new InvalidArgumentException('non-nullable list_info cannot be null'); + } + $this->container['list_info'] = $list_info; + + 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/FaxResponse.php b/sdks/php/src/Model/FaxResponse.php new file mode 100644 index 000000000..b60d54baa --- /dev/null +++ b/sdks/php/src/Model/FaxResponse.php @@ -0,0 +1,749 @@ + + */ +class FaxResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fax_id' => 'string', + 'title' => 'string', + 'original_title' => 'string', + 'subject' => 'string', + 'message' => 'string', + 'metadata' => 'array', + 'created_at' => 'int', + 'sender' => 'string', + 'transmissions' => '\Dropbox\Sign\Model\FaxResponseTransmission[]', + 'files_url' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fax_id' => null, + 'title' => null, + 'original_title' => null, + 'subject' => null, + 'message' => null, + 'metadata' => null, + 'created_at' => null, + 'sender' => null, + 'transmissions' => null, + 'files_url' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'fax_id' => false, + 'title' => false, + 'original_title' => false, + 'subject' => false, + 'message' => false, + 'metadata' => false, + 'created_at' => false, + 'sender' => false, + 'transmissions' => false, + 'files_url' => 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 = [ + 'fax_id' => 'fax_id', + 'title' => 'title', + 'original_title' => 'original_title', + 'subject' => 'subject', + 'message' => 'message', + 'metadata' => 'metadata', + 'created_at' => 'created_at', + 'sender' => 'sender', + 'transmissions' => 'transmissions', + 'files_url' => 'files_url', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fax_id' => 'setFaxId', + 'title' => 'setTitle', + 'original_title' => 'setOriginalTitle', + 'subject' => 'setSubject', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'created_at' => 'setCreatedAt', + 'sender' => 'setSender', + 'transmissions' => 'setTransmissions', + 'files_url' => 'setFilesUrl', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fax_id' => 'getFaxId', + 'title' => 'getTitle', + 'original_title' => 'getOriginalTitle', + 'subject' => 'getSubject', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'created_at' => 'getCreatedAt', + 'sender' => 'getSender', + 'transmissions' => 'getTransmissions', + 'files_url' => 'getFilesUrl', + ]; + + /** + * 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[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('fax_id', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('original_title', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('sender', $data ?? [], null); + $this->setIfExists('transmissions', $data ?? [], null); + $this->setIfExists('files_url', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): FaxResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): FaxResponse + { + /** @var FaxResponse */ + return ObjectSerializer::deserialize( + $data, + FaxResponse::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['fax_id'] === null) { + $invalidProperties[] = "'fax_id' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ($this->container['original_title'] === null) { + $invalidProperties[] = "'original_title' can't be null"; + } + if ($this->container['subject'] === null) { + $invalidProperties[] = "'subject' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; + } + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['transmissions'] === null) { + $invalidProperties[] = "'transmissions' can't be null"; + } + if ($this->container['files_url'] === null) { + $invalidProperties[] = "'files_url' can't be null"; + } + 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 fax_id + * + * @return string + */ + public function getFaxId() + { + return $this->container['fax_id']; + } + + /** + * Sets fax_id + * + * @param string $fax_id Fax ID + * + * @return self + */ + public function setFaxId(string $fax_id) + { + if (is_null($fax_id)) { + throw new InvalidArgumentException('non-nullable fax_id cannot be null'); + } + $this->container['fax_id'] = $fax_id; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Fax Title + * + * @return self + */ + public function setTitle(string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets original_title + * + * @return string + */ + public function getOriginalTitle() + { + return $this->container['original_title']; + } + + /** + * Sets original_title + * + * @param string $original_title Fax Original Title + * + * @return self + */ + public function setOriginalTitle(string $original_title) + { + if (is_null($original_title)) { + throw new InvalidArgumentException('non-nullable original_title cannot be null'); + } + $this->container['original_title'] = $original_title; + + return $this; + } + + /** + * Gets subject + * + * @return string + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string $subject Fax Subject + * + * @return self + */ + public function setSubject(string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Fax Message + * + * @return self + */ + public function setMessage(string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array $metadata Fax Metadata + * + * @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 created_at + * + * @return int + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param int $created_at Fax Created At Timestamp + * + * @return self + */ + public function setCreatedAt(int $created_at) + { + if (is_null($created_at)) { + throw new InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Fax Sender Email + * + * @return self + */ + public function setSender(string $sender) + { + if (is_null($sender)) { + throw new InvalidArgumentException('non-nullable sender cannot be null'); + } + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets transmissions + * + * @return FaxResponseTransmission[] + */ + public function getTransmissions() + { + return $this->container['transmissions']; + } + + /** + * Sets transmissions + * + * @param FaxResponseTransmission[] $transmissions Fax Transmissions List + * + * @return self + */ + public function setTransmissions(array $transmissions) + { + if (is_null($transmissions)) { + throw new InvalidArgumentException('non-nullable transmissions cannot be null'); + } + $this->container['transmissions'] = $transmissions; + + return $this; + } + + /** + * Gets files_url + * + * @return string + */ + public function getFilesUrl() + { + return $this->container['files_url']; + } + + /** + * Sets files_url + * + * @param string $files_url Fax Files URL + * + * @return self + */ + public function setFilesUrl(string $files_url) + { + if (is_null($files_url)) { + throw new InvalidArgumentException('non-nullable files_url cannot be null'); + } + $this->container['files_url'] = $files_url; + + 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/FaxResponseTransmission.php b/sdks/php/src/Model/FaxResponseTransmission.php new file mode 100644 index 000000000..049c5b407 --- /dev/null +++ b/sdks/php/src/Model/FaxResponseTransmission.php @@ -0,0 +1,571 @@ + + */ +class FaxResponseTransmission implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxResponseTransmission'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'recipient' => 'string', + 'sender' => 'string', + 'status_code' => 'string', + 'sent_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'recipient' => null, + 'sender' => null, + 'status_code' => null, + 'sent_at' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'recipient' => false, + 'sender' => false, + 'status_code' => false, + 'sent_at' => 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 = [ + 'recipient' => 'recipient', + 'sender' => 'sender', + 'status_code' => 'status_code', + 'sent_at' => 'sent_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'recipient' => 'setRecipient', + 'sender' => 'setSender', + 'status_code' => 'setStatusCode', + 'sent_at' => 'setSentAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'recipient' => 'getRecipient', + 'sender' => 'getSender', + 'status_code' => 'getStatusCode', + 'sent_at' => 'getSentAt', + ]; + + /** + * 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; + } + + public const STATUS_CODE_SUCCESS = 'success'; + public const STATUS_CODE_TRANSMITTING = 'transmitting'; + public const STATUS_CODE_ERROR_COULD_NOT_FAX = 'error_could_not_fax'; + public const STATUS_CODE_ERROR_UNKNOWN = 'error_unknown'; + public const STATUS_CODE_ERROR_BUSY = 'error_busy'; + public const STATUS_CODE_ERROR_NO_ANSWER = 'error_no_answer'; + public const STATUS_CODE_ERROR_DISCONNECTED = 'error_disconnected'; + public const STATUS_CODE_ERROR_BAD_DESTINATION = 'error_bad_destination'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusCodeAllowableValues() + { + return [ + self::STATUS_CODE_SUCCESS, + self::STATUS_CODE_TRANSMITTING, + self::STATUS_CODE_ERROR_COULD_NOT_FAX, + self::STATUS_CODE_ERROR_UNKNOWN, + self::STATUS_CODE_ERROR_BUSY, + self::STATUS_CODE_ERROR_NO_ANSWER, + self::STATUS_CODE_ERROR_DISCONNECTED, + self::STATUS_CODE_ERROR_BAD_DESTINATION, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('recipient', $data ?? [], null); + $this->setIfExists('sender', $data ?? [], null); + $this->setIfExists('status_code', $data ?? [], null); + $this->setIfExists('sent_at', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): FaxResponseTransmission + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): FaxResponseTransmission + { + /** @var FaxResponseTransmission */ + return ObjectSerializer::deserialize( + $data, + FaxResponseTransmission::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['recipient'] === null) { + $invalidProperties[] = "'recipient' can't be null"; + } + if ($this->container['sender'] === null) { + $invalidProperties[] = "'sender' can't be null"; + } + if ($this->container['status_code'] === null) { + $invalidProperties[] = "'status_code' can't be null"; + } + $allowedValues = $this->getStatusCodeAllowableValues(); + if (!is_null($this->container['status_code']) && !in_array($this->container['status_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status_code', must be one of '%s'", + $this->container['status_code'], + implode("', '", $allowedValues) + ); + } + + 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 recipient + * + * @return string + */ + public function getRecipient() + { + return $this->container['recipient']; + } + + /** + * Sets recipient + * + * @param string $recipient Fax Transmission Recipient + * + * @return self + */ + public function setRecipient(string $recipient) + { + if (is_null($recipient)) { + throw new InvalidArgumentException('non-nullable recipient cannot be null'); + } + $this->container['recipient'] = $recipient; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender Fax Transmission Sender + * + * @return self + */ + public function setSender(string $sender) + { + if (is_null($sender)) { + throw new InvalidArgumentException('non-nullable sender cannot be null'); + } + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets status_code + * + * @return string + */ + public function getStatusCode() + { + return $this->container['status_code']; + } + + /** + * Sets status_code + * + * @param string $status_code Fax Transmission Status Code + * + * @return self + */ + public function setStatusCode(string $status_code) + { + if (is_null($status_code)) { + throw new InvalidArgumentException('non-nullable status_code cannot be null'); + } + $allowedValues = $this->getStatusCodeAllowableValues(); + if (!in_array($status_code, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status_code', must be one of '%s'", + $status_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status_code'] = $status_code; + + return $this; + } + + /** + * Gets sent_at + * + * @return int|null + */ + public function getSentAt() + { + return $this->container['sent_at']; + } + + /** + * Sets sent_at + * + * @param int|null $sent_at Fax Transmission Sent Timestamp + * + * @return self + */ + public function setSentAt(?int $sent_at) + { + if (is_null($sent_at)) { + throw new InvalidArgumentException('non-nullable sent_at cannot be null'); + } + $this->container['sent_at'] = $sent_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/FaxSendRequest.php b/sdks/php/src/Model/FaxSendRequest.php new file mode 100644 index 000000000..d09573478 --- /dev/null +++ b/sdks/php/src/Model/FaxSendRequest.php @@ -0,0 +1,689 @@ + + */ +class FaxSendRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxSendRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'recipient' => 'string', + 'sender' => 'string', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'test_mode' => 'bool', + 'cover_page_to' => 'string', + 'cover_page_from' => 'string', + 'cover_page_message' => 'string', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'recipient' => null, + 'sender' => null, + 'files' => 'binary', + 'file_urls' => null, + 'test_mode' => null, + 'cover_page_to' => null, + 'cover_page_from' => null, + 'cover_page_message' => null, + 'title' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'recipient' => false, + 'sender' => false, + 'files' => false, + 'file_urls' => false, + 'test_mode' => false, + 'cover_page_to' => false, + 'cover_page_from' => false, + 'cover_page_message' => 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 = [ + 'recipient' => 'recipient', + 'sender' => 'sender', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'test_mode' => 'test_mode', + 'cover_page_to' => 'cover_page_to', + 'cover_page_from' => 'cover_page_from', + 'cover_page_message' => 'cover_page_message', + 'title' => 'title', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'recipient' => 'setRecipient', + 'sender' => 'setSender', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'test_mode' => 'setTestMode', + 'cover_page_to' => 'setCoverPageTo', + 'cover_page_from' => 'setCoverPageFrom', + 'cover_page_message' => 'setCoverPageMessage', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'recipient' => 'getRecipient', + 'sender' => 'getSender', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'test_mode' => 'getTestMode', + 'cover_page_to' => 'getCoverPageTo', + 'cover_page_from' => 'getCoverPageFrom', + 'cover_page_message' => 'getCoverPageMessage', + '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[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('recipient', $data ?? [], null); + $this->setIfExists('sender', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('cover_page_to', $data ?? [], null); + $this->setIfExists('cover_page_from', $data ?? [], null); + $this->setIfExists('cover_page_message', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): FaxSendRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): FaxSendRequest + { + /** @var FaxSendRequest */ + return ObjectSerializer::deserialize( + $data, + FaxSendRequest::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['recipient'] === null) { + $invalidProperties[] = "'recipient' can't be null"; + } + 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 recipient + * + * @return string + */ + public function getRecipient() + { + return $this->container['recipient']; + } + + /** + * Sets recipient + * + * @param string $recipient Fax Send To Recipient + * + * @return self + */ + public function setRecipient(string $recipient) + { + if (is_null($recipient)) { + throw new InvalidArgumentException('non-nullable recipient cannot be null'); + } + $this->container['recipient'] = $recipient; + + return $this; + } + + /** + * Gets sender + * + * @return string|null + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string|null $sender Fax Send From Sender (used only with fax number) + * + * @return self + */ + public function setSender(?string $sender) + { + if (is_null($sender)) { + throw new InvalidArgumentException('non-nullable sender cannot be null'); + } + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Fax File to Send + * + * @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 Fax File URL to Send + * + * @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 test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode API Test Mode Setting + * + * @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 cover_page_to + * + * @return string|null + */ + public function getCoverPageTo() + { + return $this->container['cover_page_to']; + } + + /** + * Sets cover_page_to + * + * @param string|null $cover_page_to Fax Cover Page for Recipient + * + * @return self + */ + public function setCoverPageTo(?string $cover_page_to) + { + if (is_null($cover_page_to)) { + throw new InvalidArgumentException('non-nullable cover_page_to cannot be null'); + } + $this->container['cover_page_to'] = $cover_page_to; + + return $this; + } + + /** + * Gets cover_page_from + * + * @return string|null + */ + public function getCoverPageFrom() + { + return $this->container['cover_page_from']; + } + + /** + * Sets cover_page_from + * + * @param string|null $cover_page_from Fax Cover Page for Sender + * + * @return self + */ + public function setCoverPageFrom(?string $cover_page_from) + { + if (is_null($cover_page_from)) { + throw new InvalidArgumentException('non-nullable cover_page_from cannot be null'); + } + $this->container['cover_page_from'] = $cover_page_from; + + return $this; + } + + /** + * Gets cover_page_message + * + * @return string|null + */ + public function getCoverPageMessage() + { + return $this->container['cover_page_message']; + } + + /** + * Sets cover_page_message + * + * @param string|null $cover_page_message Fax Cover Page Message + * + * @return self + */ + public function setCoverPageMessage(?string $cover_page_message) + { + if (is_null($cover_page_message)) { + throw new InvalidArgumentException('non-nullable cover_page_message cannot be null'); + } + $this->container['cover_page_message'] = $cover_page_message; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Fax Title + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + $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/OAuthTokenRefreshRequest.php b/sdks/php/src/Model/OAuthTokenRefreshRequest.php index c4c7f93be..11cf05a3b 100644 --- a/sdks/php/src/Model/OAuthTokenRefreshRequest.php +++ b/sdks/php/src/Model/OAuthTokenRefreshRequest.php @@ -59,6 +59,8 @@ class OAuthTokenRefreshRequest implements ModelInterface, ArrayAccess, JsonSeria protected static $openAPITypes = [ 'grant_type' => 'string', 'refresh_token' => 'string', + 'client_id' => 'string', + 'client_secret' => 'string', ]; /** @@ -71,6 +73,8 @@ class OAuthTokenRefreshRequest implements ModelInterface, ArrayAccess, JsonSeria protected static $openAPIFormats = [ 'grant_type' => null, 'refresh_token' => null, + 'client_id' => null, + 'client_secret' => null, ]; /** @@ -81,6 +85,8 @@ class OAuthTokenRefreshRequest implements ModelInterface, ArrayAccess, JsonSeria protected static array $openAPINullables = [ 'grant_type' => false, 'refresh_token' => false, + 'client_id' => false, + 'client_secret' => false, ]; /** @@ -163,6 +169,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'grant_type' => 'grant_type', 'refresh_token' => 'refresh_token', + 'client_id' => 'client_id', + 'client_secret' => 'client_secret', ]; /** @@ -173,6 +181,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'grant_type' => 'setGrantType', 'refresh_token' => 'setRefreshToken', + 'client_id' => 'setClientId', + 'client_secret' => 'setClientSecret', ]; /** @@ -183,6 +193,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'grant_type' => 'getGrantType', 'refresh_token' => 'getRefreshToken', + 'client_id' => 'getClientId', + 'client_secret' => 'getClientSecret', ]; /** @@ -243,6 +255,8 @@ public function __construct(array $data = null) { $this->setIfExists('grant_type', $data ?? [], 'refresh_token'); $this->setIfExists('refresh_token', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('client_secret', $data ?? [], null); } /** @@ -364,6 +378,60 @@ public function setRefreshToken(string $refresh_token) 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 for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + * + * @return 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 client_secret + * + * @return string|null + */ + public function getClientSecret() + { + return $this->container['client_secret']; + } + + /** + * Sets client_secret + * + * @param string|null $client_secret The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + * + * @return self + */ + public function setClientSecret(?string $client_secret) + { + if (is_null($client_secret)) { + throw new InvalidArgumentException('non-nullable client_secret cannot be null'); + } + $this->container['client_secret'] = $client_secret; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/SubWhiteLabelingOptions.php b/sdks/php/src/Model/SubWhiteLabelingOptions.php index 4f16b4928..0abcbd111 100644 --- a/sdks/php/src/Model/SubWhiteLabelingOptions.php +++ b/sdks/php/src/Model/SubWhiteLabelingOptions.php @@ -336,20 +336,20 @@ public function getLegalVersionAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('header_background_color', $data ?? [], '#1A1A1A'); + $this->setIfExists('header_background_color', $data ?? [], '#1a1a1a'); $this->setIfExists('legal_version', $data ?? [], 'terms1'); - $this->setIfExists('link_color', $data ?? [], '#00B3E6'); - $this->setIfExists('page_background_color', $data ?? [], '#F7F8F9'); - $this->setIfExists('primary_button_color', $data ?? [], '#00B3E6'); - $this->setIfExists('primary_button_color_hover', $data ?? [], '#00B3E6'); - $this->setIfExists('primary_button_text_color', $data ?? [], '#FFFFFF'); - $this->setIfExists('primary_button_text_color_hover', $data ?? [], '#FFFFFF'); - $this->setIfExists('secondary_button_color', $data ?? [], '#FFFFFF'); - $this->setIfExists('secondary_button_color_hover', $data ?? [], '#FFFFFF'); - $this->setIfExists('secondary_button_text_color', $data ?? [], '#00B3E6'); - $this->setIfExists('secondary_button_text_color_hover', $data ?? [], '#00B3E6'); + $this->setIfExists('link_color', $data ?? [], '#0061FE'); + $this->setIfExists('page_background_color', $data ?? [], '#f7f8f9'); + $this->setIfExists('primary_button_color', $data ?? [], '#0061FE'); + $this->setIfExists('primary_button_color_hover', $data ?? [], '#0061FE'); + $this->setIfExists('primary_button_text_color', $data ?? [], '#ffffff'); + $this->setIfExists('primary_button_text_color_hover', $data ?? [], '#ffffff'); + $this->setIfExists('secondary_button_color', $data ?? [], '#ffffff'); + $this->setIfExists('secondary_button_color_hover', $data ?? [], '#ffffff'); + $this->setIfExists('secondary_button_text_color', $data ?? [], '#0061FE'); + $this->setIfExists('secondary_button_text_color_hover', $data ?? [], '#0061FE'); $this->setIfExists('text_color1', $data ?? [], '#808080'); - $this->setIfExists('text_color2', $data ?? [], '#FFFFFF'); + $this->setIfExists('text_color2', $data ?? [], '#ffffff'); $this->setIfExists('reset_to_default', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateResponse.php b/sdks/php/src/Model/TemplateResponse.php index 4041f1856..fb8417b98 100644 --- a/sdks/php/src/Model/TemplateResponse.php +++ b/sdks/php/src/Model/TemplateResponse.php @@ -73,6 +73,7 @@ class TemplateResponse implements ModelInterface, ArrayAccess, JsonSerializable 'custom_fields' => '\Dropbox\Sign\Model\TemplateResponseDocumentCustomFieldBase[]', 'named_form_fields' => '\Dropbox\Sign\Model\TemplateResponseDocumentFormFieldBase[]', 'accounts' => '\Dropbox\Sign\Model\TemplateResponseAccount[]', + 'attachments' => '\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]', ]; /** @@ -98,6 +99,7 @@ class TemplateResponse implements ModelInterface, ArrayAccess, JsonSerializable 'custom_fields' => null, 'named_form_fields' => null, 'accounts' => null, + 'attachments' => null, ]; /** @@ -111,16 +113,17 @@ class TemplateResponse implements ModelInterface, ArrayAccess, JsonSerializable 'message' => false, 'updated_at' => false, 'is_embedded' => true, - 'is_creator' => true, - 'can_edit' => true, - 'is_locked' => true, + 'is_creator' => false, + 'can_edit' => false, + 'is_locked' => false, 'metadata' => false, 'signer_roles' => false, 'cc_roles' => false, 'documents' => false, 'custom_fields' => true, 'named_form_fields' => true, - 'accounts' => true, + 'accounts' => false, + 'attachments' => false, ]; /** @@ -216,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'custom_fields' => 'custom_fields', 'named_form_fields' => 'named_form_fields', 'accounts' => 'accounts', + 'attachments' => 'attachments', ]; /** @@ -239,6 +243,7 @@ public function isNullableSetToNull(string $property): bool 'custom_fields' => 'setCustomFields', 'named_form_fields' => 'setNamedFormFields', 'accounts' => 'setAccounts', + 'attachments' => 'setAttachments', ]; /** @@ -262,6 +267,7 @@ public function isNullableSetToNull(string $property): bool 'custom_fields' => 'getCustomFields', 'named_form_fields' => 'getNamedFormFields', 'accounts' => 'getAccounts', + 'attachments' => 'getAttachments', ]; /** @@ -335,6 +341,7 @@ public function __construct(array $data = null) $this->setIfExists('custom_fields', $data ?? [], null); $this->setIfExists('named_form_fields', $data ?? [], null); $this->setIfExists('accounts', $data ?? [], null); + $this->setIfExists('attachments', $data ?? [], null); } /** @@ -515,7 +522,7 @@ public function getIsEmbedded() /** * Sets is_embedded * - * @param bool|null $is_embedded `true` if this template was created using an embedded flow, `false` if it was created on our website + * @param bool|null $is_embedded `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. * * @return self */ @@ -556,14 +563,7 @@ public function getIsCreator() public function setIsCreator(?bool $is_creator) { if (is_null($is_creator)) { - array_push($this->openAPINullablesSetToNull, 'is_creator'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('is_creator', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable is_creator cannot be null'); } $this->container['is_creator'] = $is_creator; @@ -590,14 +590,7 @@ public function getCanEdit() public function setCanEdit(?bool $can_edit) { if (is_null($can_edit)) { - array_push($this->openAPINullablesSetToNull, 'can_edit'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('can_edit', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable can_edit cannot be null'); } $this->container['can_edit'] = $can_edit; @@ -624,14 +617,7 @@ public function getIsLocked() public function setIsLocked(?bool $is_locked) { if (is_null($is_locked)) { - array_push($this->openAPINullablesSetToNull, 'is_locked'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('is_locked', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable is_locked cannot be null'); } $this->container['is_locked'] = $is_locked; @@ -838,20 +824,40 @@ public function getAccounts() public function setAccounts(?array $accounts) { if (is_null($accounts)) { - array_push($this->openAPINullablesSetToNull, 'accounts'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accounts', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable accounts cannot be null'); } $this->container['accounts'] = $accounts; return $this; } + /** + * Gets attachments + * + * @return SignatureRequestResponseAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SignatureRequestResponseAttachment[]|null $attachments signer 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; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocument.php b/sdks/php/src/Model/TemplateResponseDocument.php index 5377d4ba9..02a88387d 100644 --- a/sdks/php/src/Model/TemplateResponseDocument.php +++ b/sdks/php/src/Model/TemplateResponseDocument.php @@ -92,7 +92,7 @@ class TemplateResponseDocument implements ModelInterface, ArrayAccess, JsonSeria 'field_groups' => false, 'form_fields' => false, 'custom_fields' => false, - 'static_fields' => true, + 'static_fields' => false, ]; /** @@ -485,14 +485,7 @@ public function getStaticFields() public function setStaticFields(?array $static_fields) { if (is_null($static_fields)) { - array_push($this->openAPINullablesSetToNull, 'static_fields'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('static_fields', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new InvalidArgumentException('non-nullable static_fields cannot be null'); } $this->container['static_fields'] = $static_fields; diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php index 33cc52c58..ecc03a7db 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php @@ -67,7 +67,6 @@ class TemplateResponseDocumentFormFieldBase implements ModelInterface, ArrayAcce 'width' => 'int', 'height' => 'int', 'required' => 'bool', - 'group' => 'string', ]; /** @@ -87,7 +86,6 @@ class TemplateResponseDocumentFormFieldBase implements ModelInterface, ArrayAcce 'width' => null, 'height' => null, 'required' => null, - 'group' => null, ]; /** @@ -105,7 +103,6 @@ class TemplateResponseDocumentFormFieldBase implements ModelInterface, ArrayAcce 'width' => false, 'height' => false, 'required' => false, - 'group' => true, ]; /** @@ -195,7 +192,6 @@ public function isNullableSetToNull(string $property): bool 'width' => 'width', 'height' => 'height', 'required' => 'required', - 'group' => 'group', ]; /** @@ -213,7 +209,6 @@ public function isNullableSetToNull(string $property): bool 'width' => 'setWidth', 'height' => 'setHeight', 'required' => 'setRequired', - 'group' => 'setGroup', ]; /** @@ -231,7 +226,6 @@ public function isNullableSetToNull(string $property): bool 'width' => 'getWidth', 'height' => 'getHeight', 'required' => 'getRequired', - 'group' => 'getGroup', ]; /** @@ -299,7 +293,6 @@ public function __construct(array $data = null) $this->setIfExists('width', $data ?? [], null); $this->setIfExists('height', $data ?? [], null); $this->setIfExists('required', $data ?? [], null); - $this->setIfExists('group', $data ?? [], null); // Initialize discriminator property with the model name. $this->container['type'] = static::$openAPIModelName; @@ -624,40 +617,6 @@ public function setRequired(?bool $required) return $this; } - /** - * Gets group - * - * @return string|null - */ - public function getGroup() - { - return $this->container['group']; - } - - /** - * Sets group - * - * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - * - * @return self - */ - public function setGroup(?string $group) - { - if (is_null($group)) { - array_push($this->openAPINullablesSetToNull, 'group'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('group', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['group'] = $group; - - return $this; - } - /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php index bd03254c4..a30010fc1 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocument */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocument */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocument */ protected static array $openAPINullables = [ 'type' => false, + 'group' => true, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'checkbox'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -321,6 +328,40 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php index 158d8159c..bd6072350 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocume */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocume */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocume */ protected static array $openAPINullables = [ 'type' => false, + 'group' => true, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'date_signed'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -321,6 +328,40 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php index 057b5d84d..3e4a827da 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocument */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocument */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocument */ protected static array $openAPINullables = [ 'type' => false, + 'group' => true, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'dropdown'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -321,6 +328,40 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php index 81ffda0ce..687269f79 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php @@ -61,6 +61,7 @@ class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumen 'is_multiline' => 'bool', 'original_font_size' => 'int', 'font_family' => 'string', + 'group' => 'string', ]; /** @@ -76,6 +77,7 @@ class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumen 'is_multiline' => null, 'original_font_size' => null, 'font_family' => null, + 'group' => null, ]; /** @@ -89,6 +91,7 @@ class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumen 'is_multiline' => false, 'original_font_size' => false, 'font_family' => false, + 'group' => true, ]; /** @@ -174,6 +177,7 @@ public function isNullableSetToNull(string $property): bool 'is_multiline' => 'isMultiline', 'original_font_size' => 'originalFontSize', 'font_family' => 'fontFamily', + 'group' => 'group', ]; /** @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'is_multiline' => 'setIsMultiline', 'original_font_size' => 'setOriginalFontSize', 'font_family' => 'setFontFamily', + 'group' => 'setGroup', ]; /** @@ -200,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'is_multiline' => 'getIsMultiline', 'original_font_size' => 'getOriginalFontSize', 'font_family' => 'getFontFamily', + 'group' => 'getGroup', ]; /** @@ -258,6 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('is_multiline', $data ?? [], null); $this->setIfExists('original_font_size', $data ?? [], null); $this->setIfExists('font_family', $data ?? [], null); + $this->setIfExists('group', $data ?? [], null); } /** @@ -457,6 +464,40 @@ public function setFontFamily(?string $font_family) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php index 976a27fba..101a6e955 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocument */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocument */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocument */ protected static array $openAPINullables = [ 'type' => false, + 'group' => true, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'initials'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -321,6 +328,40 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php index bd0d28e85..8fd494678 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFor */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFor */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFor */ protected static array $openAPINullables = [ 'type' => false, + 'group' => false, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'radio'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -280,6 +287,9 @@ public function listInvalidProperties() if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } + if ($this->container['group'] === null) { + $invalidProperties[] = "'group' can't be null"; + } return $invalidProperties; } @@ -321,6 +331,33 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(string $group) + { + if (is_null($group)) { + throw new InvalidArgumentException('non-nullable group cannot be null'); + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php index 9effb72b7..777777464 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php @@ -57,6 +57,7 @@ class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumen */ protected static $openAPITypes = [ 'type' => 'string', + 'group' => 'string', ]; /** @@ -68,6 +69,7 @@ class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumen */ protected static $openAPIFormats = [ 'type' => null, + 'group' => null, ]; /** @@ -77,6 +79,7 @@ class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumen */ protected static array $openAPINullables = [ 'type' => false, + 'group' => true, ]; /** @@ -158,6 +161,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', + 'group' => 'group', ]; /** @@ -167,6 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', + 'group' => 'setGroup', ]; /** @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', + 'group' => 'getGroup', ]; /** @@ -230,6 +236,7 @@ public function __construct(array $data = null) parent::__construct($data); $this->setIfExists('type', $data ?? [], 'signature'); + $this->setIfExists('group', $data ?? [], null); } /** @@ -321,6 +328,40 @@ public function setType(string $type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php index 0684e1d67..42c15b9ed 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php @@ -62,6 +62,7 @@ class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentForm 'original_font_size' => 'int', 'font_family' => 'string', 'validation_type' => 'string', + 'group' => 'string', ]; /** @@ -78,6 +79,7 @@ class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentForm 'original_font_size' => null, 'font_family' => null, 'validation_type' => null, + 'group' => null, ]; /** @@ -92,6 +94,7 @@ class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentForm 'original_font_size' => false, 'font_family' => false, 'validation_type' => true, + 'group' => true, ]; /** @@ -178,6 +181,7 @@ public function isNullableSetToNull(string $property): bool 'original_font_size' => 'originalFontSize', 'font_family' => 'fontFamily', 'validation_type' => 'validation_type', + 'group' => 'group', ]; /** @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'original_font_size' => 'setOriginalFontSize', 'font_family' => 'setFontFamily', 'validation_type' => 'setValidationType', + 'group' => 'setGroup', ]; /** @@ -206,6 +211,7 @@ public function isNullableSetToNull(string $property): bool 'original_font_size' => 'getOriginalFontSize', 'font_family' => 'getFontFamily', 'validation_type' => 'getValidationType', + 'group' => 'getGroup', ]; /** @@ -297,6 +303,7 @@ public function __construct(array $data = null) $this->setIfExists('original_font_size', $data ?? [], null); $this->setIfExists('font_family', $data ?? [], null); $this->setIfExists('validation_type', $data ?? [], null); + $this->setIfExists('group', $data ?? [], null); } /** @@ -549,6 +556,40 @@ public function setValidationType(?string $validation_type) return $this; } + /** + * Gets group + * + * @return string|null + */ + public function getGroup() + { + return $this->container['group']; + } + + /** + * Sets group + * + * @param string|null $group The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + * + * @return self + */ + public function setGroup(?string $group) + { + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['group'] = $group; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/python/README.md b/sdks/python/README.md index 15be18ce8..796399702 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -49,7 +49,7 @@ Python 3.7+ Install using `pip`: ```shell -python3 -m pip install dropbox-sign==1.6-dev +python3 -m pip install dropbox-sign==1.7-dev ``` Alternatively: @@ -115,6 +115,11 @@ Class | Method | HTTP request | Description ```BulkSendJobApi``` | [```bulk_send_job_list```](docs/BulkSendJobApi.md#bulk_send_job_list) | ```GET /bulk_send_job/list``` | List Bulk Send Jobs| |```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_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| |```FaxLineApi``` | [```fax_line_add_user```](docs/FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| ```FaxLineApi``` | [```fax_line_area_code_get```](docs/FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| ```FaxLineApi``` | [```fax_line_create```](docs/FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| @@ -152,7 +157,7 @@ Class | Method | HTTP request | Description ```TeamApi``` | [```team_sub_teams```](docs/TeamApi.md#team_sub_teams) | ```GET /team/sub_teams/{team_id}``` | List Sub Teams| ```TeamApi``` | [```team_update```](docs/TeamApi.md#team_update) | ```PUT /team``` | Update Team| |```TemplateApi``` | [```template_add_user```](docs/TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| -```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| +```TemplateApi``` | [```template_create```](docs/TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| ```TemplateApi``` | [```template_create_embedded_draft```](docs/TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| ```TemplateApi``` | [```template_delete```](docs/TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| ```TemplateApi``` | [```template_files```](docs/TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| @@ -204,6 +209,7 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxGetResponse](docs/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -215,6 +221,10 @@ Class | Method | HTTP request | Description - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [FaxListResponse](docs/FaxListResponse.md) + - [FaxResponse](docs/FaxResponse.md) + - [FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [FaxSendRequest](docs/FaxSendRequest.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) @@ -381,6 +391,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.6-dev +- Package version: 1.7-dev - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/sdks/python/VERSION b/sdks/python/VERSION index 78ca9a102..b19f5be06 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -1.6-dev +1.7-dev diff --git a/sdks/python/docs/AccountResponseQuotas.md b/sdks/python/docs/AccountResponseQuotas.md index 740ad2357..189447310 100644 --- a/sdks/python/docs/AccountResponseQuotas.md +++ b/sdks/python/docs/AccountResponseQuotas.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes | `documents_left` | ```int``` | Signature requests remaining. | | | `templates_total` | ```int``` | Total API templates allowed. | | | `templates_left` | ```int``` | API templates remaining. | | -| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | +| `sms_verifications_left` | ```int``` | SMS verifications remaining. | | | `num_fax_pages_left` | ```int``` | Number of fax pages left | | [[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 new file mode 100644 index 000000000..a0b2cbd12 --- /dev/null +++ b/sdks/python/docs/FaxApi.md @@ -0,0 +1,334 @@ +# ```dropbox_sign.FaxApi``` + +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_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| + + +# ```fax_delete``` +> ```fax_delete(fax_id)``` + +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +* Basic Authentication (api_key): + +```python +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) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[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) + +# ```fax_files``` +> ```io.IOBase fax_files(fax_id)``` + +List Fax Files + +Returns list of fax files + +### Example + +* Basic Authentication (api_key): + +```python +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) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +**io.IOBase** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/pdf, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[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) + +# ```fax_get``` +> ```FaxGetResponse fax_get(fax_id)``` + +Get Fax + +Returns information about fax + +### Example + +* Basic Authentication (api_key): + +```python +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) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **str** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[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) + +# ```fax_list``` +> ```FaxListResponse fax_list()``` + +Lists Faxes + +Returns properties of multiple faxes + +### Example + +* Basic Authentication (api_key): + +```python +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) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `page` | **int** | Page | [optional][default to 1] | +| `page_size` | **int** | Page size | [optional][default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[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) + +# ```fax_send``` +> ```FaxGetResponse fax_send(fax_send_request)``` + +Send Fax + +Action to prepare and send a fax + +### Example + +* Basic Authentication (api_key): + +```python +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) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_send_request` | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[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) + diff --git a/sdks/python/docs/FaxGetResponse.md b/sdks/python/docs/FaxGetResponse.md new file mode 100644 index 000000000..02b92d68d --- /dev/null +++ b/sdks/python/docs/FaxGetResponse.md @@ -0,0 +1,12 @@ +# FaxGetResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List[WarningResponse]```](WarningResponse.md) | A list of warnings. | | + +[[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 new file mode 100644 index 000000000..e57c1881e --- /dev/null +++ b/sdks/python/docs/FaxListResponse.md @@ -0,0 +1,12 @@ +# FaxListResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxes`*_required_ | [```List[FaxResponse]```](FaxResponse.md) | | | +| `list_info`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + +[[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 new file mode 100644 index 000000000..d531f5d0a --- /dev/null +++ b/sdks/python/docs/FaxResponse.md @@ -0,0 +1,20 @@ +# FaxResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax_id`*_required_ | ```str``` | Fax ID | | +| `title`*_required_ | ```str``` | Fax Title | | +| `original_title`*_required_ | ```str``` | Fax Original Title | | +| `subject`*_required_ | ```str``` | Fax Subject | | +| `message`*_required_ | ```str``` | Fax Message | | +| `metadata`*_required_ | ```Dict[str, object]``` | Fax Metadata | | +| `created_at`*_required_ | ```int``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```str``` | Fax Sender Email | | +| `transmissions`*_required_ | [```List[FaxResponseTransmission]```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `files_url`*_required_ | ```str``` | Fax Files URL | | + +[[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 new file mode 100644 index 000000000..9ba09c130 --- /dev/null +++ b/sdks/python/docs/FaxResponseTransmission.md @@ -0,0 +1,14 @@ +# FaxResponseTransmission + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```str``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```str``` | Fax Transmission Sender | | +| `status_code`*_required_ | ```str``` | Fax Transmission Status Code | | +| `sent_at` | ```int``` | Fax Transmission Sent Timestamp | | + +[[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 new file mode 100644 index 000000000..cdb4f49a0 --- /dev/null +++ b/sdks/python/docs/FaxSendRequest.md @@ -0,0 +1,19 @@ +# FaxSendRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `recipient`*_required_ | ```str``` | Fax Send To Recipient | | +| `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 | | +| `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_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/OAuthApi.md b/sdks/python/docs/OAuthApi.md index 969109c45..b26775683 100644 --- a/sdks/python/docs/OAuthApi.md +++ b/sdks/python/docs/OAuthApi.md @@ -67,6 +67,7 @@ No authorization required | 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) @@ -126,6 +127,7 @@ No authorization required | 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) diff --git a/sdks/python/docs/OAuthTokenRefreshRequest.md b/sdks/python/docs/OAuthTokenRefreshRequest.md index 9322c48d6..87662c9e1 100644 --- a/sdks/python/docs/OAuthTokenRefreshRequest.md +++ b/sdks/python/docs/OAuthTokenRefreshRequest.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `grant_type`*_required_ | ```str``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```str``` | The token provided when you got the expired access token. | | +| `client_id` | ```str``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_secret` | ```str``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | [[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 a4554ef44..2db45f1a5 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -253,7 +253,7 @@ with ApiClient(configuration) as api_client: 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]`. +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 diff --git a/sdks/python/docs/SubWhiteLabelingOptions.md b/sdks/python/docs/SubWhiteLabelingOptions.md index ac301537d..f911527c3 100644 --- a/sdks/python/docs/SubWhiteLabelingOptions.md +++ b/sdks/python/docs/SubWhiteLabelingOptions.md @@ -7,20 +7,20 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `header_background_color` | ```str``` | | [default to '#1A1A1A'] | +| `header_background_color` | ```str``` | | [default to '#1a1a1a'] | | `legal_version` | ```str``` | | [default to 'terms1'] | -| `link_color` | ```str``` | | [default to '#00B3E6'] | -| `page_background_color` | ```str``` | | [default to '#F7F8F9'] | -| `primary_button_color` | ```str``` | | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```str``` | | [default to '#00B3E6'] | -| `primary_button_text_color` | ```str``` | | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_color` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```str``` | | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```str``` | | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```str``` | | [default to '#00B3E6'] | +| `link_color` | ```str``` | | [default to '#0061FE'] | +| `page_background_color` | ```str``` | | [default to '#f7f8f9'] | +| `primary_button_color` | ```str``` | | [default to '#0061FE'] | +| `primary_button_color_hover` | ```str``` | | [default to '#0061FE'] | +| `primary_button_text_color` | ```str``` | | [default to '#ffffff'] | +| `primary_button_text_color_hover` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_color` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_color_hover` | ```str``` | | [default to '#ffffff'] | +| `secondary_button_text_color` | ```str``` | | [default to '#0061FE'] | +| `secondary_button_text_color_hover` | ```str``` | | [default to '#0061FE'] | | `text_color1` | ```str``` | | [default to '#808080'] | -| `text_color2` | ```str``` | | [default to '#FFFFFF'] | +| `text_color2` | ```str``` | | [default to '#ffffff'] | | `reset_to_default` | ```bool``` | Resets white labeling options to defaults. Only useful when updating an API App. | | [[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 9adb98a8a..153be9c2e 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- |[```template_add_user```](TemplateApi.md#template_add_user) | ```POST /template/add_user/{template_id}``` | Add User to Template| -|[```template_create```](TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| +|[```template_create```](TemplateApi.md#template_create) | ```POST /template/create``` | Create Template| |[```template_create_embedded_draft```](TemplateApi.md#template_create_embedded_draft) | ```POST /template/create_embedded_draft``` | Create Embedded Template Draft| |[```template_delete```](TemplateApi.md#template_delete) | ```POST /template/delete/{template_id}``` | Delete Template| |[```template_files```](TemplateApi.md#template_files) | ```GET /template/files/{template_id}``` | Get Template Files| @@ -90,7 +90,7 @@ with ApiClient(configuration) as api_client: # ```template_create``` > ```TemplateCreateResponse template_create(template_create_request)``` -Create Template +Create Template Creates a template that can then be used. diff --git a/sdks/python/docs/TemplateResponse.md b/sdks/python/docs/TemplateResponse.md index 7fb5cedbc..315cf7176 100644 --- a/sdks/python/docs/TemplateResponse.md +++ b/sdks/python/docs/TemplateResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes | `title` | ```str``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```str``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updated_at` | ```int``` | Time the template was last updated. | | -| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_embedded` | ```bool``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `is_creator` | ```bool``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `can_edit` | ```bool``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `is_locked` | ```bool``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -20,6 +20,7 @@ Name | Type | Description | Notes | `custom_fields` | [```List[TemplateResponseDocumentCustomFieldBase]```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `named_form_fields` | [```List[TemplateResponseDocumentFormFieldBase]```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```List[TemplateResponseAccount]```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List[SignatureRequestResponseAttachment]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | [[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 b8aecfa10..a0c465ca8 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes | `width` | ```int``` | The width in pixels of this form field. | | | `height` | ```int``` | The height in pixels of this form field. | | | `required` | ```bool``` | Boolean showing whether or not this field is required. | | -| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 6d35e1c71..1a2167a2e 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'checkbox'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 863ed1190..a9add1a93 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'date_signed'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 99d07332c..40d2cf2c0 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'dropdown'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 dd7db8dde..ec6a6e4fa 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes | `is_multiline` | ```bool``` | Whether this form field is multiline text. | | | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```str``` | Font family used in this form field's text. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 80cc52231..77acaa80b 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'initials'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 af3e60ed9..9db9a8d03 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'radio'] | +| `group`*_required_ | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 304eaf502..adce267f0 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md @@ -6,6 +6,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```str``` | 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` | [default to 'signature'] | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 bafb6e36b..9e6604250 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes | `original_font_size` | ```int``` | Original font size used in this form field's text. | | | `font_family` | ```str``` | Font family used in this form field's text. | | | `validation_type` | ```str``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```str``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | [[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 15adf1c8d..a8df7f94f 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.6-dev" +__version__ = "1.7-dev" # import apis into sdk package from dropbox_sign.apis import * @@ -80,6 +80,7 @@ from dropbox_sign.models.event_callback_request_event_metadata import ( EventCallbackRequestEventMetadata, ) +from dropbox_sign.models.fax_get_response import FaxGetResponse from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest from dropbox_sign.models.fax_line_area_code_get_country_enum import ( FaxLineAreaCodeGetCountryEnum, @@ -99,6 +100,10 @@ from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest from dropbox_sign.models.fax_line_response import FaxLineResponse from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from dropbox_sign.models.fax_send_request import FaxSendRequest from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse diff --git a/sdks/python/dropbox_sign/api/__init__.py b/sdks/python/dropbox_sign/api/__init__.py index c861b688e..f4000e522 100644 --- a/sdks/python/dropbox_sign/api/__init__.py +++ b/sdks/python/dropbox_sign/api/__init__.py @@ -5,6 +5,7 @@ from dropbox_sign.api.api_app_api import ApiAppApi from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_api import FaxApi from dropbox_sign.api.fax_line_api import FaxLineApi from dropbox_sign.api.o_auth_api import OAuthApi from dropbox_sign.api.report_api import ReportApi diff --git a/sdks/python/dropbox_sign/api/fax_api.py b/sdks/python/dropbox_sign/api/fax_api.py new file mode 100644 index 000000000..3e49a160a --- /dev/null +++ b/sdks/python/dropbox_sign/api/fax_api.py @@ -0,0 +1,1327 @@ +# 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 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from dropbox_sign.models.fax_get_response import FaxGetResponse +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_send_request import FaxSendRequest + +from dropbox_sign.api_client import ApiClient, RequestSerialized +from dropbox_sign.api_response import ApiResponse +from dropbox_sign.rest import RESTResponseType +import io + + +class FaxApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def fax_delete( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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, + ) -> None: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "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 fax_delete_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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[None]: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "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 fax_delete_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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: + """Delete Fax + + Deletes the specified Fax from the system. + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_delete_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_delete_serialize( + self, + fax_id, + _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]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/fax/{fax_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 fax_files( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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, + ) -> io.IOBase: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "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 fax_files_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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[io.IOBase]: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "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 fax_files_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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: + """List Fax Files + + Returns list of fax files + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_files_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "io.IOBase", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_files_serialize( + self, + fax_id, + _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]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/pdf", "application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/files/{fax_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 fax_get( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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, + ) -> FaxGetResponse: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "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 fax_get_with_http_info( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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[FaxGetResponse]: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "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 fax_get_without_preload_content( + self, + fax_id: Annotated[StrictStr, Field(description="Fax ID")], + _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: + """Get Fax + + Returns information about fax + + :param fax_id: Fax ID (required) + :type fax_id: str + :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._fax_get_serialize( + fax_id=fax_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_get_serialize( + self, + fax_id, + _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]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fax_id is not None: + _path_params["fax_id"] = fax_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/{fax_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 fax_list( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _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, + ) -> FaxListResponse: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :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._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "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 fax_list_with_http_info( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _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[FaxListResponse]: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :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._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "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 fax_list_without_preload_content( + self, + page: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=1)]], + Field(description="Page"), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field(description="Page size"), + ] = None, + _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: + """Lists Faxes + + Returns properties of multiple faxes + + :param page: Page + :type page: int + :param page_size: Page size + :type page_size: int + :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._fax_list_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxListResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_list_serialize( + self, + page, + page_size, + _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]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(("page", page)) + + if page_size is not None: + + _query_params.append(("page_size", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["api_key"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/fax/list", + 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 fax_send( + self, + fax_send_request: FaxSendRequest, + _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, + ) -> FaxGetResponse: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :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._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "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 fax_send_with_http_info( + self, + fax_send_request: FaxSendRequest, + _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[FaxGetResponse]: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :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._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "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 fax_send_without_preload_content( + self, + fax_send_request: FaxSendRequest, + _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: + """Send Fax + + Action to prepare and send a fax + + :param fax_send_request: (required) + :type fax_send_request: FaxSendRequest + :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._fax_send_serialize( + fax_send_request=fax_send_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "FaxGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _fax_send_serialize( + self, + fax_send_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]] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = fax_send_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if fax_send_request is not None and has_files is False: + _body_params = fax_send_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"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/fax/send", + 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, + ) diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index d5035a186..bedd1bfff 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -93,6 +93,7 @@ def oauth_token_generate( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -157,6 +158,7 @@ def oauth_token_generate_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -221,6 +223,7 @@ def oauth_token_generate_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -366,6 +369,7 @@ def oauth_token_refresh( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -430,6 +434,7 @@ def oauth_token_refresh_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -494,6 +499,7 @@ def oauth_token_refresh_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index 4298079c1..f78d1a219 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -649,7 +649,7 @@ def signature_request_cancel( ) -> None: """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]`. + 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 signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str @@ -717,7 +717,7 @@ def signature_request_cancel_with_http_info( ) -> ApiResponse[None]: """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]`. + 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 signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str @@ -785,7 +785,7 @@ def signature_request_cancel_without_preload_content( ) -> RESTResponseType: """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]`. + 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 signature_request_id: The id of the incomplete SignatureRequest to cancel. (required) :type signature_request_id: str diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index 9f87978ee..87be9f0fd 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -372,7 +372,7 @@ def template_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateCreateResponse: - """Create Template + """Create Template Creates a template that can then be used. @@ -437,7 +437,7 @@ def template_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TemplateCreateResponse]: - """Create Template + """Create Template Creates a template that can then be used. @@ -502,7 +502,7 @@ def template_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Template + """Create Template Creates a template that can then be used. diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index 3442861b9..386ef4d5b 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -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.6-dev/python" + self.user_agent = "OpenAPI-Generator/1.7-dev/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/sdks/python/dropbox_sign/apis/__init__.py b/sdks/python/dropbox_sign/apis/__init__.py index 16344f32d..0df638089 100644 --- a/sdks/python/dropbox_sign/apis/__init__.py +++ b/sdks/python/dropbox_sign/apis/__init__.py @@ -5,6 +5,7 @@ from dropbox_sign.api.api_app_api import ApiAppApi from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_api import FaxApi from dropbox_sign.api.fax_line_api import FaxLineApi from dropbox_sign.api.o_auth_api import OAuthApi from dropbox_sign.api.report_api import ReportApi diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index 9e397bd27..b939da41d 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -432,7 +432,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 3.0.0\n" - "SDK Version: 1.6-dev".format(env=sys.platform, pyversion=sys.version) + "SDK Version: 1.7-dev".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index 919a66d9c..97af4020e 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -63,6 +63,7 @@ from dropbox_sign.models.event_callback_request_event_metadata import ( EventCallbackRequestEventMetadata, ) +from dropbox_sign.models.fax_get_response import FaxGetResponse from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest from dropbox_sign.models.fax_line_area_code_get_country_enum import ( FaxLineAreaCodeGetCountryEnum, @@ -82,6 +83,10 @@ from dropbox_sign.models.fax_line_remove_user_request import FaxLineRemoveUserRequest from dropbox_sign.models.fax_line_response import FaxLineResponse from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine +from dropbox_sign.models.fax_list_response import FaxListResponse +from dropbox_sign.models.fax_response import FaxResponse +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from dropbox_sign.models.fax_send_request import FaxSendRequest from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index 1b90d4162..a58444549 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -45,7 +45,7 @@ class AccountResponseQuotas(BaseModel): default=None, description="API templates remaining." ) sms_verifications_left: Optional[StrictInt] = Field( - default=None, description="SMS verifications remaining." + default=None, description="SMS verifications remaining." ) num_fax_pages_left: Optional[StrictInt] = Field( default=None, description="Number of fax pages left" diff --git a/sdks/python/dropbox_sign/models/fax_get_response.py b/sdks/python/dropbox_sign/models/fax_get_response.py new file mode 100644 index 000000000..8c2b2249f --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_get_response.py @@ -0,0 +1,151 @@ +# 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 +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_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxGetResponse(BaseModel): + """ + FaxGetResponse + """ # noqa: E501 + + fax: FaxResponse + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = ["fax", "warnings"] + + 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 FaxGetResponse 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 fax + if self.fax: + _dict["fax"] = self.fax.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) + _items = [] + if self.warnings: + for _item_warnings in self.warnings: + if _item_warnings: + _items.append(_item_warnings.to_dict()) + _dict["warnings"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fax": ( + FaxResponse.from_dict(obj["fax"]) + if obj.get("fax") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) + 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 { + "fax": "(FaxResponse,)", + "warnings": "(List[WarningResponse],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "warnings", + ] diff --git a/sdks/python/dropbox_sign/models/fax_list_response.py b/sdks/python/dropbox_sign/models/fax_list_response.py new file mode 100644 index 000000000..b62b406e1 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_list_response.py @@ -0,0 +1,149 @@ +# 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 +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_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxListResponse(BaseModel): + """ + FaxListResponse + """ # noqa: E501 + + faxes: List[FaxResponse] + list_info: ListInfoResponse + __properties: ClassVar[List[str]] = ["faxes", "list_info"] + + 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 FaxListResponse 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 faxes (list) + _items = [] + if self.faxes: + for _item_faxes in self.faxes: + if _item_faxes: + _items.append(_item_faxes.to_dict()) + _dict["faxes"] = _items + # override the default output from pydantic by calling `to_dict()` of list_info + if self.list_info: + _dict["list_info"] = self.list_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "faxes": ( + [FaxResponse.from_dict(_item) for _item in obj["faxes"]] + if obj.get("faxes") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + } + ) + 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 { + "faxes": "(List[FaxResponse],)", + "list_info": "(ListInfoResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "faxes", + ] diff --git a/sdks/python/dropbox_sign/models/fax_response.py b/sdks/python/dropbox_sign/models/fax_response.py new file mode 100644 index 000000000..035993f12 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_response.py @@ -0,0 +1,181 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxResponse(BaseModel): + """ + FaxResponse + """ # noqa: E501 + + fax_id: StrictStr = Field(description="Fax ID") + title: StrictStr = Field(description="Fax Title") + original_title: StrictStr = Field(description="Fax Original Title") + subject: StrictStr = Field(description="Fax Subject") + message: StrictStr = Field(description="Fax Message") + metadata: Dict[str, Any] = Field(description="Fax Metadata") + created_at: StrictInt = Field(description="Fax Created At Timestamp") + sender: StrictStr = Field(description="Fax Sender Email") + transmissions: List[FaxResponseTransmission] = Field( + description="Fax Transmissions List" + ) + files_url: StrictStr = Field(description="Fax Files URL") + __properties: ClassVar[List[str]] = [ + "fax_id", + "title", + "original_title", + "subject", + "message", + "metadata", + "created_at", + "sender", + "transmissions", + "files_url", + ] + + 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 FaxResponse 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 transmissions (list) + _items = [] + if self.transmissions: + for _item_transmissions in self.transmissions: + if _item_transmissions: + _items.append(_item_transmissions.to_dict()) + _dict["transmissions"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fax_id": obj.get("fax_id"), + "title": obj.get("title"), + "original_title": obj.get("original_title"), + "subject": obj.get("subject"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + "sender": obj.get("sender"), + "transmissions": ( + [ + FaxResponseTransmission.from_dict(_item) + for _item in obj["transmissions"] + ] + if obj.get("transmissions") is not None + else None + ), + "files_url": obj.get("files_url"), + } + ) + 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 { + "fax_id": "(str,)", + "title": "(str,)", + "original_title": "(str,)", + "subject": "(str,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "created_at": "(int,)", + "sender": "(str,)", + "transmissions": "(List[FaxResponseTransmission],)", + "files_url": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "transmissions", + ] diff --git a/sdks/python/dropbox_sign/models/fax_response_transmission.py b/sdks/python/dropbox_sign/models/fax_response_transmission.py new file mode 100644 index 000000000..c34d2e9ae --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_response_transmission.py @@ -0,0 +1,160 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxResponseTransmission(BaseModel): + """ + FaxResponseTransmission + """ # noqa: E501 + + recipient: StrictStr = Field(description="Fax Transmission Recipient") + sender: StrictStr = Field(description="Fax Transmission Sender") + status_code: StrictStr = Field(description="Fax Transmission Status Code") + sent_at: Optional[StrictInt] = Field( + default=None, description="Fax Transmission Sent Timestamp" + ) + __properties: ClassVar[List[str]] = [ + "recipient", + "sender", + "status_code", + "sent_at", + ] + + @field_validator("status_code") + def status_code_validate_enum(cls, value): + """Validates the enum""" + if value not in set( + [ + "success", + "transmitting", + "error_could_not_fax", + "error_unknown", + "error_busy", + "error_no_answer", + "error_disconnected", + "error_bad_destination", + ] + ): + raise ValueError( + "must be one of enum values ('success', 'transmitting', 'error_could_not_fax', 'error_unknown', 'error_busy', 'error_no_answer', 'error_disconnected', 'error_bad_destination')" + ) + return value + + 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 FaxResponseTransmission 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxResponseTransmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "recipient": obj.get("recipient"), + "sender": obj.get("sender"), + "status_code": obj.get("status_code"), + "sent_at": obj.get("sent_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 { + "recipient": "(str,)", + "sender": "(str,)", + "status_code": "(str,)", + "sent_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_send_request.py b/sdks/python/dropbox_sign/models/fax_send_request.py new file mode 100644 index 000000000..9fe6c54a3 --- /dev/null +++ b/sdks/python/dropbox_sign/models/fax_send_request.py @@ -0,0 +1,177 @@ +# 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, Union +from typing import Optional, Set, Tuple +from typing_extensions import Self +import io +from pydantic import StrictBool +from typing import Union + + +class FaxSendRequest(BaseModel): + """ + FaxSendRequest + """ # noqa: E501 + + recipient: StrictStr = Field(description="Fax Send To Recipient") + 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" + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, description="Fax File URL to Send" + ) + 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" + ) + cover_page_from: Optional[StrictStr] = Field( + default=None, description="Fax Cover Page for Sender" + ) + cover_page_message: Optional[StrictStr] = Field( + default=None, description="Fax Cover Page Message" + ) + title: Optional[StrictStr] = Field(default=None, description="Fax Title") + __properties: ClassVar[List[str]] = [ + "recipient", + "sender", + "files", + "file_urls", + "test_mode", + "cover_page_to", + "cover_page_from", + "cover_page_message", + "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 FaxSendRequest 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FaxSendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "recipient": obj.get("recipient"), + "sender": obj.get("sender"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "cover_page_to": obj.get("cover_page_to"), + "cover_page_from": obj.get("cover_page_from"), + "cover_page_message": obj.get("cover_page_message"), + "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 { + "recipient": "(str,)", + "sender": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "test_mode": "(bool,)", + "cover_page_to": "(str,)", + "cover_page_from": "(str,)", + "cover_page_message": "(str,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "files", + "file_urls", + ] 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 09535d939..573036386 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 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set, Tuple from typing_extensions import Self import io @@ -38,7 +38,20 @@ class OAuthTokenRefreshRequest(BaseModel): refresh_token: StrictStr = Field( description="The token provided when you got the expired access token." ) - __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] + client_id: Optional[StrictStr] = Field( + default=None, + description='The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.', + ) + client_secret: Optional[StrictStr] = Field( + default=None, + description='The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.', + ) + __properties: ClassVar[List[str]] = [ + "grant_type", + "refresh_token", + "client_id", + "client_secret", + ] model_config = ConfigDict( populate_by_name=True, @@ -109,6 +122,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else "refresh_token" ), "refresh_token": obj.get("refresh_token"), + "client_id": obj.get("client_id"), + "client_secret": obj.get("client_secret"), } ) return _obj @@ -128,6 +143,8 @@ def openapi_types(cls) -> Dict[str, str]: return { "grant_type": "(str,)", "refresh_token": "(str,)", + "client_id": "(str,)", + "client_secret": "(str,)", } @classmethod 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 63b8b6f98..218da2aea 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -39,20 +39,20 @@ class SubWhiteLabelingOptions(BaseModel): An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. """ # noqa: E501 - header_background_color: Optional[StrictStr] = "#1A1A1A" + header_background_color: Optional[StrictStr] = "#1a1a1a" legal_version: Optional[StrictStr] = "terms1" - link_color: Optional[StrictStr] = "#00B3E6" - page_background_color: Optional[StrictStr] = "#F7F8F9" - primary_button_color: Optional[StrictStr] = "#00B3E6" - primary_button_color_hover: Optional[StrictStr] = "#00B3E6" - primary_button_text_color: Optional[StrictStr] = "#FFFFFF" - primary_button_text_color_hover: Optional[StrictStr] = "#FFFFFF" - secondary_button_color: Optional[StrictStr] = "#FFFFFF" - secondary_button_color_hover: Optional[StrictStr] = "#FFFFFF" - secondary_button_text_color: Optional[StrictStr] = "#00B3E6" - secondary_button_text_color_hover: Optional[StrictStr] = "#00B3E6" + link_color: Optional[StrictStr] = "#0061FE" + page_background_color: Optional[StrictStr] = "#f7f8f9" + primary_button_color: Optional[StrictStr] = "#0061FE" + primary_button_color_hover: Optional[StrictStr] = "#0061FE" + primary_button_text_color: Optional[StrictStr] = "#ffffff" + primary_button_text_color_hover: Optional[StrictStr] = "#ffffff" + secondary_button_color: Optional[StrictStr] = "#ffffff" + secondary_button_color_hover: Optional[StrictStr] = "#ffffff" + secondary_button_text_color: Optional[StrictStr] = "#0061FE" + secondary_button_text_color_hover: Optional[StrictStr] = "#0061FE" text_color1: Optional[StrictStr] = "#808080" - text_color2: Optional[StrictStr] = "#FFFFFF" + text_color2: Optional[StrictStr] = "#ffffff" reset_to_default: Optional[StrictBool] = Field( default=None, description="Resets white labeling options to defaults. Only useful when updating an API App.", @@ -151,7 +151,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "header_background_color": ( obj.get("header_background_color") if obj.get("header_background_color") is not None - else "#1A1A1A" + else "#1a1a1a" ), "legal_version": ( obj.get("legal_version") @@ -161,52 +161,52 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "link_color": ( obj.get("link_color") if obj.get("link_color") is not None - else "#00B3E6" + else "#0061FE" ), "page_background_color": ( obj.get("page_background_color") if obj.get("page_background_color") is not None - else "#F7F8F9" + else "#f7f8f9" ), "primary_button_color": ( obj.get("primary_button_color") if obj.get("primary_button_color") is not None - else "#00B3E6" + else "#0061FE" ), "primary_button_color_hover": ( obj.get("primary_button_color_hover") if obj.get("primary_button_color_hover") is not None - else "#00B3E6" + else "#0061FE" ), "primary_button_text_color": ( obj.get("primary_button_text_color") if obj.get("primary_button_text_color") is not None - else "#FFFFFF" + else "#ffffff" ), "primary_button_text_color_hover": ( obj.get("primary_button_text_color_hover") if obj.get("primary_button_text_color_hover") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_color": ( obj.get("secondary_button_color") if obj.get("secondary_button_color") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_color_hover": ( obj.get("secondary_button_color_hover") if obj.get("secondary_button_color_hover") is not None - else "#FFFFFF" + else "#ffffff" ), "secondary_button_text_color": ( obj.get("secondary_button_text_color") if obj.get("secondary_button_text_color") is not None - else "#00B3E6" + else "#0061FE" ), "secondary_button_text_color_hover": ( obj.get("secondary_button_text_color_hover") if obj.get("secondary_button_text_color_hover") is not None - else "#00B3E6" + else "#0061FE" ), "text_color1": ( obj.get("text_color1") @@ -216,7 +216,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "text_color2": ( obj.get("text_color2") if obj.get("text_color2") is not None - else "#FFFFFF" + else "#ffffff" ), "reset_to_default": obj.get("reset_to_default"), } diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index 12d203c42..da7729424 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -20,6 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) from dropbox_sign.models.template_response_account import TemplateResponseAccount from dropbox_sign.models.template_response_cc_role import TemplateResponseCCRole from dropbox_sign.models.template_response_document import TemplateResponseDocument @@ -58,7 +61,7 @@ class TemplateResponse(BaseModel): ) is_embedded: Optional[StrictBool] = Field( default=None, - description="`true` if this template was created using an embedded flow, `false` if it was created on our website.", + description="`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.", ) is_creator: Optional[StrictBool] = Field( default=None, @@ -98,6 +101,9 @@ class TemplateResponse(BaseModel): accounts: Optional[List[TemplateResponseAccount]] = Field( default=None, description="An array of the Accounts that can use this Template." ) + attachments: Optional[List[SignatureRequestResponseAttachment]] = Field( + default=None, description="Signer attachments." + ) __properties: ClassVar[List[str]] = [ "template_id", "title", @@ -114,6 +120,7 @@ class TemplateResponse(BaseModel): "custom_fields", "named_form_fields", "accounts", + "attachments", ] model_config = ConfigDict( @@ -208,6 +215,13 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: if _item_accounts: _items.append(_item_accounts.to_dict()) _dict["accounts"] = _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 return _dict @classmethod @@ -278,6 +292,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("accounts") is not None else None ), + "attachments": ( + [ + SignatureRequestResponseAttachment.from_dict(_item) + for _item in obj["attachments"] + ] + if obj.get("attachments") is not None + else None + ), } ) return _obj @@ -310,6 +332,7 @@ def openapi_types(cls) -> Dict[str, str]: "custom_fields": "(List[TemplateResponseDocumentCustomFieldBase],)", "named_form_fields": "(List[TemplateResponseDocumentFormFieldBase],)", "accounts": "(List[TemplateResponseAccount],)", + "attachments": "(List[SignatureRequestResponseAttachment],)", } @classmethod @@ -321,4 +344,5 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "custom_fields", "named_form_fields", "accounts", + "attachments", ] 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 a8052fd2a..62f6d5f5b 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 @@ -87,10 +87,6 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): default=None, description="Boolean showing whether or not this field is required.", ) - group: Optional[StrictStr] = Field( - default=None, - description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", - ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -101,7 +97,6 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): "width", "height", "required", - "group", ] model_config = ConfigDict( @@ -261,7 +256,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 9804d5077..29c4ff1e8 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 @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 14a9a2a08..9b466fa1c 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 @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -40,6 +40,10 @@ class TemplateResponseDocumentFormFieldDateSigned( type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -146,6 +150,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -154,7 +159,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 89351e112..65b253c5d 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 @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 2c7529891..90f0c1f25 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 @@ -57,6 +57,10 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie description="Font family used in this form field's text.", alias="fontFamily", ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -67,11 +71,11 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie "width", "height", "required", - "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily", + "group", ] model_config = ConfigDict( @@ -149,7 +153,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "width": obj.get("width"), "height": obj.get("height"), "required": obj.get("required"), - "group": obj.get("group"), "avg_text_length": ( TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None @@ -158,6 +161,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isMultiline": obj.get("isMultiline"), "originalFontSize": obj.get("originalFontSize"), "fontFamily": obj.get("fontFamily"), + "group": obj.get("group"), } ) return _obj @@ -180,6 +184,7 @@ def openapi_types(cls) -> Dict[str, str]: "is_multiline": "(bool,)", "original_font_size": "(int,)", "font_family": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -188,7 +193,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 bded1e5f6..bc8512b4f 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 @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFiel type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 dd394e149..7e76f9e27 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 @@ -38,6 +38,9 @@ class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBa type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: StrictStr = Field( + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields." + ) __properties: ClassVar[List[str]] = [ "type", "group", 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 fd82759b1..7e742cebe 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 @@ -19,7 +19,7 @@ import json from pydantic import ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFie type: StrictStr = Field( description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -142,6 +146,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -150,7 +155,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod 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 752e9a25b..c04d1b550 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 @@ -68,6 +68,10 @@ class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBas default=None, description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.", ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) __properties: ClassVar[List[str]] = [ "type", "api_id", @@ -78,12 +82,12 @@ class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBas "width", "height", "required", - "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily", "validation_type", + "group", ] @field_validator("validation_type") @@ -186,7 +190,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "width": obj.get("width"), "height": obj.get("height"), "required": obj.get("required"), - "group": obj.get("group"), "avg_text_length": ( TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None @@ -196,6 +199,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "originalFontSize": obj.get("originalFontSize"), "fontFamily": obj.get("fontFamily"), "validation_type": obj.get("validation_type"), + "group": obj.get("group"), } ) return _obj @@ -219,6 +223,7 @@ def openapi_types(cls) -> Dict[str, str]: "original_font_size": "(int,)", "font_family": "(str,)", "validation_type": "(str,)", + "group": "(str,)", "api_id": "(str,)", "name": "(str,)", "signer": "(int, str,)", @@ -227,7 +232,6 @@ def openapi_types(cls) -> Dict[str, str]: "width": "(int,)", "height": "(int,)", "required": "(bool,)", - "group": "(str,)", } @classmethod diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index 0738ddb9e..ca79487c8 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: generatorLanguageVersion: ">=3.7" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.6-dev + packageVersion: 1.7-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index 6eefc3900..3a3145a89 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dropbox_sign" -version = "1.6-dev" +version = "1.7-dev" description = "Dropbox Sign API" authors = ["Official Python SDK for the Dropbox Sign API "] license = "MIT" diff --git a/sdks/python/run-build b/sdks/python/run-build index 08a15aa11..bfa300872 100755 --- a/sdks/python/run-build +++ b/sdks/python/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/python" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/dropbox_sign/api/"*.py +rm -f "${DIR}/dropbox_sign/models/"*.py + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 7d3d8d385..7c18a50dd 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "dropbox-sign" -VERSION = "1.6-dev" +VERSION = "1.7-dev" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/sdks/ruby/.travis.yml b/sdks/ruby/.travis.yml index 5dac9b73b..f37177039 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.6-dev.gem + - gem install ./dropbox-sign-1.7-dev.gem diff --git a/sdks/ruby/Gemfile.lock b/sdks/ruby/Gemfile.lock index c8b87fcd6..72b58ee60 100644 --- a/sdks/ruby/Gemfile.lock +++ b/sdks/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.6.pre.dev) + dropbox-sign (1.7.pre.dev) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 1dd16ae20..e93c857b9 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -25,7 +25,7 @@ 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.6-dev +- Package version: 1.7-dev - Generator version: 7.8.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen @@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.6-dev.gem +gem install ./dropbox-sign-1.7-dev.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.6-dev.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.7-dev.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.6-dev' + gem 'dropbox-sign', '~> 1.7-dev' ### Install from Git @@ -121,6 +121,11 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs | |*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_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 | |*Dropbox::Sign::FaxLineApi* | [**fax_line_add_user**](docs/FaxLineApi.md#fax_line_add_user) | **PUT** /fax_line/add_user | Add Fax Line User | |*Dropbox::Sign::FaxLineApi* | [**fax_line_area_code_get**](docs/FaxLineApi.md#fax_line_area_code_get) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | |*Dropbox::Sign::FaxLineApi* | [**fax_line_create**](docs/FaxLineApi.md#fax_line_create) | **POST** /fax_line/create | Purchase Fax Line | @@ -158,7 +163,7 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::TeamApi* | [**team_sub_teams**](docs/TeamApi.md#team_sub_teams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | |*Dropbox::Sign::TeamApi* | [**team_update**](docs/TeamApi.md#team_update) | **PUT** /team | Update Team | |*Dropbox::Sign::TemplateApi* | [**template_add_user**](docs/TemplateApi.md#template_add_user) | **POST** /template/add_user/{template_id} | Add User to Template | -|*Dropbox::Sign::TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template | +|*Dropbox::Sign::TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template | |*Dropbox::Sign::TemplateApi* | [**template_create_embedded_draft**](docs/TemplateApi.md#template_create_embedded_draft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | |*Dropbox::Sign::TemplateApi* | [**template_delete**](docs/TemplateApi.md#template_delete) | **POST** /template/delete/{template_id} | Delete Template | |*Dropbox::Sign::TemplateApi* | [**template_files**](docs/TemplateApi.md#template_files) | **GET** /template/files/{template_id} | Get Template Files | @@ -210,6 +215,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::EventCallbackRequest](docs/EventCallbackRequest.md) - [Dropbox::Sign::EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Dropbox::Sign::EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Dropbox::Sign::FaxGetResponse](docs/FaxGetResponse.md) - [Dropbox::Sign::FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [Dropbox::Sign::FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [Dropbox::Sign::FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -221,6 +227,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [Dropbox::Sign::FaxLineResponse](docs/FaxLineResponse.md) - [Dropbox::Sign::FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [Dropbox::Sign::FaxListResponse](docs/FaxListResponse.md) + - [Dropbox::Sign::FaxResponse](docs/FaxResponse.md) + - [Dropbox::Sign::FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [Dropbox::Sign::FaxSendRequest](docs/FaxSendRequest.md) - [Dropbox::Sign::FileResponse](docs/FileResponse.md) - [Dropbox::Sign::FileResponseDataUri](docs/FileResponseDataUri.md) - [Dropbox::Sign::ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/ruby/VERSION b/sdks/ruby/VERSION index 78ca9a102..b19f5be06 100644 --- a/sdks/ruby/VERSION +++ b/sdks/ruby/VERSION @@ -1 +1 @@ -1.6-dev +1.7-dev diff --git a/sdks/ruby/docs/AccountResponseQuotas.md b/sdks/ruby/docs/AccountResponseQuotas.md index 2a6b0c98a..2b96ba96b 100644 --- a/sdks/ruby/docs/AccountResponseQuotas.md +++ b/sdks/ruby/docs/AccountResponseQuotas.md @@ -10,6 +10,6 @@ Details concerning remaining monthly quotas. | `documents_left` | ```Integer``` | Signature requests remaining. | | | `templates_total` | ```Integer``` | Total API templates allowed. | | | `templates_left` | ```Integer``` | API templates remaining. | | -| `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | +| `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | | `num_fax_pages_left` | ```Integer``` | Number of fax pages left | | diff --git a/sdks/ruby/docs/FaxApi.md b/sdks/ruby/docs/FaxApi.md new file mode 100644 index 000000000..23129b6d7 --- /dev/null +++ b/sdks/ruby/docs/FaxApi.md @@ -0,0 +1,364 @@ +# Dropbox::Sign::FaxApi + +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_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 | + + +## `fax_delete` + +> `fax_delete(fax_id)` + +Delete Fax + +Deletes the specified Fax from the system. + +### Examples + +```ruby +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 + +``` + +#### Using the `fax_delete_with_http_info` variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> ` fax_delete_with_http_info(fax_id)` + +```ruby +begin + # Delete Fax + data, status_code, headers = api_instance.fax_delete_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +nil (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_files` + +> `File fax_files(fax_id)` + +List Fax Files + +Returns list of fax files + +### Examples + +```ruby +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 + +``` + +#### Using the `fax_files_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> ` fax_files_with_http_info(fax_id)` + +```ruby +begin + # List Fax Files + data, status_code, headers = api_instance.fax_files_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => File +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_files_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +**File** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + + +## `fax_get` + +> ` fax_get(fax_id)` + +Get Fax + +Returns information about fax + +### Examples + +```ruby +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 + +``` + +#### Using the `fax_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_get_with_http_info(fax_id)` + +```ruby +begin + # Get Fax + data, status_code, headers = api_instance.fax_get_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_list` + +> ` fax_list(opts)` + +Lists Faxes + +Returns properties of multiple faxes + +### Examples + +```ruby +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 + +``` + +#### Using the `fax_list_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_list_with_http_info(opts)` + +```ruby +begin + # Lists Faxes + data, status_code, headers = api_instance.fax_list_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_list_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `page` | **Integer** | Page | [optional][default to 1] | +| `page_size` | **Integer** | Page size | [optional][default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_send` + +> ` fax_send(fax_send_request)` + +Send Fax + +Action to prepare and send a fax + +### Examples + +```ruby +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 + +``` + +#### Using the `fax_send_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_send_with_http_info(fax_send_request)` + +```ruby +begin + # Send Fax + data, status_code, headers = api_instance.fax_send_with_http_info(fax_send_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_send_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_send_request` | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + diff --git a/sdks/ruby/docs/FaxGetResponse.md b/sdks/ruby/docs/FaxGetResponse.md new file mode 100644 index 000000000..397322654 --- /dev/null +++ b/sdks/ruby/docs/FaxGetResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | + diff --git a/sdks/ruby/docs/FaxListResponse.md b/sdks/ruby/docs/FaxListResponse.md new file mode 100644 index 000000000..4ad86e488 --- /dev/null +++ b/sdks/ruby/docs/FaxListResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `faxes`*_required_ | [```Array```](FaxResponse.md) | | | +| `list_info`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + diff --git a/sdks/ruby/docs/FaxResponse.md b/sdks/ruby/docs/FaxResponse.md new file mode 100644 index 000000000..68c864bf3 --- /dev/null +++ b/sdks/ruby/docs/FaxResponse.md @@ -0,0 +1,19 @@ +# Dropbox::Sign::FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `original_title`*_required_ | ```String``` | Fax Original Title | | +| `subject`*_required_ | ```String``` | Fax Subject | | +| `message`*_required_ | ```String``` | Fax Message | | +| `metadata`*_required_ | ```Hash``` | Fax Metadata | | +| `created_at`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `transmissions`*_required_ | [```Array```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `files_url`*_required_ | ```String``` | Fax Files URL | | + diff --git a/sdks/ruby/docs/FaxResponseTransmission.md b/sdks/ruby/docs/FaxResponseTransmission.md new file mode 100644 index 000000000..5ec394694 --- /dev/null +++ b/sdks/ruby/docs/FaxResponseTransmission.md @@ -0,0 +1,13 @@ +# Dropbox::Sign::FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```String``` | Fax Transmission Sender | | +| `status_code`*_required_ | ```String``` | Fax Transmission Status Code | | +| `sent_at` | ```Integer``` | Fax Transmission Sent Timestamp | | + diff --git a/sdks/ruby/docs/FaxSendRequest.md b/sdks/ruby/docs/FaxSendRequest.md new file mode 100644 index 000000000..6217af9f6 --- /dev/null +++ b/sdks/ruby/docs/FaxSendRequest.md @@ -0,0 +1,18 @@ +# Dropbox::Sign::FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```Array``` | Fax File to Send | | +| `file_urls` | ```Array``` | Fax File URL to Send | | +| `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_message` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + diff --git a/sdks/ruby/docs/OAuthTokenRefreshRequest.md b/sdks/ruby/docs/OAuthTokenRefreshRequest.md index fe729fe82..4bd1757c8 100644 --- a/sdks/ruby/docs/OAuthTokenRefreshRequest.md +++ b/sdks/ruby/docs/OAuthTokenRefreshRequest.md @@ -8,4 +8,6 @@ | ---- | ---- | ----------- | ----- | | `grant_type`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `client_id` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_secret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | diff --git a/sdks/ruby/docs/SignatureRequestApi.md b/sdks/ruby/docs/SignatureRequestApi.md index 7bc3482fa..0261ffa5c 100644 --- a/sdks/ruby/docs/SignatureRequestApi.md +++ b/sdks/ruby/docs/SignatureRequestApi.md @@ -249,7 +249,7 @@ end 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]`. +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]`. ### Examples diff --git a/sdks/ruby/docs/SubWhiteLabelingOptions.md b/sdks/ruby/docs/SubWhiteLabelingOptions.md index cf92be65b..5be083c58 100644 --- a/sdks/ruby/docs/SubWhiteLabelingOptions.md +++ b/sdks/ruby/docs/SubWhiteLabelingOptions.md @@ -8,19 +8,19 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `header_background_color` | ```String``` | | [default to '#1A1A1A'] | +| `header_background_color` | ```String``` | | [default to '#1a1a1a'] | | `legal_version` | ```String``` | | [default to 'terms1'] | -| `link_color` | ```String``` | | [default to '#00B3E6'] | -| `page_background_color` | ```String``` | | [default to '#F7F8F9'] | -| `primary_button_color` | ```String``` | | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```String``` | | [default to '#00B3E6'] | -| `primary_button_text_color` | ```String``` | | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_color` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```String``` | | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```String``` | | [default to '#00B3E6'] | +| `link_color` | ```String``` | | [default to '#0061FE'] | +| `page_background_color` | ```String``` | | [default to '#f7f8f9'] | +| `primary_button_color` | ```String``` | | [default to '#0061FE'] | +| `primary_button_color_hover` | ```String``` | | [default to '#0061FE'] | +| `primary_button_text_color` | ```String``` | | [default to '#ffffff'] | +| `primary_button_text_color_hover` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_color` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_color_hover` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_text_color` | ```String``` | | [default to '#0061FE'] | +| `secondary_button_text_color_hover` | ```String``` | | [default to '#0061FE'] | | `text_color1` | ```String``` | | [default to '#808080'] | -| `text_color2` | ```String``` | | [default to '#FFFFFF'] | +| `text_color2` | ```String``` | | [default to '#ffffff'] | | `reset_to_default` | ```Boolean``` | Resets white labeling options to defaults. Only useful when updating an API App. | | diff --git a/sdks/ruby/docs/TemplateApi.md b/sdks/ruby/docs/TemplateApi.md index 3e9361b14..bcd27fae0 100644 --- a/sdks/ruby/docs/TemplateApi.md +++ b/sdks/ruby/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [`template_add_user`](TemplateApi.md#template_add_user) | **POST** `/template/add_user/{template_id}` | Add User to Template | -| [`template_create`](TemplateApi.md#template_create) | **POST** `/template/create` | Create Template | +| [`template_create`](TemplateApi.md#template_create) | **POST** `/template/create` | Create Template | | [`template_create_embedded_draft`](TemplateApi.md#template_create_embedded_draft) | **POST** `/template/create_embedded_draft` | Create Embedded Template Draft | | [`template_delete`](TemplateApi.md#template_delete) | **POST** `/template/delete/{template_id}` | Delete Template | | [`template_files`](TemplateApi.md#template_files) | **GET** `/template/files/{template_id}` | Get Template Files | @@ -97,7 +97,7 @@ end > ` template_create(template_create_request)` -Create Template +Create Template Creates a template that can then be used. @@ -164,7 +164,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Create Template + # Create Template data, status_code, headers = api_instance.template_create_with_http_info(template_create_request) p status_code # => 2xx p headers # => { ... } diff --git a/sdks/ruby/docs/TemplateResponse.md b/sdks/ruby/docs/TemplateResponse.md index 18c191b7b..792e16a36 100644 --- a/sdks/ruby/docs/TemplateResponse.md +++ b/sdks/ruby/docs/TemplateResponse.md @@ -10,7 +10,7 @@ Contains information about the templates you and your team have created. | `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updated_at` | ```Integer``` | Time the template was last updated. | | -| `is_embedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_embedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `is_creator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `can_edit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `is_locked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -21,4 +21,5 @@ Contains information about the templates you and your team have created. | `custom_fields` | [```Array```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `named_form_fields` | [```Array```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```Array```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```Array```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/sdks/ruby/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/ruby/docs/TemplateResponseDocumentFormFieldBase.md index 52620dc6d..381c4814b 100644 --- a/sdks/ruby/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/ruby/docs/TemplateResponseDocumentFormFieldBase.md @@ -15,5 +15,4 @@ An array of Form Field objects containing the name and type of each named field. | `width` | ```Integer``` | The width in pixels of this form field. | | | `height` | ```Integer``` | The height in pixels of this form field. | | | `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/ruby/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/ruby/docs/TemplateResponseDocumentFormFieldCheckbox.md index 9eb4d6eed..13dd5cb48 100644 --- a/sdks/ruby/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/ruby/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

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

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

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'dropdown'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/ruby/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/ruby/docs/TemplateResponseDocumentFormFieldHyperlink.md index 7c6059afb..2bf06c0c0 100644 --- a/sdks/ruby/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/ruby/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -11,4 +11,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `is_multiline` | ```Boolean``` | Whether this form field is multiline text. | | | `original_font_size` | ```Integer``` | Original font size used in this form field's text. | | | `font_family` | ```String``` | Font family used in this form field's text. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/ruby/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/ruby/docs/TemplateResponseDocumentFormFieldInitials.md index de0250ace..63387d36e 100644 --- a/sdks/ruby/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/ruby/docs/TemplateResponseDocumentFormFieldInitials.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

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

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

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'signature'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/ruby/docs/TemplateResponseDocumentFormFieldText.md b/sdks/ruby/docs/TemplateResponseDocumentFormFieldText.md index c35a1e3a1..7bfe70283 100644 --- a/sdks/ruby/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/ruby/docs/TemplateResponseDocumentFormFieldText.md @@ -12,4 +12,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `original_font_size` | ```Integer``` | Original font size used in this form field's text. | | | `font_family` | ```String``` | Font family used in this form field's text. | | | `validation_type` | ```String``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 147b296a5..0921573f8 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -51,6 +51,7 @@ require 'dropbox-sign/models/event_callback_request' require 'dropbox-sign/models/event_callback_request_event' require 'dropbox-sign/models/event_callback_request_event_metadata' +require 'dropbox-sign/models/fax_get_response' require 'dropbox-sign/models/fax_line_add_user_request' require 'dropbox-sign/models/fax_line_area_code_get_country_enum' require 'dropbox-sign/models/fax_line_area_code_get_province_enum' @@ -62,6 +63,10 @@ require 'dropbox-sign/models/fax_line_remove_user_request' require 'dropbox-sign/models/fax_line_response' require 'dropbox-sign/models/fax_line_response_fax_line' +require 'dropbox-sign/models/fax_list_response' +require 'dropbox-sign/models/fax_response' +require 'dropbox-sign/models/fax_response_transmission' +require 'dropbox-sign/models/fax_send_request' require 'dropbox-sign/models/file_response' require 'dropbox-sign/models/file_response_data_uri' require 'dropbox-sign/models/list_info_response' @@ -206,6 +211,7 @@ require 'dropbox-sign/api/api_app_api' require 'dropbox-sign/api/bulk_send_job_api' require 'dropbox-sign/api/embedded_api' +require 'dropbox-sign/api/fax_api' require 'dropbox-sign/api/fax_line_api' require 'dropbox-sign/api/o_auth_api' require 'dropbox-sign/api/report_api' diff --git a/sdks/ruby/lib/dropbox-sign/api/fax_api.rb b/sdks/ruby/lib/dropbox-sign/api/fax_api.rb new file mode 100644 index 000000000..17fca7916 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/api/fax_api.rb @@ -0,0 +1,495 @@ +=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 + +require 'cgi' + +module Dropbox +end + +module Dropbox::Sign + class FaxApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Delete Fax + # Deletes the specified Fax from the system. + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [nil] + def fax_delete(fax_id, opts = {}) + fax_delete_with_http_info(fax_id, opts) + nil + end + + # Delete Fax + # 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 + def fax_delete_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_delete ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_delete" + end + # resource path + local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_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'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_delete", + :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(:DELETE, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Fax Files + # Returns list of fax files + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [File] + def fax_files(fax_id, opts = {}) + data, _status_code, _headers = fax_files_with_http_info(fax_id, opts) + data + end + + # List Fax Files + # Returns list of fax files + # @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 + def fax_files_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_files ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_files" + end + # resource path + local_var_path = '/fax/files/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_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/pdf', 'application/json']) unless header_params['Accept'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_files", + :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(:GET, 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::File" + ) + + 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: FaxApi#fax_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Fax + # Returns information about fax + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [FaxGetResponse] + def fax_get(fax_id, opts = {}) + data, _status_code, _headers = fax_get_with_http_info(fax_id, opts) + data + end + + # Get Fax + # Returns information about 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 + def fax_get_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_get ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_get" + end + # resource path + local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_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'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_get", + :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(:GET, 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::FaxGetResponse" + ) + + 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: FaxApi#fax_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Lists 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) + # @return [FaxListResponse] + def fax_list(opts = {}) + data, _status_code, _headers = fax_list_with_http_info(opts) + data + end + + # Lists 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) + # @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 + @api_client.config.logger.debug 'Calling API: FaxApi.fax_list ...' + end + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FaxApi.fax_list, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/fax/list' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # 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'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_list", + :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(:GET, 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::FaxListResponse" + ) + + 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: FaxApi#fax_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Send Fax + # Action to prepare and send a fax + # @param fax_send_request [FaxSendRequest] + # @param [Hash] opts the optional parameters + # @return [FaxGetResponse] + def fax_send(fax_send_request, opts = {}) + data, _status_code, _headers = fax_send_with_http_info(fax_send_request, opts) + data + end + + # Send Fax + # Action to prepare and send a fax + # @param fax_send_request [FaxSendRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers + def fax_send_with_http_info(fax_send_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_send ...' + end + # verify the required parameter 'fax_send_request' is set + if @api_client.config.client_side_validation && fax_send_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_send_request' when calling FaxApi.fax_send" + end + # resource path + local_var_path = '/fax/send' + + # 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( + fax_send_request, + Dropbox::Sign::FaxSendRequest.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] || 'FaxGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_send", + :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(:POST, 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::FaxGetResponse" + ) + + 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: FaxApi#fax_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end 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 eb0c67745..6e9d748e8 100644 --- a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb @@ -108,6 +108,20 @@ def oauth_token_generate_with_http_info(o_auth_token_generate_request, opts = {} 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 @@ -203,6 +217,20 @@ def oauth_token_refresh_with_http_info(o_auth_token_refresh_request, opts = {}) 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 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 438940953..d61d27b46 100644 --- a/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb @@ -241,7 +241,7 @@ def signature_request_bulk_send_with_template_with_http_info(signature_request_b end # 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]`. + # 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 signature_request_id [String] The id of the incomplete SignatureRequest to cancel. # @param [Hash] opts the optional parameters # @return [nil] @@ -251,7 +251,7 @@ def signature_request_cancel(signature_request_id, opts = {}) end # 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]`. + # 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 signature_request_id [String] The id of the incomplete SignatureRequest to cancel. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers diff --git a/sdks/ruby/lib/dropbox-sign/api/template_api.rb b/sdks/ruby/lib/dropbox-sign/api/template_api.rb index 445ee2b47..7b6e4ac16 100644 --- a/sdks/ruby/lib/dropbox-sign/api/template_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/template_api.rb @@ -137,7 +137,7 @@ def template_add_user_with_http_info(template_id, template_add_user_request, opt return data, status_code, headers end - # Create Template + # Create Template # Creates a template that can then be used. # @param template_create_request [TemplateCreateRequest] # @param [Hash] opts the optional parameters @@ -147,7 +147,7 @@ def template_create(template_create_request, opts = {}) data end - # Create Template + # Create Template # Creates a template that can then be used. # @param template_create_request [TemplateCreateRequest] # @param [Hash] opts the optional parameters 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 03ac4898f..fd718d612 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb @@ -35,7 +35,7 @@ class AccountResponseQuotas # @return [Integer, nil] attr_accessor :templates_left - # SMS verifications remaining. + # SMS verifications remaining. # @return [Integer, nil] attr_accessor :sms_verifications_left 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 c17650a5b..c861200d5 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 @@ -24,7 +24,7 @@ class ApiAppResponseOAuth attr_accessor :callback_url # The app's OAuth secret, or null if the app does not belong to user. - # @return [String] + # @return [String, nil] attr_accessor :secret # Array of OAuth scopes used by the app. @@ -63,6 +63,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'secret', ]) end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb new file mode 100644 index 000000000..a774af3b6 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb @@ -0,0 +1,263 @@ +=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 + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxGetResponse + # @return [FaxResponse] + attr_accessor :fax + + # A list of warnings. + # @return [Array] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax' => :'fax', + :'warnings' => :'warnings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax' => :'FaxResponse', + :'warnings' => :'Array' + } + 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 [FaxGetResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxGetResponse" + ) || FaxGetResponse.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::FaxGetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'fax') + self.fax = attributes[:'fax'] + end + + if attributes.key?(:'warnings') + if (value = attributes[:'warnings']).is_a?(Array) + self.warnings = value + end + 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 @fax.nil? + invalid_properties.push('invalid value for "fax", fax cannot be nil.') + 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 @fax.nil? + true + 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 && + fax == o.fax && + warnings == o.warnings + 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 + [fax, warnings].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/fax_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb new file mode 100644 index 000000000..a06e7fe82 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb @@ -0,0 +1,267 @@ +=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 + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxListResponse + # @return [Array] + attr_accessor :faxes + + # @return [ListInfoResponse] + attr_accessor :list_info + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'faxes' => :'faxes', + :'list_info' => :'list_info' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'faxes' => :'Array', + :'list_info' => :'ListInfoResponse' + } + 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 [FaxListResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxListResponse" + ) || FaxListResponse.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::FaxListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'faxes') + if (value = attributes[:'faxes']).is_a?(Array) + self.faxes = value + end + end + + if attributes.key?(:'list_info') + self.list_info = attributes[:'list_info'] + 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 @faxes.nil? + invalid_properties.push('invalid value for "faxes", faxes cannot be nil.') + end + + if @list_info.nil? + invalid_properties.push('invalid value for "list_info", list_info cannot be nil.') + 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 @faxes.nil? + return false if @list_info.nil? + true + 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 && + faxes == o.faxes && + list_info == o.list_info + 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 + [faxes, list_info].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/fax_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_response.rb new file mode 100644 index 000000000..a7c8847bf --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_response.rb @@ -0,0 +1,399 @@ +=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 + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxResponse + # Fax ID + # @return [String] + attr_accessor :fax_id + + # Fax Title + # @return [String] + attr_accessor :title + + # Fax Original Title + # @return [String] + attr_accessor :original_title + + # Fax Subject + # @return [String] + attr_accessor :subject + + # Fax Message + # @return [String] + attr_accessor :message + + # Fax Metadata + # @return [Hash] + attr_accessor :metadata + + # Fax Created At Timestamp + # @return [Integer] + attr_accessor :created_at + + # Fax Sender Email + # @return [String] + attr_accessor :sender + + # Fax Transmissions List + # @return [Array] + attr_accessor :transmissions + + # Fax Files URL + # @return [String] + attr_accessor :files_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax_id' => :'fax_id', + :'title' => :'title', + :'original_title' => :'original_title', + :'subject' => :'subject', + :'message' => :'message', + :'metadata' => :'metadata', + :'created_at' => :'created_at', + :'sender' => :'sender', + :'transmissions' => :'transmissions', + :'files_url' => :'files_url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax_id' => :'String', + :'title' => :'String', + :'original_title' => :'String', + :'subject' => :'String', + :'message' => :'String', + :'metadata' => :'Hash', + :'created_at' => :'Integer', + :'sender' => :'String', + :'transmissions' => :'Array', + :'files_url' => :'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 [FaxResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxResponse" + ) || FaxResponse.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::FaxResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'fax_id') + self.fax_id = attributes[:'fax_id'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'original_title') + self.original_title = attributes[:'original_title'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + end + + if attributes.key?(:'transmissions') + if (value = attributes[:'transmissions']).is_a?(Array) + self.transmissions = value + end + end + + if attributes.key?(:'files_url') + self.files_url = attributes[:'files_url'] + 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 @fax_id.nil? + invalid_properties.push('invalid value for "fax_id", fax_id cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @original_title.nil? + invalid_properties.push('invalid value for "original_title", original_title cannot be nil.') + end + + if @subject.nil? + invalid_properties.push('invalid value for "subject", subject cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @metadata.nil? + invalid_properties.push('invalid value for "metadata", metadata cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @sender.nil? + invalid_properties.push('invalid value for "sender", sender cannot be nil.') + end + + if @transmissions.nil? + invalid_properties.push('invalid value for "transmissions", transmissions cannot be nil.') + end + + if @files_url.nil? + invalid_properties.push('invalid value for "files_url", files_url cannot be nil.') + 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 @fax_id.nil? + return false if @title.nil? + return false if @original_title.nil? + return false if @subject.nil? + return false if @message.nil? + return false if @metadata.nil? + return false if @created_at.nil? + return false if @sender.nil? + return false if @transmissions.nil? + return false if @files_url.nil? + true + 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 && + fax_id == o.fax_id && + title == o.title && + original_title == o.original_title && + subject == o.subject && + message == o.message && + metadata == o.metadata && + created_at == o.created_at && + sender == o.sender && + transmissions == o.transmissions && + files_url == o.files_url + 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 + [fax_id, title, original_title, subject, message, metadata, created_at, sender, transmissions, files_url].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/fax_response_transmission.rb b/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb new file mode 100644 index 000000000..a6c49bb3a --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb @@ -0,0 +1,328 @@ +=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 + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxResponseTransmission + # Fax Transmission Recipient + # @return [String] + attr_accessor :recipient + + # Fax Transmission Sender + # @return [String] + attr_accessor :sender + + # Fax Transmission Status Code + # @return [String] + attr_accessor :status_code + + # Fax Transmission Sent Timestamp + # @return [Integer] + attr_accessor :sent_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recipient' => :'recipient', + :'sender' => :'sender', + :'status_code' => :'status_code', + :'sent_at' => :'sent_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recipient' => :'String', + :'sender' => :'String', + :'status_code' => :'String', + :'sent_at' => :'Integer' + } + 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 [FaxResponseTransmission] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxResponseTransmission" + ) || FaxResponseTransmission.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::FaxResponseTransmission` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'recipient') + self.recipient = attributes[:'recipient'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'sent_at') + self.sent_at = attributes[:'sent_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 @recipient.nil? + invalid_properties.push('invalid value for "recipient", recipient cannot be nil.') + end + + if @sender.nil? + invalid_properties.push('invalid value for "sender", sender cannot be nil.') + end + + if @status_code.nil? + invalid_properties.push('invalid value for "status_code", status_code cannot be nil.') + 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 @recipient.nil? + return false if @sender.nil? + return false if @status_code.nil? + status_code_validator = EnumAttributeValidator.new('String', ["success", "transmitting", "error_could_not_fax", "error_unknown", "error_busy", "error_no_answer", "error_disconnected", "error_bad_destination"]) + return false unless status_code_validator.valid?(@status_code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status_code Object to be assigned + def status_code=(status_code) + validator = EnumAttributeValidator.new('String', ["success", "transmitting", "error_could_not_fax", "error_unknown", "error_busy", "error_no_answer", "error_disconnected", "error_bad_destination"]) + unless validator.valid?(status_code) + fail ArgumentError, "invalid value for \"status_code\", must be one of #{validator.allowable_values}." + end + @status_code = status_code + 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 && + recipient == o.recipient && + sender == o.sender && + status_code == o.status_code && + sent_at == o.sent_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 + [recipient, sender, status_code, sent_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/fax_send_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb new file mode 100644 index 000000000..18616cee1 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb @@ -0,0 +1,345 @@ +=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 + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxSendRequest + # Fax Send To Recipient + # @return [String] + attr_accessor :recipient + + # Fax Send From Sender (used only with fax number) + # @return [String] + attr_accessor :sender + + # Fax File to Send + # @return [Array] + attr_accessor :files + + # Fax File URL to Send + # @return [Array] + attr_accessor :file_urls + + # API Test Mode Setting + # @return [Boolean] + attr_accessor :test_mode + + # Fax Cover Page for Recipient + # @return [String] + attr_accessor :cover_page_to + + # Fax Cover Page for Sender + # @return [String] + attr_accessor :cover_page_from + + # Fax Cover Page Message + # @return [String] + attr_accessor :cover_page_message + + # Fax Title + # @return [String] + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recipient' => :'recipient', + :'sender' => :'sender', + :'files' => :'files', + :'file_urls' => :'file_urls', + :'test_mode' => :'test_mode', + :'cover_page_to' => :'cover_page_to', + :'cover_page_from' => :'cover_page_from', + :'cover_page_message' => :'cover_page_message', + :'title' => :'title' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recipient' => :'String', + :'sender' => :'String', + :'files' => :'Array', + :'file_urls' => :'Array', + :'test_mode' => :'Boolean', + :'cover_page_to' => :'String', + :'cover_page_from' => :'String', + :'cover_page_message' => :'String', + :'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 [FaxSendRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxSendRequest" + ) || FaxSendRequest.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::FaxSendRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + 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 + end + h[k.to_sym] = v + } + + if attributes.key?(:'recipient') + self.recipient = attributes[:'recipient'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + 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?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'cover_page_to') + self.cover_page_to = attributes[:'cover_page_to'] + end + + if attributes.key?(:'cover_page_from') + self.cover_page_from = attributes[:'cover_page_from'] + end + + if attributes.key?(:'cover_page_message') + self.cover_page_message = attributes[:'cover_page_message'] + 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 @recipient.nil? + invalid_properties.push('invalid value for "recipient", recipient cannot be nil.') + 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 @recipient.nil? + true + 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 && + recipient == o.recipient && + sender == o.sender && + files == o.files && + file_urls == o.file_urls && + test_mode == o.test_mode && + cover_page_to == o.cover_page_to && + cover_page_from == o.cover_page_from && + cover_page_message == o.cover_page_message && + 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 + [recipient, sender, files, file_urls, test_mode, cover_page_to, cover_page_from, cover_page_message, 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/o_auth_token_refresh_request.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb index 7628e0b2e..3ac73212e 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 @@ -26,11 +26,21 @@ class OAuthTokenRefreshRequest # @return [String] attr_accessor :refresh_token + # The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # @return [String] + attr_accessor :client_id + + # The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # @return [String] + attr_accessor :client_secret + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'grant_type' => :'grant_type', - :'refresh_token' => :'refresh_token' + :'refresh_token' => :'refresh_token', + :'client_id' => :'client_id', + :'client_secret' => :'client_secret' } end @@ -43,7 +53,9 @@ def self.acceptable_attributes def self.openapi_types { :'grant_type' => :'String', - :'refresh_token' => :'String' + :'refresh_token' => :'String', + :'client_id' => :'String', + :'client_secret' => :'String' } end @@ -102,6 +114,14 @@ def initialize(attributes = {}) if attributes.key?(:'refresh_token') self.refresh_token = attributes[:'refresh_token'] end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -133,7 +153,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && grant_type == o.grant_type && - refresh_token == o.refresh_token + refresh_token == o.refresh_token && + client_id == o.client_id && + client_secret == o.client_secret end # @see the `==` method @@ -145,7 +167,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [grant_type, refresh_token].hash + [grant_type, refresh_token, client_id, client_secret].hash end # Builds the object from hash 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 023a55297..d6c25e221 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 @@ -183,7 +183,7 @@ def initialize(attributes = {}) if attributes.key?(:'header_background_color') self.header_background_color = attributes[:'header_background_color'] else - self.header_background_color = '#1A1A1A' + self.header_background_color = '#1a1a1a' end if attributes.key?(:'legal_version') @@ -195,61 +195,61 @@ def initialize(attributes = {}) if attributes.key?(:'link_color') self.link_color = attributes[:'link_color'] else - self.link_color = '#00B3E6' + self.link_color = '#0061FE' end if attributes.key?(:'page_background_color') self.page_background_color = attributes[:'page_background_color'] else - self.page_background_color = '#F7F8F9' + self.page_background_color = '#f7f8f9' end if attributes.key?(:'primary_button_color') self.primary_button_color = attributes[:'primary_button_color'] else - self.primary_button_color = '#00B3E6' + self.primary_button_color = '#0061FE' end if attributes.key?(:'primary_button_color_hover') self.primary_button_color_hover = attributes[:'primary_button_color_hover'] else - self.primary_button_color_hover = '#00B3E6' + self.primary_button_color_hover = '#0061FE' end if attributes.key?(:'primary_button_text_color') self.primary_button_text_color = attributes[:'primary_button_text_color'] else - self.primary_button_text_color = '#FFFFFF' + self.primary_button_text_color = '#ffffff' end if attributes.key?(:'primary_button_text_color_hover') self.primary_button_text_color_hover = attributes[:'primary_button_text_color_hover'] else - self.primary_button_text_color_hover = '#FFFFFF' + self.primary_button_text_color_hover = '#ffffff' end if attributes.key?(:'secondary_button_color') self.secondary_button_color = attributes[:'secondary_button_color'] else - self.secondary_button_color = '#FFFFFF' + self.secondary_button_color = '#ffffff' end if attributes.key?(:'secondary_button_color_hover') self.secondary_button_color_hover = attributes[:'secondary_button_color_hover'] else - self.secondary_button_color_hover = '#FFFFFF' + self.secondary_button_color_hover = '#ffffff' end if attributes.key?(:'secondary_button_text_color') self.secondary_button_text_color = attributes[:'secondary_button_text_color'] else - self.secondary_button_text_color = '#00B3E6' + self.secondary_button_text_color = '#0061FE' end if attributes.key?(:'secondary_button_text_color_hover') self.secondary_button_text_color_hover = attributes[:'secondary_button_text_color_hover'] else - self.secondary_button_text_color_hover = '#00B3E6' + self.secondary_button_text_color_hover = '#0061FE' end if attributes.key?(:'text_color1') @@ -261,7 +261,7 @@ def initialize(attributes = {}) if attributes.key?(:'text_color2') self.text_color2 = attributes[:'text_color2'] else - self.text_color2 = '#FFFFFF' + self.text_color2 = '#ffffff' end if attributes.key?(:'reset_to_default') diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_response.rb index 7d14e8a13..51450dde3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response.rb @@ -35,20 +35,20 @@ class TemplateResponse # @return [Integer] attr_accessor :updated_at - # `true` if this template was created using an embedded flow, `false` if it was created on our website. + # `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. # @return [Boolean, nil] attr_accessor :is_embedded # `true` if you are the owner of this template, `false` if it's been shared with you by a team member. - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :is_creator # Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :can_edit # Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :is_locked # The metadata attached to the template. @@ -76,9 +76,13 @@ class TemplateResponse attr_accessor :named_form_fields # An array of the Accounts that can use this Template. - # @return [Array, nil] + # @return [Array] attr_accessor :accounts + # Signer attachments. + # @return [Array] + attr_accessor :attachments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -96,7 +100,8 @@ def self.attribute_map :'documents' => :'documents', :'custom_fields' => :'custom_fields', :'named_form_fields' => :'named_form_fields', - :'accounts' => :'accounts' + :'accounts' => :'accounts', + :'attachments' => :'attachments' } end @@ -122,7 +127,8 @@ def self.openapi_types :'documents' => :'Array', :'custom_fields' => :'Array', :'named_form_fields' => :'Array', - :'accounts' => :'Array' + :'accounts' => :'Array', + :'attachments' => :'Array' } end @@ -130,12 +136,8 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'is_embedded', - :'is_creator', - :'can_edit', - :'is_locked', :'custom_fields', :'named_form_fields', - :'accounts' ]) end @@ -250,6 +252,12 @@ def initialize(attributes = {}) self.accounts = value end end + + if attributes.key?(:'attachments') + if (value = attributes[:'attachments']).is_a?(Array) + self.attachments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -284,7 +292,8 @@ def ==(o) documents == o.documents && custom_fields == o.custom_fields && named_form_fields == o.named_form_fields && - accounts == o.accounts + accounts == o.accounts && + attachments == o.attachments end # @see the `==` method @@ -296,7 +305,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [template_id, title, message, updated_at, is_embedded, is_creator, can_edit, is_locked, metadata, signer_roles, cc_roles, documents, custom_fields, named_form_fields, accounts].hash + [template_id, title, message, updated_at, is_embedded, is_creator, can_edit, is_locked, metadata, signer_roles, cc_roles, documents, custom_fields, named_form_fields, accounts, attachments].hash end # Builds the object from hash 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 6d23cb39f..49eaf4fc6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb @@ -39,7 +39,7 @@ class TemplateResponseDocument attr_accessor :custom_fields # An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. - # @return [Array, nil] + # @return [Array] attr_accessor :static_fields # Attribute mapping from ruby-style variable name to JSON key. @@ -74,7 +74,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'static_fields' ]) end 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 f9917555b..bc91770be 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 @@ -54,10 +54,6 @@ class TemplateResponseDocumentFormFieldBase # @return [Boolean] attr_accessor :required - # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - # @return [String, nil] - attr_accessor :group - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -69,8 +65,7 @@ def self.attribute_map :'y' => :'y', :'width' => :'width', :'height' => :'height', - :'required' => :'required', - :'group' => :'group' + :'required' => :'required' } end @@ -90,15 +85,13 @@ def self.openapi_types :'y' => :'Integer', :'width' => :'Integer', :'height' => :'Integer', - :'required' => :'Boolean', - :'group' => :'String' + :'required' => :'Boolean' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'group' ]) end @@ -203,10 +196,6 @@ def initialize(attributes = {}) if attributes.key?(:'required') self.required = attributes[:'required'] end - - if attributes.key?(:'group') - self.group = attributes[:'group'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -240,8 +229,7 @@ def ==(o) y == o.y && width == o.width && height == o.height && - required == o.required && - group == o.group + required == o.required end # @see the `==` method @@ -253,7 +241,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, api_id, name, signer, x, y, width, height, required, group].hash + [type, api_id, name, signer, x, y, width, height, required].hash end # Builds the object from hash 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 c888138c3..a4c759c12 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldCheckbox < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'checkbox' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 94ec5f659..f20f04c4f 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldDateSigned < TemplateResponseDocumentForm # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'date_signed' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 0291303b4..c6ad1b3dd 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldDropdown < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'dropdown' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 7c8992ffa..f2f8631ac 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 @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldHyperlink < TemplateResponseDocumentFormF # @return [String] attr_accessor :font_family + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -45,7 +49,8 @@ def self.attribute_map :'avg_text_length' => :'avg_text_length', :'is_multiline' => :'isMultiline', :'original_font_size' => :'originalFontSize', - :'font_family' => :'fontFamily' + :'font_family' => :'fontFamily', + :'group' => :'group' } end @@ -61,13 +66,15 @@ def self.openapi_types :'avg_text_length' => :'TemplateResponseFieldAvgTextLength', :'is_multiline' => :'Boolean', :'original_font_size' => :'Integer', - :'font_family' => :'String' + :'font_family' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -135,6 +142,10 @@ def initialize(attributes = {}) if attributes.key?(:'font_family') self.font_family = attributes[:'font_family'] end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -164,7 +175,8 @@ def ==(o) avg_text_length == o.avg_text_length && is_multiline == o.is_multiline && original_font_size == o.original_font_size && - font_family == o.font_family && super(o) + font_family == o.font_family && + group == o.group && super(o) end # @see the `==` method @@ -176,7 +188,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, avg_text_length, is_multiline, original_font_size, font_family].hash + [type, avg_text_length, is_multiline, original_font_size, font_family, group].hash end # Builds the object from hash 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 70f5ed581..3ff48a726 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldInitials < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'initials' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 2412dc9dc..6af0b07d8 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldRadio < TemplateResponseDocumentFormField # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,7 +43,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end @@ -96,6 +102,10 @@ def initialize(attributes = {}) else self.type = 'radio' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -106,6 +116,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "type", type cannot be nil.') end + if @group.nil? + invalid_properties.push('invalid value for "group", group cannot be nil.') + end + invalid_properties end @@ -113,6 +127,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? + return false if @group.nil? true && super end @@ -121,7 +136,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +149,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 49fdbbbc4..c48d15719 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldSignature < TemplateResponseDocumentFormF # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'signature' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 6a11d8a29..51ed8bcd8 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 @@ -42,6 +42,10 @@ class TemplateResponseDocumentFormFieldText < TemplateResponseDocumentFormFieldB # @return [String, nil] attr_accessor :validation_type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -72,7 +76,8 @@ def self.attribute_map :'is_multiline' => :'isMultiline', :'original_font_size' => :'originalFontSize', :'font_family' => :'fontFamily', - :'validation_type' => :'validation_type' + :'validation_type' => :'validation_type', + :'group' => :'group' } end @@ -89,14 +94,16 @@ def self.openapi_types :'is_multiline' => :'Boolean', :'original_font_size' => :'Integer', :'font_family' => :'String', - :'validation_type' => :'String' + :'validation_type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'validation_type' + :'validation_type', + :'group' ]) end @@ -168,6 +175,10 @@ def initialize(attributes = {}) if attributes.key?(:'validation_type') self.validation_type = attributes[:'validation_type'] end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -210,7 +221,8 @@ def ==(o) is_multiline == o.is_multiline && original_font_size == o.original_font_size && font_family == o.font_family && - validation_type == o.validation_type && super(o) + validation_type == o.validation_type && + group == o.group && super(o) end # @see the `==` method @@ -222,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type].hash + [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type, group].hash end # Builds the object from hash diff --git a/sdks/ruby/lib/dropbox-sign/version.rb b/sdks/ruby/lib/dropbox-sign/version.rb index af126e37a..5b0f2adc3 100644 --- a/sdks/ruby/lib/dropbox-sign/version.rb +++ b/sdks/ruby/lib/dropbox-sign/version.rb @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.6-dev' + VERSION = '1.7-dev' end diff --git a/sdks/ruby/openapi-config.yaml b/sdks/ruby/openapi-config.yaml index 21dcabc97..accddfcdb 100644 --- a/sdks/ruby/openapi-config.yaml +++ b/sdks/ruby/openapi-config.yaml @@ -9,7 +9,7 @@ additionalProperties: gemName: dropbox-sign gemRequiredRubyVersion: '>= 2.7' moduleName: "Dropbox::Sign" - gemVersion: 1.6-dev + gemVersion: 1.7-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/sdks/ruby/run-build b/sdks/ruby/run-build index bf772d8c8..7127d6455 100755 --- a/sdks/ruby/run-build +++ b/sdks/ruby/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/ruby" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/lib/dropbox-sign/api/"*.rb +rm -f "${DIR}/lib/dropbox-sign/models/"*.rb + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/test_fixtures/ApiAppCreateRequest.json b/test_fixtures/ApiAppCreateRequest.json index ac9729d12..2ee8e41a2 100644 --- a/test_fixtures/ApiAppCreateRequest.json +++ b/test_fixtures/ApiAppCreateRequest.json @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppGetResponse.json b/test_fixtures/ApiAppGetResponse.json index 07843c389..f7d799fe7 100644 --- a/test_fixtures/ApiAppGetResponse.json +++ b/test_fixtures/ApiAppGetResponse.json @@ -7,7 +7,7 @@ "is_approved": false, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -15,13 +15,28 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" }, "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" + "header_background_color": "#1A1A1A", + "legal_version": "terms1", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", + "primary_button_text_color": "#ffffff", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", + "text_color1": "#808080", + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppListResponse.json b/test_fixtures/ApiAppListResponse.json index 6bbacb494..cc17d45d3 100644 --- a/test_fixtures/ApiAppListResponse.json +++ b/test_fixtures/ApiAppListResponse.json @@ -8,7 +8,7 @@ "is_approved": true, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -16,6 +16,9 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" @@ -27,6 +30,9 @@ "domains": ["example.com"], "is_approved": false, "name": "My Other App", + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" diff --git a/test_fixtures/ApiAppUpdateRequest.json b/test_fixtures/ApiAppUpdateRequest.json index 4744e05f1..ee4e9ffc8 100644 --- a/test_fixtures/ApiAppUpdateRequest.json +++ b/test_fixtures/ApiAppUpdateRequest.json @@ -4,7 +4,7 @@ "domains": [ "example.com" ], - "callback_url": "http://example.com/dropboxsign", + "callback_url": "https://example.com/dropboxsign", "oauth": { "callback_url": "https://example.com/oauth", "scopes": [ @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json new file mode 100644 index 000000000..589271954 --- /dev/null +++ b/test_fixtures/FaxGetResponse.json @@ -0,0 +1,23 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json new file mode 100644 index 000000000..bfa69cdee --- /dev/null +++ b/test_fixtures/FaxListResponse.json @@ -0,0 +1,31 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] + } +} diff --git a/test_fixtures/FaxSendRequest.json b/test_fixtures/FaxSendRequest.json new file mode 100644 index 000000000..4c418cbe4 --- /dev/null +++ b/test_fixtures/FaxSendRequest.json @@ -0,0 +1,14 @@ +{ + "default": { + "file_url": [ + "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + ], + "test_mode": "true", + "recipient": "16690000001", + "sender": "16690000000", + "cover_page_to": "Jill Fax", + "cover_page_message": "I'm sending you a fax!", + "cover_page_from": "Faxer Faxerson", + "title": "This is what the fax is about!" + } +} diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json new file mode 100644 index 000000000..b651c7836 --- /dev/null +++ b/test_fixtures/FaxSendResponse.json @@ -0,0 +1,16 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [ ], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + } + } +} diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16c3..327d26c25 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } } diff --git a/test_fixtures/TemplateGetResponse.json b/test_fixtures/TemplateGetResponse.json index 52ff62260..b025913a0 100644 --- a/test_fixtures/TemplateGetResponse.json +++ b/test_fixtures/TemplateGetResponse.json @@ -5,7 +5,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -566,496 +569,40 @@ ] } ], - "custom_fields": [ - { - "name": "merge_field_1", - "type": "text", - "x": 417, - "y": 219, - "width": 72, - "height": 15, - "required": false, - "api_id": "967c3e5f-2912-4f53-8ea3-c750652d29fc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "merge_field_2", - "type": "checkbox", - "x": 515, - "y": 346, - "width": 18, - "height": 18, - "required": false, - "api_id": "5e8fe02f-51cf-4f0b-b1d9-2b1e4f6ad07f" - } - ], - "named_form_fields": [ - { - "name": "Signature1", - "type": "signature", - "signer": "1", - "x": 136, - "y": 17, - "width": 108, - "height": 27, - "required": true, - "api_id": "8b6d78a5-0870-4f46-af9c-b78b54a49348" - }, - { - "name": "Textbox1", - "type": "text", - "signer": "1", - "x": 328, - "y": 17, - "width": 144, - "height": 14, - "required": true, - "api_id": "7ec10d80-53c9-433b-b252-0b8daa90a8e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox2", - "type": "text", - "signer": "1", - "x": 328, - "y": 48, - "width": 144, - "height": 14, - "required": true, - "api_id": "6574e6ad-7dac-49a2-9d56-650d7c5ade6e", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Initial1", - "type": "initials", - "signer": "1", - "x": 148, - "y": 66, - "width": 72, - "height": 27, - "required": true, - "api_id": "30f41f54-c7f3-46c3-a29a-bb76ec40b552" - }, - { - "name": "Checkbox1", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 111, - "width": 18, - "height": 18, - "required": false, - "api_id": "d4d6ada9-e1dc-419e-bc0d-1478da694449", - "group": "75a6e4b5fea47" - }, - { - "name": "Dropdown1", - "type": "dropdown", - "signer": "1", - "x": 423, - "y": 108, - "width": 70, - "height": 14, - "required": true, - "api_id": "5863be5e-ce5a-4c9d-aabe-c221914d73c2" - }, - { - "name": "DateSigned1", - "type": "date_signed", - "signer": "1", - "x": 150, - "y": 119, - "width": 105, - "height": 18, - "required": true, - "api_id": "9f6d3722-6db7-46da-8fac-3bc09f510262" - }, - { - "name": "Checkbox2", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 135, - "width": 18, - "height": 18, - "required": false, - "api_id": "edd732b8-b158-4714-a87b-503637d09ded", - "group": "75a6e4b5fea47" - }, - { - "name": "FullName1", - "type": "text", - "signer": "1", - "x": 144, - "y": 158, - "width": 72, - "height": 14, - "required": true, - "api_id": "62fd3f85-4808-4011-8eae-a14ebe9105ef", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Email1", - "type": "text", - "signer": "1", - "x": 133, - "y": 191, - "width": 144, - "height": 14, - "required": true, - "api_id": "a1c9bc6b-d498-4787-86e0-30ea779f06a7", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "RadioItem1", - "type": "radio", - "signer": "1", - "x": 307, - "y": 211, - "width": 18, - "height": 18, - "required": false, - "api_id": "fc8a1277-f757-47a2-aeea-5113fa81f2d5", - "group": "0831822584086" - }, - { - "name": "Company1", - "type": "text", - "signer": "1", - "x": 128, - "y": 221, - "width": 144, - "height": 14, - "required": true, - "api_id": "279b4e7f-e71f-426d-845c-6308cddde379", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Title1", - "type": "text", - "signer": "1", - "x": 127, - "y": 250, - "width": 144, - "height": 14, - "required": true, - "api_id": "8809e39a-a46c-4dae-aaf9-06fc6355d80f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "RadioItem2", - "type": "radio", - "signer": "1", - "x": 307, - "y": 253, - "width": 18, - "height": 18, - "required": false, - "api_id": "f7b6b70d-0522-4ab7-bfec-b86f147c8be3", - "group": "0831822584086" - }, - { - "name": "Textbox3", - "type": "text", - "signer": "1", - "x": 410, - "y": 279, - "width": 144, - "height": 14, - "required": true, - "api_id": "bad7512a-e22b-46ed-ba03-123db0eda932", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox4", - "type": "text", - "signer": "1", - "x": 101, - "y": 314, - "width": 72, - "height": 14, - "required": true, - "api_id": "368ed029-bc93-4f92-8f7a-14c3bf8109b5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "custom_regex" - }, - { - "name": "Textbox8", - "type": "text", - "signer": "1", - "x": 218, - "y": 313, - "width": 72, - "height": 14, - "required": true, - "api_id": "ecf2ae95-d2e6-41b2-819a-836a6fa8c7c5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_routing_number" - }, - { - "name": "Textbox12", - "type": "text", - "signer": "1", - "x": 339, - "y": 315, - "width": 72, - "height": 14, - "required": true, - "api_id": "3cb90a0a-a433-4f30-8af8-8fb4c747b704", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "social_security_number" - }, - { - "name": "Textbox9", - "type": "text", - "signer": "1", - "x": 224, - "y": 343, - "width": 72, - "height": 14, - "required": true, - "api_id": "5b9eb331-c97d-435b-a563-d936a9b930c0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_account_number" - }, - { - "name": "Textbox13", - "type": "text", - "signer": "1", - "x": 339, - "y": 345, - "width": 72, - "height": 14, - "required": true, - "api_id": "2b98ce7e-e53a-4cf8-a9f3-d7fb18d88631", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "employer_identification_number" - }, - { - "name": "Textbox5", - "type": "text", - "signer": "1", - "x": 113, - "y": 350, - "width": 72, - "height": 14, - "required": true, - "api_id": "5f52c011-2c5f-4143-bf04-4694fb4a0d3f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "numbers_only" - }, - { - "name": "Textbox6", - "type": "text", - "signer": "1", - "x": 122, - "y": 374, - "width": 72, - "height": 14, - "required": true, - "api_id": "47457b7d-b1e8-41a0-93ad-60ba30e64bb1", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "letters_only" - }, - { - "name": "Textbox10", - "type": "text", - "signer": "1", - "x": 234, - "y": 373, - "width": 72, - "height": 14, - "required": true, - "api_id": "18e3f994-1675-4d58-9b4a-4f92a2614551", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "Textbox14", - "type": "text", - "signer": "1", - "x": 339, - "y": 376, - "width": 72, - "height": 14, - "required": true, - "api_id": "9ad4b8cc-bac9-432b-8836-9f80f86fc7e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox7", - "type": "text", - "signer": "1", - "x": 130, - "y": 401, - "width": 72, - "height": 14, - "required": true, - "api_id": "58c5f942-04fb-45f1-9703-5e8411f3a3bb", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "phone_number" - }, - { - "name": "me_now_hyperlink_1", - "type": "hyperlink", - "signer": "me_now", - "x": 434, - "y": 400, - "width": 112, - "height": 14, - "required": false, - "api_id": "fd928b56-cf59-40a4-9a90-62f97ffd0ddc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 30 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "helvetica" - }, - { - "name": "Textbox11", - "type": "text", - "signer": "1", - "x": 237, - "y": 405, - "width": 72, - "height": 14, - "required": true, - "api_id": "e48c388d-8c26-4f20-848e-f8587a631746", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "zip_code" - } - ], "accounts": [ { "account_id": "5008b25c7f67153e57d5a357b1687968068fb465", "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } }, { "account_id": "", "email_address": "teammate@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] } diff --git a/test_fixtures/TemplateListResponse.json b/test_fixtures/TemplateListResponse.json index 7c4768b82..caa5e6d8f 100644 --- a/test_fixtures/TemplateListResponse.json +++ b/test_fixtures/TemplateListResponse.json @@ -12,7 +12,10 @@ "title": "Purchase order", "message": "", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -49,7 +52,8 @@ "originalFontSize": 12, "fontFamily": "arial" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -58,7 +62,21 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] }, @@ -67,7 +85,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1329478947, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -564,7 +585,8 @@ "fontFamily": "arial", "validation_type": "zip_code" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -573,9 +595,16 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } } - ] + ], + "attachments": [] } ] } diff --git a/translations/en.yaml b/translations/en.yaml index 6925e38a4..6af9701d5 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -130,6 +130,45 @@ "EmbeddedSignUrl::DESCRIPTION": 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. "EmbeddedSignUrl::SIGNATURE_ID": The id of the signature to get a signature url for. +"FaxGet::SUMMARY": Get Fax +"FaxGet::DESCRIPTION": Returns information about 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 +"FaxList::SUMMARY": Lists Faxes +"FaxList::DESCRIPTION": Returns properties of multiple faxes +"FaxList::PAGE": Page +"FaxList::PAGE_SIZE": Page size +"FaxSend::SUMMARY": Send Fax +"FaxSend::DESCRIPTION": Action to prepare and send a fax +"FaxSend::RECIPIENT": Fax Send To Recipient +"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_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_MESSAGE": Fax Cover Page Message +"FaxSend::TITLE": Fax Title +"FaxGetResponseExample::SUMMARY": Fax Response +"FaxResponse::FAX_ID": Fax ID +"FaxResponse::TITLE": Fax Title +"FaxResponse::ORIGINAL_TITLE": Fax Original Title +"FaxResponse::SUBJECT": Fax Subject +"FaxResponse::MESSAGE": Fax Message +"FaxResponse::METADATA": Fax Metadata +"FaxResponse::CREATED_AT": Fax Created At Timestamp +"FaxResponse::SENDER": Fax Sender Email +"FaxResponse::TRANSMISSIONS": Fax Transmissions List +"FaxResponse::FILES_URL": Fax Files URL +"Sub::FaxResponseTransmission::RECIPIENT": Fax Transmission Recipient +"Sub::FaxResponseTransmission::SENDER": Fax Transmission Sender +"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. "FaxLineAddUser::SUMMARY": Add Fax Line User "FaxLineAddUser::DESCRIPTION": Grants a user access to the specified Fax Line. "FaxLineAddUser::NUMBER": The Fax Line number. @@ -183,6 +222,8 @@ "OAuthTokenRefresh::DESCRIPTION": 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. "OAuthTokenRefresh::GRANT_TYPE": When refreshing an existing token use `refresh_token`. "OAuthTokenRefresh::REFRESH_TOKEN": The token provided when you got the expired access token. +"OAuthTokenRefresh::CLIENT_ID": The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. +"OAuthTokenRefresh::CLIENT_SECRET": The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. "ReportCreate::SUMMARY": Create Report "ReportCreate::DESCRIPTION": |- @@ -273,7 +314,7 @@ The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -642,7 +683,7 @@ "TemplateCreateEmbeddedDraft::USE_PREEXISTING_FIELDS": Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). -"TemplateCreate::SUMMARY": Create Template +"TemplateCreate::SUMMARY": Create Template "TemplateCreate::DESCRIPTION": Creates a template that can then be used. "TemplateCreate::ALLOW_CCS": This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. @@ -766,7 +807,7 @@ "UnclaimedDraftCreate::TYPE": 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. "UnclaimedDraftCreate::USE_PREEXISTING_FIELDS": 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. "UnclaimedDraftCreate::USE_TEXT_TAGS": 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. -"UnclaimedDraftCreate::EXPIRES_AT": |- +"UnclaimedDraftCreate::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. **NOTE:** This does not correspond to the **expires_at** returned in the response. @@ -816,7 +857,7 @@ 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. -"UnclaimedDraftCreateEmbedded::EXPIRES_AT": |- +"UnclaimedDraftCreateEmbedded::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. **NOTE:** This does not correspond to the **expires_at** returned in the response. @@ -1199,7 +1240,7 @@ "AccountQuota::TEMPLATES_TOTAL": Total API templates allowed. "AccountQuota::API_SIGNATURE_REQUESTS_LEFT": API signature requests remaining. "AccountQuota::DOCUMENTS_LEFT": Signature requests remaining. -"AccountQuota::SMS_VERIFICATIONS_LEFT": SMS verifications remaining. +"AccountQuota::SMS_VERIFICATIONS_LEFT": SMS verifications remaining. "AccountQuota::NUM_FAX_PAGES_LEFT": Number of fax pages left "AccountUsage::FAX_PAGES_SENT": Number of fax pages sent @@ -1256,7 +1297,7 @@ "EmbeddedEditUrlResponseEmbedded::DESCRIPTION": An embedded template object. "EmbeddedEditUrlResponseEmbedded::EDIT_URL": A template url that can be opened in an iFrame. -"EmbeddedEditUrlResponseEmbedded::EXPIRES_AT": The specific time that the the `edit_url` link expires, in epoch. +"EmbeddedEditUrlResponseEmbedded::EXPIRES_AT": The specific time that the the `edit_url` link expires, in epoch. "EventCallbackAccountRequest::DESCRIPTION": |- **Account Callback Payloads --** @@ -1447,7 +1488,7 @@ "TemplateResponse::TEMPLATE_ID": The id of the Template. "TemplateResponse::CAN_EDIT": Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). "TemplateResponse::IS_CREATOR": "`true` if you are the owner of this template, `false` if it's been shared with you by a team member." -"TemplateResponse::IS_EMBEDDED": "`true` if this template was created using an embedded flow, `false` if it was created on our website." +"TemplateResponse::IS_EMBEDDED": "`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template." "TemplateResponse::IS_LOCKED": |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. @@ -1486,7 +1527,7 @@ "TemplateResponseAccountQuota::TEMPLATES_LEFT": API templates remaining. "TemplateResponseAccountQuota::SMS_VERIFICATIONS_LEFT": SMS verifications remaining. -"TemplateResponseCCRole::TEMPLATES_LEFT": The name of the Role. +"TemplateResponseCCRole::NAME": The name of the Role. "TemplateResponseDocument::INDEX": Document ordering, the lowest index is displayed first and the highest last (0-based indexing). "TemplateResponseDocument::NAME": Name of the associated file. @@ -1659,6 +1700,16 @@ "EmbeddedEditUrl::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a template url, click here." "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." +"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." +"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::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"