diff --git a/examples/AccountSettingsGetExample.cs b/examples/AccountSettingsGetExample.cs new file mode 100644 index 000000000..3ba494a7d --- /dev/null +++ b/examples/AccountSettingsGetExample.cs @@ -0,0 +1,39 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountSettingsGet(); + var company = response.Settings.Company; + + Console.WriteLine(response); + Console.WriteLine(response.AccountId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountSettingsGetExample.java b/examples/AccountSettingsGetExample.java new file mode 100644 index 000000000..cb2003697 --- /dev/null +++ b/examples/AccountSettingsGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class AccountSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + + System.out.println(response); + System.out.println(response.getAccountId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsGet"); + System.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/AccountSettingsGetExample.php b/examples/AccountSettingsGetExample.php new file mode 100644 index 000000000..b184119be --- /dev/null +++ b/examples/AccountSettingsGetExample.php @@ -0,0 +1,35 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsGet(); + $company = $response->getSettings()->getCompany(); + + print_r($response); + print_r([ + 'account_id' => $response->getAccountId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsGet: {$e->getMessage()}"; +} diff --git a/examples/AccountSettingsGetExample.py b/examples/AccountSettingsGetExample.py new file mode 100644 index 000000000..1a00db47b --- /dev/null +++ b/examples/AccountSettingsGetExample.py @@ -0,0 +1,32 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_settings_get() + company = response.settings.company + + pprint(response) + pprint({ + "account_id": response.account_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "warnings": response.warnings, + }) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_get: %s\n" % e) diff --git a/examples/AccountSettingsGetExample.rb b/examples/AccountSettingsGetExample.rb new file mode 100644 index 000000000..0edd391be --- /dev/null +++ b/examples/AccountSettingsGetExample.rb @@ -0,0 +1,30 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_get + company = response.settings.company + + p response + p({ + account_id: response.account_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_get: #{e}" +end diff --git a/examples/AccountSettingsGetExample.sh b/examples/AccountSettingsGetExample.sh new file mode 100644 index 000000000..3ef382543 --- /dev/null +++ b/examples/AccountSettingsGetExample.sh @@ -0,0 +1,20 @@ +curl -X GET 'https://api.hellosign.com/v3/account/settings' \ + -u 'YOUR_API_KEY:' + +# { +# "account_id": "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", +# "settings": { +# "company": { +# "value": "Northwind", +# "is_inherited": false, +# "source": "account", +# "type": "string", +# "writable": true, +# "lock": { +# "mode": "members", +# "source": "default" +# } +# } +# }, +# "warnings": [] +# } diff --git a/examples/AccountSettingsGetExample.ts b/examples/AccountSettingsGetExample.ts new file mode 100644 index 000000000..9f81ec8c5 --- /dev/null +++ b/examples/AccountSettingsGetExample.ts @@ -0,0 +1,28 @@ +import api from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountSettingsGet().then(response => { + const company = response.body.settings.company; + console.log(response.body); + console.log({ + accountId: response.body.accountId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsGet:"); + console.log(error.body); +}); diff --git a/examples/AccountSettingsUpdateExample.cs b/examples/AccountSettingsUpdateExample.cs new file mode 100644 index 000000000..e5d0c9c0b --- /dev/null +++ b/examples/AccountSettingsUpdateExample.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest( + dateFormat: DateFormat.MMDDYYYY, + requiredSignatureTypes: new List() + { + RequiredSignatureType.Draw, + RequiredSignatureType.Type, + }, + shouldEnableTamperProof: false, + unset: new List() { "company" } + ); + + try + { + var response = new AccountApi(config).AccountSettingsUpdate( + accountSettingsUpdateRequest: accountSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountSettingsUpdateExample.java b/examples/AccountSettingsUpdateExample.java new file mode 100644 index 000000000..7d800f81f --- /dev/null +++ b/examples/AccountSettingsUpdateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; +import com.dropbox.sign.model.DateFormat; +import com.dropbox.sign.model.RequiredSignatureType; +import java.util.List; + +public class AccountSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest() + .dateFormat(DateFormat.MM_DD_YYYY) + .requiredSignatureTypes(List.of( + RequiredSignatureType.DRAW, + RequiredSignatureType.TYPE + )) + .shouldEnableTamperProof(false) + .unset(List.of("company")); + + try + { + var response = new AccountApi(config).accountSettingsUpdate( + accountSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsUpdate"); + System.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/AccountSettingsUpdateExample.php b/examples/AccountSettingsUpdateExample.php new file mode 100644 index 000000000..e1cd920fd --- /dev/null +++ b/examples/AccountSettingsUpdateExample.php @@ -0,0 +1,30 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$account_settings_update_request = (new Dropbox\Sign\Model\AccountSettingsUpdateRequest()) + ->setDateFormat(Dropbox\Sign\Model\DateFormat::MM_DD_YYYY) + ->setRequiredSignatureTypes([ + Dropbox\Sign\Model\RequiredSignatureType::DRAW, + Dropbox\Sign\Model\RequiredSignatureType::TYPE, + ]) + ->setShouldEnableTamperProof(false) + ->setUnset(['company']); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsUpdate( + account_settings_update_request: $account_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsUpdate: {$e->getMessage()}"; +} diff --git a/examples/AccountSettingsUpdateExample.py b/examples/AccountSettingsUpdateExample.py new file mode 100644 index 000000000..be0afdda2 --- /dev/null +++ b/examples/AccountSettingsUpdateExample.py @@ -0,0 +1,28 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_settings_update_request = models.AccountSettingsUpdateRequest( + date_format=models.DateFormat.MM_SLASH_DD_SLASH_YYYY, + required_signature_types=[ + models.RequiredSignatureType.DRAW, + models.RequiredSignatureType.TYPE, + ], + should_enable_tamper_proof=False, + unset=["company"], + ) + + try: + response = api.AccountApi(api_client).account_settings_update( + account_settings_update_request=account_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_update: %s\n" % e) diff --git a/examples/AccountSettingsUpdateExample.rb b/examples/AccountSettingsUpdateExample.rb new file mode 100644 index 000000000..74204fb7e --- /dev/null +++ b/examples/AccountSettingsUpdateExample.rb @@ -0,0 +1,25 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_settings_update_request = Dropbox::Sign::AccountSettingsUpdateRequest.new +account_settings_update_request.date_format = Dropbox::Sign::DateFormat::MM_DD_YYYY +account_settings_update_request.required_signature_types = [ + Dropbox::Sign::RequiredSignatureType::DRAW, + Dropbox::Sign::RequiredSignatureType::TYPE, +] +account_settings_update_request.should_enable_tamper_proof = false +account_settings_update_request.unset = ["company"] + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_update( + account_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_update: #{e}" +end diff --git a/examples/AccountSettingsUpdateExample.sh b/examples/AccountSettingsUpdateExample.sh new file mode 100644 index 000000000..f8a446562 --- /dev/null +++ b/examples/AccountSettingsUpdateExample.sh @@ -0,0 +1,9 @@ +curl -X POST 'https://api.hellosign.com/v3/account/settings' \ + -u 'YOUR_API_KEY:' \ + -H 'Content-Type: application/json' \ + -d '{ + "date_format": "MM/DD/YYYY", + "required_signature_types": ["draw", "type"], + "should_enable_tamper_proof": false, + "unset": ["company"] + }' diff --git a/examples/AccountSettingsUpdateExample.ts b/examples/AccountSettingsUpdateExample.ts new file mode 100644 index 000000000..2ebe2ad8c --- /dev/null +++ b/examples/AccountSettingsUpdateExample.ts @@ -0,0 +1,25 @@ +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountSettingsUpdateRequest: models.AccountSettingsUpdateRequest = { + dateFormat: models.DateFormat.MmDdYyyy, + requiredSignatureTypes: [ + models.RequiredSignatureType.Draw, + models.RequiredSignatureType.Type, + ], + shouldEnableTamperProof: false, + unset: ["company"], +}; + +apiCaller.accountSettingsUpdate( + accountSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsUpdate:"); + console.log(error.body); +}); diff --git a/examples/TeamSettingsGetExample.cs b/examples/TeamSettingsGetExample.cs new file mode 100644 index 000000000..87e5b7fb9 --- /dev/null +++ b/examples/TeamSettingsGetExample.cs @@ -0,0 +1,44 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamSettingsGet(); + var company = response.Settings.Company; + var dataResidency = response.Settings.DataResidency; + + Console.WriteLine(response); + Console.WriteLine(response.TeamId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(dataResidency.Value); + Console.WriteLine(dataResidency.Type); + Console.WriteLine(dataResidency.Lock.Mode); + Console.WriteLine(dataResidency.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamSettingsGetExample.java b/examples/TeamSettingsGetExample.java new file mode 100644 index 000000000..ca206d4d7 --- /dev/null +++ b/examples/TeamSettingsGetExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class TeamSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + SettingResponse dataResidency = response.getSettings().getDataResidency(); + + System.out.println(response); + System.out.println(response.getTeamId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(dataResidency.getValue()); + System.out.println(dataResidency.getType()); + System.out.println(dataResidency.getLock().getMode()); + System.out.println(dataResidency.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsGet"); + System.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/TeamSettingsGetExample.php b/examples/TeamSettingsGetExample.php new file mode 100644 index 000000000..3fb75bd9f --- /dev/null +++ b/examples/TeamSettingsGetExample.php @@ -0,0 +1,47 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsGet(); + $company = $response->getSettings()->getCompany(); + $data_residency = $response->getSettings()->getDataResidency(); + + print_r($response); + print_r([ + 'team_id' => $response->getTeamId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'data_residency' => [ + 'value' => $data_residency->getValue(), + 'is_inherited' => $data_residency->getIsInherited(), + 'source' => $data_residency->getSource(), + 'type' => $data_residency->getType(), + 'writable' => $data_residency->getWritable(), + 'lock' => [ + 'mode' => $data_residency->getLock()->getMode(), + 'source' => $data_residency->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsGet: {$e->getMessage()}"; +} diff --git a/examples/TeamSettingsGetExample.py b/examples/TeamSettingsGetExample.py new file mode 100644 index 000000000..f7bd31619 --- /dev/null +++ b/examples/TeamSettingsGetExample.py @@ -0,0 +1,44 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_settings_get() + company = response.settings.company + data_residency = response.settings.data_residency + + pprint(response) + pprint({ + "team_id": response.team_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "data_residency": { + "value": data_residency.value, + "is_inherited": data_residency.is_inherited, + "source": data_residency.source, + "type": data_residency.type, + "writable": data_residency.writable, + "lock": { + "mode": data_residency.lock.mode, + "source": data_residency.lock.source, + }, + }, + "warnings": response.warnings, + }) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_get: %s\n" % e) diff --git a/examples/TeamSettingsGetExample.rb b/examples/TeamSettingsGetExample.rb new file mode 100644 index 000000000..02105ac6d --- /dev/null +++ b/examples/TeamSettingsGetExample.rb @@ -0,0 +1,42 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_get + company = response.settings.company + data_residency = response.settings.data_residency + + p response + p({ + team_id: response.team_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + data_residency: { + value: data_residency.value, + is_inherited: data_residency.is_inherited, + source: data_residency.source, + type: data_residency.type, + writable: data_residency.writable, + lock: { + mode: data_residency.lock.mode, + source: data_residency.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_get: #{e}" +end diff --git a/examples/TeamSettingsGetExample.sh b/examples/TeamSettingsGetExample.sh new file mode 100644 index 000000000..5d7cd7d77 --- /dev/null +++ b/examples/TeamSettingsGetExample.sh @@ -0,0 +1,31 @@ +curl -X GET 'https://api.hellosign.com/v3/team/settings' \ + -u 'YOUR_API_KEY:' + +# { +# "team_id": "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", +# "settings": { +# "company": { +# "value": "Northwind", +# "is_inherited": false, +# "source": "team", +# "type": "string", +# "writable": true, +# "lock": { +# "mode": "organization_admins", +# "source": "team" +# } +# }, +# "data_residency": { +# "value": "eu", +# "is_inherited": false, +# "source": "team", +# "type": "string", +# "writable": true, +# "lock": { +# "mode": "team_admins", +# "source": "team" +# } +# } +# }, +# "warnings": [] +# } diff --git a/examples/TeamSettingsGetExample.ts b/examples/TeamSettingsGetExample.ts new file mode 100644 index 000000000..3e5a4ee4e --- /dev/null +++ b/examples/TeamSettingsGetExample.ts @@ -0,0 +1,40 @@ +import api from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSettingsGet().then(response => { + const company = response.body.settings.company; + const dataResidency = response.body.settings.dataResidency; + console.log(response.body); + console.log({ + teamId: response.body.teamId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + dataResidency: { + value: dataResidency.value, + isInherited: dataResidency.isInherited, + source: dataResidency.source, + type: dataResidency.type, + writable: dataResidency.writable, + lock: { + mode: dataResidency.lock.mode, + source: dataResidency.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsGet:"); + console.log(error.body); +}); diff --git a/examples/TeamSettingsUpdateExample.cs b/examples/TeamSettingsUpdateExample.cs new file mode 100644 index 000000000..778d3451a --- /dev/null +++ b/examples/TeamSettingsUpdateExample.cs @@ -0,0 +1,40 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest( + dataResidency: new DataResidencySettingUpdate(value: DataResidency.Eu), + company: new StringSettingUpdate( + value: "Northwind", + lockMode: TeamSettingLock.OrganizationAdmins + ) + ); + + try + { + var response = new TeamApi(config).TeamSettingsUpdate( + teamSettingsUpdateRequest: teamSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamSettingsUpdateExample.java b/examples/TeamSettingsUpdateExample.java new file mode 100644 index 000000000..8cb0dd71e --- /dev/null +++ b/examples/TeamSettingsUpdateExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.DataResidency; +import com.dropbox.sign.model.DataResidencySettingUpdate; +import com.dropbox.sign.model.StringSettingUpdate; +import com.dropbox.sign.model.TeamSettingLock; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; + +public class TeamSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest() + .dataResidency(new DataResidencySettingUpdate().value(DataResidency.EU)) + .company(new StringSettingUpdate() + .value("Northwind") + .lockMode(TeamSettingLock.ORGANIZATION_ADMINS)); + + try + { + var response = new TeamApi(config).teamSettingsUpdate( + teamSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsUpdate"); + System.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/TeamSettingsUpdateExample.php b/examples/TeamSettingsUpdateExample.php new file mode 100644 index 000000000..3666aa63f --- /dev/null +++ b/examples/TeamSettingsUpdateExample.php @@ -0,0 +1,28 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$team_settings_update_request = (new Dropbox\Sign\Model\TeamSettingsUpdateRequest()) + ->setDataResidency((new Dropbox\Sign\Model\DataResidencySettingUpdate()) + ->setValue(Dropbox\Sign\Model\DataResidency::EU)) + ->setCompany((new Dropbox\Sign\Model\StringSettingUpdate()) + ->setValue('Northwind') + ->setLockMode(Dropbox\Sign\Model\TeamSettingLock::ORGANIZATION_ADMINS)); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsUpdate( + team_settings_update_request: $team_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsUpdate: {$e->getMessage()}"; +} diff --git a/examples/TeamSettingsUpdateExample.py b/examples/TeamSettingsUpdateExample.py new file mode 100644 index 000000000..23ad4eb40 --- /dev/null +++ b/examples/TeamSettingsUpdateExample.py @@ -0,0 +1,28 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_settings_update_request = models.TeamSettingsUpdateRequest( + data_residency=models.DataResidencySettingUpdate( + value=models.DataResidency.EU, + ), + company=models.StringSettingUpdate( + value="Northwind", + lock_mode=models.TeamSettingLock.ORGANIZATION_ADMINS, + ), + ) + + try: + response = api.TeamApi(api_client).team_settings_update( + team_settings_update_request=team_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_update: %s\n" % e) diff --git a/examples/TeamSettingsUpdateExample.rb b/examples/TeamSettingsUpdateExample.rb new file mode 100644 index 000000000..996ec0e5a --- /dev/null +++ b/examples/TeamSettingsUpdateExample.rb @@ -0,0 +1,23 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_settings_update_request = Dropbox::Sign::TeamSettingsUpdateRequest.new +team_settings_update_request.data_residency = Dropbox::Sign::DataResidencySettingUpdate.new +team_settings_update_request.data_residency.value = Dropbox::Sign::DataResidency::EU +team_settings_update_request.company = Dropbox::Sign::StringSettingUpdate.new +team_settings_update_request.company.value = "Northwind" +team_settings_update_request.company.lock_mode = Dropbox::Sign::TeamSettingLock::ORGANIZATION_ADMINS + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_update( + team_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_update: #{e}" +end diff --git a/examples/TeamSettingsUpdateExample.sh b/examples/TeamSettingsUpdateExample.sh new file mode 100644 index 000000000..4024509d3 --- /dev/null +++ b/examples/TeamSettingsUpdateExample.sh @@ -0,0 +1,12 @@ +curl -X POST 'https://api.hellosign.com/v3/team/settings' \ + -u 'YOUR_API_KEY:' \ + -H 'Content-Type: application/json' \ + -d '{ + "data_residency": { + "value": "eu" + }, + "company": { + "value": "Northwind", + "lock_mode": "organization_admins" + } + }' diff --git a/examples/TeamSettingsUpdateExample.ts b/examples/TeamSettingsUpdateExample.ts new file mode 100644 index 000000000..c5c7d454f --- /dev/null +++ b/examples/TeamSettingsUpdateExample.ts @@ -0,0 +1,25 @@ +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamSettingsUpdateRequest: models.TeamSettingsUpdateRequest = { + dataResidency: { + value: models.DataResidency.Eu, + }, + company: { + value: "Northwind", + lockMode: models.TeamSettingLock.OrganizationAdmins, + }, +}; + +apiCaller.teamSettingsUpdate( + teamSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsUpdate:"); + console.log(error.body); +}); diff --git a/openapi-fern.yaml b/openapi-fern.yaml index 7f68a6004..12e74e861 100644 --- a/openapi-fern.yaml +++ b/openapi-fern.yaml @@ -840,6 +840,602 @@ paths: seo: title: Update Account | API Documentation | Dropbox Sign for Developers description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how update the properties and settings of your Account, click here.' + /account/settings: + get: + tags: + - Account + summary: Get account settings + description: account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + operationId: accountSettingsGet + parameters: + - name: account_id + in: query + description: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + 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/AccountSettingsResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - api_key: [] + - oauth2: + - account_access + x-codeSamples: + - lang: PHP + label: PHP + source: | + setUsername('YOUR_API_KEY'); + // $config->setAccessToken('YOUR_ACCESS_TOKEN'); + + try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsGet(); + $company = $response->getSettings()->getCompany(); + + print_r($response); + print_r([ + 'account_id' => $response->getAccountId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); + } catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsGet: {$e->getMessage()}"; + } + - lang: csharp + label: C# + source: | + using System; + + using Dropbox.Sign.Api; + using Dropbox.Sign.Client; + + namespace Dropbox.SignSandbox; + + public class AccountSettingsGetExample + { + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountSettingsGet(); + var company = response.Settings.Company; + + Console.WriteLine(response); + Console.WriteLine(response.AccountId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } + } + - lang: TypeScript + label: TypeScript + source: | + import api from "@dropbox/sign" + + const apiCaller = new api.AccountApi(); + apiCaller.username = "YOUR_API_KEY"; + // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + + apiCaller.accountSettingsGet().then(response => { + const company = response.body.settings.company; + console.log(response.body); + console.log({ + accountId: response.body.accountId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.body.warnings, + }); + }).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsGet:"); + console.log(error.body); + }); + - lang: Java + label: Java + source: | + package com.dropbox.sign_sandbox; + + import com.dropbox.sign.ApiException; + import com.dropbox.sign.Configuration; + import com.dropbox.sign.api.AccountApi; + import com.dropbox.sign.auth.HttpBasicAuth; + import com.dropbox.sign.model.SettingResponse; + + public class AccountSettingsGetExample + { + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + + System.out.println(response); + System.out.println(response.getAccountId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + label: Ruby + source: | + require "dropbox-sign" + + Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" + end + + begin + response = Dropbox::Sign::AccountApi.new.account_settings_get + company = response.settings.company + + p response + p({ + account_id: response.account_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.warnings, + }) + rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_get: #{e}" + end + - lang: Python + label: Python + source: | + from pprint import pprint + + from dropbox_sign import ApiClient, ApiException, Configuration, api + + configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", + ) + + with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_settings_get() + company = response.settings.company + + pprint(response) + pprint({ + "account_id": response.account_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "warnings": response.warnings, + }) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_get: %s\n" % e) + - lang: cURL + label: cURL + source: | + curl -X GET 'https://api.hellosign.com/v3/account/settings' \ + -u 'YOUR_API_KEY:' + + # { + # "account_id": "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + # "settings": { + # "company": { + # "value": "Northwind", + # "is_inherited": false, + # "source": "account", + # "type": "string", + # "writable": true, + # "lock": { + # "mode": "members", + # "source": "default" + # } + # } + # }, + # "warnings": [] + # } + x-meta: + seo: + title: Get Account Settings | API Documentation | Dropbox Sign for Developers + description: account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + post: + tags: + - Account + summary: Modify account settings + description: account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + operationId: accountSettingsUpdate + parameters: + - name: account_id + in: query + description: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountSettingsUpdateRequest' + 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/AccountSettingsResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - api_key: [] + - oauth2: + - account_access + x-codeSamples: + - lang: PHP + label: PHP + source: | + setUsername('YOUR_API_KEY'); + // $config->setAccessToken('YOUR_ACCESS_TOKEN'); + + $account_settings_update_request = (new Dropbox\Sign\Model\AccountSettingsUpdateRequest()) + ->setDateFormat(Dropbox\Sign\Model\DateFormat::MM_DD_YYYY) + ->setRequiredSignatureTypes([ + Dropbox\Sign\Model\RequiredSignatureType::DRAW, + Dropbox\Sign\Model\RequiredSignatureType::TYPE, + ]) + ->setShouldEnableTamperProof(false) + ->setUnset(['company']); + + try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsUpdate( + account_settings_update_request: $account_settings_update_request, + ); + + print_r($response); + } catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsUpdate: {$e->getMessage()}"; + } + - lang: csharp + label: C# + source: | + using System; + using System.Collections.Generic; + + using Dropbox.Sign.Api; + using Dropbox.Sign.Client; + using Dropbox.Sign.Model; + + namespace Dropbox.SignSandbox; + + public class AccountSettingsUpdateExample + { + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest( + dateFormat: DateFormat.MMDDYYYY, + requiredSignatureTypes: new List() + { + RequiredSignatureType.Draw, + RequiredSignatureType.Type, + }, + shouldEnableTamperProof: false, + unset: new List() { "company" } + ); + + try + { + var response = new AccountApi(config).AccountSettingsUpdate( + accountSettingsUpdateRequest: accountSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } + } + - lang: TypeScript + label: TypeScript + source: | + import api from "@dropbox/sign" + import models from "@dropbox/sign" + + const apiCaller = new api.AccountApi(); + apiCaller.username = "YOUR_API_KEY"; + // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + + const accountSettingsUpdateRequest: models.AccountSettingsUpdateRequest = { + dateFormat: models.DateFormat.MmDdYyyy, + requiredSignatureTypes: [ + models.RequiredSignatureType.Draw, + models.RequiredSignatureType.Type, + ], + shouldEnableTamperProof: false, + unset: ["company"], + }; + + apiCaller.accountSettingsUpdate( + accountSettingsUpdateRequest, + ).then(response => { + console.log(response.body); + }).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsUpdate:"); + console.log(error.body); + }); + - lang: Java + label: Java + source: | + package com.dropbox.sign_sandbox; + + import com.dropbox.sign.ApiException; + import com.dropbox.sign.Configuration; + import com.dropbox.sign.api.AccountApi; + import com.dropbox.sign.auth.HttpBasicAuth; + import com.dropbox.sign.model.AccountSettingsUpdateRequest; + import com.dropbox.sign.model.DateFormat; + import com.dropbox.sign.model.RequiredSignatureType; + import java.util.List; + + public class AccountSettingsUpdateExample + { + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest() + .dateFormat(DateFormat.MM_DD_YYYY) + .requiredSignatureTypes(List.of( + RequiredSignatureType.DRAW, + RequiredSignatureType.TYPE + )) + .shouldEnableTamperProof(false) + .unset(List.of("company")); + + try + { + var response = new AccountApi(config).accountSettingsUpdate( + accountSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + label: Ruby + source: | + require "dropbox-sign" + + Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" + end + + account_settings_update_request = Dropbox::Sign::AccountSettingsUpdateRequest.new + account_settings_update_request.date_format = Dropbox::Sign::DateFormat::MM_DD_YYYY + account_settings_update_request.required_signature_types = [ + Dropbox::Sign::RequiredSignatureType::DRAW, + Dropbox::Sign::RequiredSignatureType::TYPE, + ] + account_settings_update_request.should_enable_tamper_proof = false + account_settings_update_request.unset = ["company"] + + begin + response = Dropbox::Sign::AccountApi.new.account_settings_update( + account_settings_update_request, + ) + + p response + rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_update: #{e}" + end + - lang: Python + label: Python + source: | + from pprint import pprint + + from dropbox_sign import ApiClient, ApiException, Configuration, api, models + + configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", + ) + + with ApiClient(configuration) as api_client: + account_settings_update_request = models.AccountSettingsUpdateRequest( + date_format=models.DateFormat.MM_SLASH_DD_SLASH_YYYY, + required_signature_types=[ + models.RequiredSignatureType.DRAW, + models.RequiredSignatureType.TYPE, + ], + should_enable_tamper_proof=False, + unset=["company"], + ) + + try: + response = api.AccountApi(api_client).account_settings_update( + account_settings_update_request=account_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_update: %s\n" % e) + - lang: cURL + label: cURL + source: | + curl -X POST 'https://api.hellosign.com/v3/account/settings' \ + -u 'YOUR_API_KEY:' \ + -H 'Content-Type: application/json' \ + -d '{ + "date_format": "MM/DD/YYYY", + "required_signature_types": ["draw", "type"], + "should_enable_tamper_proof": false, + "unset": ["company"] + }' + x-meta: + seo: + title: Update Account Settings | API Documentation | Dropbox Sign for Developers + description: account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. /account/verify: post: tags: @@ -16056,7 +16652,487 @@ paths: import java.util.List; import java.util.Map; - public class TeamAddMemberExample + public class TeamAddMemberExample + { + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + label: Ruby + source: | + require "json" + require "dropbox-sign" + + Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" + end + + team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new + team_add_member_request.email_address = "george@example.com" + + begin + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response + rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_add_member: #{e}" + end + - lang: Python + label: Python + source: | + import json + from datetime import date, datetime + from pprint import pprint + + from dropbox_sign import ApiClient, ApiException, Configuration, api, models + + configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", + ) + + with ApiClient(configuration) as api_client: + team_add_member_request = models.TeamAddMemberRequest( + email_address="george@example.com", + ) + + try: + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_add_member: %s\n" % e) + - lang: cURL + label: cURL + source: | + curl -X PUT 'https://api.hellosign.com/v3/team/add_member' \ + -u 'YOUR_API_KEY:' \ + -F 'email_address=george@example.com' + x-meta: + seo: + title: Add User to Team | API Documentation | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: + tags: + - Team + summary: Create Team + description: Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + example: + $ref: '#/components/examples/TeamCreateRequest' + 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/TeamGetResponse' + examples: + example: + $ref: '#/components/examples/TeamCreateResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - api_key: [] + - oauth2: + - team_access + x-codeSamples: + - lang: PHP + label: PHP + source: | + setUsername("YOUR_API_KEY"); + // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + + $team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); + + try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); + } catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; + } + - lang: csharp + label: C# + source: | + using System; + using System.Collections.Generic; + using System.IO; + using System.Text.Json; + + using Dropbox.Sign.Api; + using Dropbox.Sign.Client; + using Dropbox.Sign.Model; + + namespace Dropbox.SignSandbox; + + public class TeamCreateExample + { + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamCreateRequest = new TeamCreateRequest( + name: "New Team Name" + ); + + try + { + var response = new TeamApi(config).TeamCreate( + teamCreateRequest: teamCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } + } + - lang: TypeScript + label: TypeScript + source: | + import * as fs from 'fs'; + import api from "@dropbox/sign" + import models from "@dropbox/sign" + + const apiCaller = new api.TeamApi(); + apiCaller.username = "YOUR_API_KEY"; + // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + + const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", + }; + + apiCaller.teamCreate( + teamCreateRequest, + ).then(response => { + console.log(response.body); + }).catch(error => { + console.log("Exception when calling TeamApi#teamCreate:"); + console.log(error.body); + }); + - lang: Java + label: Java + source: | + package com.dropbox.sign_sandbox; + + import com.dropbox.sign.ApiException; + import com.dropbox.sign.Configuration; + import com.dropbox.sign.api.*; + import com.dropbox.sign.auth.*; + import com.dropbox.sign.JSON; + import com.dropbox.sign.model.*; + + import java.io.File; + import java.math.BigDecimal; + import java.time.LocalDate; + import java.time.OffsetDateTime; + import java.util.ArrayList; + import java.util.List; + import java.util.Map; + + public class TeamCreateExample + { + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + label: Ruby + source: | + require "json" + require "dropbox-sign" + + Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" + end + + team_create_request = Dropbox::Sign::TeamCreateRequest.new + team_create_request.name = "New Team Name" + + begin + response = Dropbox::Sign::TeamApi.new.team_create( + team_create_request, + ) + + p response + rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_create: #{e}" + end + - lang: Python + label: Python + source: | + import json + from datetime import date, datetime + from pprint import pprint + + from dropbox_sign import ApiClient, ApiException, Configuration, api, models + + configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", + ) + + with ApiClient(configuration) as api_client: + team_create_request = models.TeamCreateRequest( + name="New Team Name", + ) + + try: + response = api.TeamApi(api_client).team_create( + team_create_request=team_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_create: %s\n" % e) + - lang: cURL + label: cURL + source: | + curl -X POST 'https://api.hellosign.com/v3/team/create' \ + -u 'YOUR_API_KEY:' \ + -F 'name=New Team Name' + x-meta: + seo: + title: Create Team | REST API Documentation | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: + tags: + - Team + summary: Delete Team + description: Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + operationId: teamDelete + 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' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - api_key: [] + - oauth2: + - team_access + x-codeSamples: + - lang: PHP + label: PHP + source: | + setUsername("YOUR_API_KEY"); + // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + + try { + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); + } catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; + } + - lang: csharp + label: C# + source: | + using System; + using System.Collections.Generic; + using System.IO; + using System.Text.Json; + + using Dropbox.Sign.Api; + using Dropbox.Sign.Client; + using Dropbox.Sign.Model; + + namespace Dropbox.SignSandbox; + + public class TeamDeleteExample + { + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new TeamApi(config).TeamDelete(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } + } + - lang: TypeScript + label: TypeScript + source: | + import * as fs from 'fs'; + import api from "@dropbox/sign" + import models from "@dropbox/sign" + + const apiCaller = new api.TeamApi(); + apiCaller.username = "YOUR_API_KEY"; + // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + + apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); + console.log(error.body); + }); + - lang: Java + label: Java + source: | + package com.dropbox.sign_sandbox; + + import com.dropbox.sign.ApiException; + import com.dropbox.sign.Configuration; + import com.dropbox.sign.api.*; + import com.dropbox.sign.auth.*; + import com.dropbox.sign.JSON; + import com.dropbox.sign.model.*; + + import java.io.File; + import java.math.BigDecimal; + import java.time.LocalDate; + import java.time.OffsetDateTime; + import java.util.ArrayList; + import java.util.List; + import java.util.Map; + + public class TeamDeleteExample { public static void main(String[] args) { @@ -16064,19 +17140,11 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); - var teamAddMemberRequest = new TeamAddMemberRequest(); - teamAddMemberRequest.emailAddress("george@example.com"); - try { - var response = new TeamApi(config).teamAddMember( - teamAddMemberRequest, - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId - ); - - System.out.println(response); + new TeamApi(config).teamDelete(); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamAddMember"); + System.err.println("Exception when calling TeamApi#teamDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -16095,20 +17163,10 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end - team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new - team_add_member_request.email_address = "george@example.com" - begin - response = Dropbox::Sign::TeamApi.new.team_add_member( - team_add_member_request, - { - team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", - }, - ) - - p response + Dropbox::Sign::TeamApi.new.team_delete rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_add_member: #{e}" + puts "Exception when calling TeamApi#team_delete: #{e}" end - lang: Python label: Python @@ -16125,45 +17183,26 @@ paths: ) with ApiClient(configuration) as api_client: - team_add_member_request = models.TeamAddMemberRequest( - email_address="george@example.com", - ) - try: - response = api.TeamApi(api_client).team_add_member( - team_add_member_request=team_add_member_request, - team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", - ) - - pprint(response) + api.TeamApi(api_client).team_delete() except ApiException as e: - print("Exception when calling TeamApi#team_add_member: %s\n" % e) + print("Exception when calling TeamApi#team_delete: %s\n" % e) - lang: cURL label: cURL source: | - curl -X PUT 'https://api.hellosign.com/v3/team/add_member' \ - -u 'YOUR_API_KEY:' \ - -F 'email_address=george@example.com' + curl -X DELETE 'https://api.hellosign.com/v3/team/destroy' \ + -u 'YOUR_API_KEY:' x-meta: seo: - title: Add User to Team | API Documentation | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: - post: + title: Delete Team | REST API Documentation | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: + get: tags: - Team - summary: Create Team - description: Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. - operationId: teamCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamCreateRequest' - examples: - example: - $ref: '#/components/examples/TeamCreateRequest' + summary: Get Team + description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' + operationId: teamGet responses: '200': description: successful operation @@ -16180,7 +17219,7 @@ paths: $ref: '#/components/schemas/TeamGetResponse' examples: example: - $ref: '#/components/examples/TeamCreateResponse' + $ref: '#/components/examples/TeamGetResponse' 4XX: description: failed_operation content: @@ -16198,6 +17237,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -16221,17 +17262,12 @@ paths: $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); - $team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) - ->setName("New Team Name"); - try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( - team_create_request: $team_create_request, - ); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; } - lang: csharp label: C# @@ -16247,7 +17283,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamCreateExample + public class TeamGetExample { public static void Run() { @@ -16255,21 +17291,15 @@ paths: config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; - var teamCreateRequest = new TeamCreateRequest( - name: "New Team Name" - ); - try { - var response = new TeamApi(config).TeamCreate( - teamCreateRequest: teamCreateRequest - ); + var response = new TeamApi(config).TeamGet(); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamCreate: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -16286,16 +17316,10 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - const teamCreateRequest: models.TeamCreateRequest = { - name: "New Team Name", - }; - - apiCaller.teamCreate( - teamCreateRequest, - ).then(response => { + apiCaller.teamGet().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamCreate:"); + console.log("Exception when calling TeamApi#teamGet:"); console.log(error.body); }); - lang: Java @@ -16318,7 +17342,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamCreateExample + public class TeamGetExample { public static void main(String[] args) { @@ -16326,18 +17350,13 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); - var teamCreateRequest = new TeamCreateRequest(); - teamCreateRequest.name("New Team Name"); - try { - var response = new TeamApi(config).teamCreate( - teamCreateRequest - ); + var response = new TeamApi(config).teamGet(); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamCreate"); + System.err.println("Exception when calling TeamApi#teamGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -16356,17 +17375,12 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end - team_create_request = Dropbox::Sign::TeamCreateRequest.new - team_create_request.name = "New Team Name" - begin - response = Dropbox::Sign::TeamApi.new.team_create( - team_create_request, - ) + response = Dropbox::Sign::TeamApi.new.team_get p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_create: #{e}" + puts "Exception when calling TeamApi#team_get: #{e}" end - lang: Python label: Python @@ -16383,35 +17397,36 @@ paths: ) with ApiClient(configuration) as api_client: - team_create_request = models.TeamCreateRequest( - name="New Team Name", - ) - try: - response = api.TeamApi(api_client).team_create( - team_create_request=team_create_request, - ) + response = api.TeamApi(api_client).team_get() pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_create: %s\n" % e) + print("Exception when calling TeamApi#team_get: %s\n" % e) - lang: cURL label: cURL source: | - curl -X POST 'https://api.hellosign.com/v3/team/create' \ - -u 'YOUR_API_KEY:' \ - -F 'name=New Team Name' + curl -X GET 'https://api.hellosign.com/v3/team' \ + -u 'YOUR_API_KEY:' x-meta: seo: - title: Create Team | REST API Documentation | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: Get Team | REST API Documentation | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: Delete Team - description: Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). - operationId: teamDelete + summary: Update Team + description: Updates the name of your Team. + operationId: teamUpdate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamUpdateRequest' + examples: + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: '200': description: successful operation @@ -16422,6 +17437,13 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamGetResponse' + examples: + example: + $ref: '#/components/examples/TeamUpdateResponse' 4XX: description: failed_operation content: @@ -16462,10 +17484,17 @@ paths: $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + $team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); + try { - (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; } - lang: csharp label: C# @@ -16481,7 +17510,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamDeleteExample + public class TeamUpdateExample { public static void Run() { @@ -16489,13 +17518,21 @@ paths: config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; + var teamUpdateRequest = new TeamUpdateRequest( + name: "New Team Name" + ); + try { - new TeamApi(config).TeamDelete(); + var response = new TeamApi(config).TeamUpdate( + teamUpdateRequest: teamUpdateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamDelete: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -16512,8 +17549,16 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - apiCaller.teamDelete().catch(error => { - console.log("Exception when calling TeamApi#teamDelete:"); + const teamUpdateRequest: models.TeamUpdateRequest = { + name: "New Team Name", + }; + + apiCaller.teamUpdate( + teamUpdateRequest, + ).then(response => { + console.log(response.body); + }).catch(error => { + console.log("Exception when calling TeamApi#teamUpdate:"); console.log(error.body); }); - lang: Java @@ -16536,7 +17581,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamDeleteExample + public class TeamUpdateExample { public static void main(String[] args) { @@ -16544,11 +17589,18 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + try { - new TeamApi(config).teamDelete(); + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamDelete"); + System.err.println("Exception when calling TeamApi#teamUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -16567,10 +17619,17 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end + team_update_request = Dropbox::Sign::TeamUpdateRequest.new + team_update_request.name = "New Team Name" + begin - Dropbox::Sign::TeamApi.new.team_delete + response = Dropbox::Sign::TeamApi.new.team_update( + team_update_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_delete: #{e}" + puts "Exception when calling TeamApi#team_update: #{e}" end - lang: Python label: Python @@ -16587,26 +17646,43 @@ paths: ) with ApiClient(configuration) as api_client: + team_update_request = models.TeamUpdateRequest( + name="New Team Name", + ) + try: - api.TeamApi(api_client).team_delete() + response = api.TeamApi(api_client).team_update( + team_update_request=team_update_request, + ) + + pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_delete: %s\n" % e) + print("Exception when calling TeamApi#team_update: %s\n" % e) - lang: cURL label: cURL source: | - curl -X DELETE 'https://api.hellosign.com/v3/team/destroy' \ - -u 'YOUR_API_KEY:' + curl -X PUT 'https://api.hellosign.com/v3/team' \ + -u 'YOUR_API_KEY:' \ + -F 'name=New Team Name' x-meta: seo: - title: Delete Team | REST API Documentation | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: + title: Update Team | API Documentation | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: Get Team - description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' - operationId: teamGet + summary: Get Team Info + description: Provides information about a team. + operationId: teamInfo + parameters: + - name: team_id + in: query + description: The id of the team. + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c responses: '200': description: successful operation @@ -16620,10 +17696,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: example: - $ref: '#/components/examples/TeamGetResponse' + $ref: '#/components/examples/TeamGetInfoResponse' 4XX: description: failed_operation content: @@ -16641,8 +17717,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' - 404_example: - $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -16667,11 +17743,13 @@ paths: // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; } - lang: csharp label: C# @@ -16687,7 +17765,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamGetExample + public class TeamInfoExample { public static void Run() { @@ -16697,13 +17775,15 @@ paths: try { - var response = new TeamApi(config).TeamGet(); + var response = new TeamApi(config).TeamInfo( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamGet: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamInfo: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -16720,10 +17800,12 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - apiCaller.teamGet().then(response => { + apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + ).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamGet:"); + console.log("Exception when calling TeamApi#teamInfo:"); console.log(error.body); }); - lang: Java @@ -16746,7 +17828,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamGetExample + public class TeamInfoExample { public static void main(String[] args) { @@ -16756,11 +17838,13 @@ paths: try { - var response = new TeamApi(config).teamGet(); + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamGet"); + System.err.println("Exception when calling TeamApi#teamInfo"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -16780,11 +17864,15 @@ paths: end begin - response = Dropbox::Sign::TeamApi.new.team_get + response = Dropbox::Sign::TeamApi.new.team_info( + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_get: #{e}" + puts "Exception when calling TeamApi#team_info: #{e}" end - lang: Python label: Python @@ -16802,35 +17890,36 @@ paths: with ApiClient(configuration) as api_client: try: - response = api.TeamApi(api_client).team_get() + response = api.TeamApi(api_client).team_info( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_get: %s\n" % e) + print("Exception when calling TeamApi#team_info: %s\n" % e) - lang: cURL label: cURL source: | - curl -X GET 'https://api.hellosign.com/v3/team' \ + curl -X GET 'https://api.hellosign.com/v3/team/info?team_id=4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c' \ -u 'YOUR_API_KEY:' x-meta: seo: - title: Get Team | REST API Documentation | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' - put: + title: Get Team Info | Dropbox Sign for Developers + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - Team - summary: Update Team - description: Updates the name of your Team. - operationId: teamUpdate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamUpdateRequest' - examples: - example: - $ref: '#/components/examples/TeamUpdateRequest' + summary: List Team Invites + description: Provides a list of team invites (and their roles). + operationId: teamInvites + parameters: + - name: email_address + in: query + description: The email address for which to display the team invites. + required: false + schema: + type: string responses: '200': description: successful operation @@ -16844,10 +17933,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: example: - $ref: '#/components/examples/TeamUpdateResponse' + $ref: '#/components/examples/TeamInvitesResponse' 4XX: description: failed_operation content: @@ -16870,7 +17959,8 @@ paths: security: - api_key: [] - oauth2: - - team_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP @@ -16888,17 +17978,12 @@ paths: $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); - $team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) - ->setName("New Team Name"); - try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( - team_update_request: $team_update_request, - ); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; } - lang: csharp label: C# @@ -16914,7 +17999,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamUpdateExample + public class TeamInvitesExample { public static void Run() { @@ -16922,21 +18007,15 @@ paths: config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; - var teamUpdateRequest = new TeamUpdateRequest( - name: "New Team Name" - ); - try { - var response = new TeamApi(config).TeamUpdate( - teamUpdateRequest: teamUpdateRequest - ); + var response = new TeamApi(config).TeamInvites(); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamUpdate: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamInvites: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -16953,16 +18032,10 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - const teamUpdateRequest: models.TeamUpdateRequest = { - name: "New Team Name", - }; - - apiCaller.teamUpdate( - teamUpdateRequest, - ).then(response => { + apiCaller.teamInvites().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamUpdate:"); + console.log("Exception when calling TeamApi#teamInvites:"); console.log(error.body); }); - lang: Java @@ -16985,7 +18058,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamUpdateExample + public class TeamInvitesExample { public static void main(String[] args) { @@ -16993,18 +18066,15 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); - var teamUpdateRequest = new TeamUpdateRequest(); - teamUpdateRequest.name("New Team Name"); - try { - var response = new TeamApi(config).teamUpdate( - teamUpdateRequest + var response = new TeamApi(config).teamInvites( + null // emailAddress ); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamUpdate"); + System.err.println("Exception when calling TeamApi#teamInvites"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -17023,17 +18093,12 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end - team_update_request = Dropbox::Sign::TeamUpdateRequest.new - team_update_request.name = "New Team Name" - begin - response = Dropbox::Sign::TeamApi.new.team_update( - team_update_request, - ) + response = Dropbox::Sign::TeamApi.new.team_invites p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_update: #{e}" + puts "Exception when calling TeamApi#team_invites: #{e}" end - lang: Python label: Python @@ -17050,43 +18115,50 @@ paths: ) with ApiClient(configuration) as api_client: - team_update_request = models.TeamUpdateRequest( - name="New Team Name", - ) - try: - response = api.TeamApi(api_client).team_update( - team_update_request=team_update_request, - ) + response = api.TeamApi(api_client).team_invites() pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_update: %s\n" % e) + print("Exception when calling TeamApi#team_invites: %s\n" % e) - lang: cURL label: cURL source: | - curl -X PUT 'https://api.hellosign.com/v3/team' \ - -u 'YOUR_API_KEY:' \ - -F 'name=New Team Name' + curl -X GET 'https://api.hellosign.com/v3/team/invites?email_address=user@dropboxsign.com' \ + -u 'YOUR_API_KEY:' x-meta: seo: - title: Update Team | API Documentation | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: + title: List Team Invites | Dropbox Sign for Developers + description: The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here. + /team/members/{team_id}: get: tags: - Team - summary: Get Team Info - description: Provides information about a team. - operationId: teamInfo + summary: List Team Members + description: Provides a paginated list of members (and their roles) that belong to a given team. + operationId: teamMembers parameters: - name: team_id - in: query - description: The id of the team. - required: false + in: path + description: The id of the team that a member list is being requested from. + required: true schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - name: page + in: query + description: Which page number of the team member list to return. Defaults to `1`. + schema: + type: integer + default: 1 + - name: page_size + in: query + description: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: '200': description: successful operation @@ -17100,10 +18172,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: example: - $ref: '#/components/examples/TeamGetInfoResponse' + $ref: '#/components/examples/TeamMembersResponse' 4XX: description: failed_operation content: @@ -17147,13 +18219,15 @@ paths: // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; } - lang: csharp label: C# @@ -17169,7 +18243,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamInfoExample + public class TeamMembersExample { public static void Run() { @@ -17179,15 +18253,17 @@ paths: try { - var response = new TeamApi(config).TeamInfo( - teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + var response = new TeamApi(config).TeamMembers( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 ); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamInfo: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamMembers: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -17204,12 +18280,14 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - apiCaller.teamInfo( + apiCaller.teamMembers( "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize ).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamInfo:"); + console.log("Exception when calling TeamApi#teamMembers:"); console.log(error.body); }); - lang: Java @@ -17232,7 +18310,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamInfoExample + public class TeamMembersExample { public static void main(String[] args) { @@ -17242,13 +18320,15 @@ paths: try { - var response = new TeamApi(config).teamInfo( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize ); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamInfo"); + System.err.println("Exception when calling TeamApi#teamMembers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -17268,15 +18348,17 @@ paths: end begin - response = Dropbox::Sign::TeamApi.new.team_info( + response = Dropbox::Sign::TeamApi.new.team_members( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id { - team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, }, ) p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_info: #{e}" + puts "Exception when calling TeamApi#team_members: #{e}" end - lang: Python label: Python @@ -17294,38 +18376,44 @@ paths: with ApiClient(configuration) as api_client: try: - response = api.TeamApi(api_client).team_info( + response = api.TeamApi(api_client).team_members( team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, ) pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_info: %s\n" % e) + print("Exception when calling TeamApi#team_members: %s\n" % e) - lang: cURL label: cURL source: | - curl -X GET 'https://api.hellosign.com/v3/team/info?team_id=4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c' \ + curl -X GET 'https://api.hellosign.com/v3/team/members/{team_id}?page=1&page_size=20' \ -u 'YOUR_API_KEY:' x-meta: seo: - title: Get Team Info | Dropbox Sign for Developers - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: List Team Members | Dropbox Sign for Developers + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: + post: tags: - Team - summary: List Team Invites - description: Provides a list of team invites (and their roles). - operationId: teamInvites - parameters: - - name: email_address - in: query - description: The email address for which to display the team invites. - required: false - schema: - type: string + summary: Remove User from Team + description: Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + operationId: teamRemoveMember + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamRemoveMemberRequest' + examples: + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: - '200': + '201': description: successful operation headers: X-RateLimit-Limit: @@ -17337,10 +18425,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamInvitesResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: example: - $ref: '#/components/examples/TeamInvitesResponse' + $ref: '#/components/examples/TeamRemoveMemberResponse' 4XX: description: failed_operation content: @@ -17358,13 +18446,14 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP @@ -17382,12 +18471,18 @@ paths: $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + $team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") + ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); + try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; } - lang: csharp label: C# @@ -17403,7 +18498,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamInvitesExample + public class TeamRemoveMemberExample { public static void Run() { @@ -17411,15 +18506,22 @@ paths: config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com" + ); + try { - var response = new TeamApi(config).TeamInvites(); + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamInvites: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -17436,10 +18538,17 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - apiCaller.teamInvites().then(response => { + const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com", + }; + + apiCaller.teamRemoveMember( + teamRemoveMemberRequest, + ).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamInvites:"); + console.log("Exception when calling TeamApi#teamRemoveMember:"); console.log(error.body); }); - lang: Java @@ -17462,7 +18571,7 @@ paths: import java.util.List; import java.util.Map; - public class TeamInvitesExample + public class TeamRemoveMemberExample { public static void main(String[] args) { @@ -17470,15 +18579,19 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + try { - var response = new TeamApi(config).teamInvites( - null // emailAddress + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest ); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamInvites"); + System.err.println("Exception when calling TeamApi#teamRemoveMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -17497,12 +18610,18 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end + team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new + team_remove_member_request.email_address = "teammate@dropboxsign.com" + team_remove_member_request.new_owner_email_address = "new_teammate@dropboxsign.com" + begin - response = Dropbox::Sign::TeamApi.new.team_invites + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_invites: #{e}" + puts "Exception when calling TeamApi#team_remove_member: #{e}" end - lang: Python label: Python @@ -17519,50 +18638,45 @@ paths: ) with ApiClient(configuration) as api_client: + team_remove_member_request = models.TeamRemoveMemberRequest( + email_address="teammate@dropboxsign.com", + new_owner_email_address="new_teammate@dropboxsign.com", + ) + try: - response = api.TeamApi(api_client).team_invites() + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_invites: %s\n" % e) + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) - lang: cURL label: cURL source: | - curl -X GET 'https://api.hellosign.com/v3/team/invites?email_address=user@dropboxsign.com' \ - -u 'YOUR_API_KEY:' + curl -X POST 'https://api.hellosign.com/v3/team/remove_member' \ + -u 'YOUR_API_KEY:' \ + -F 'email_address=teammate@dropboxsign.com' \ + -F 'new_owner_email_address=new_teammate@dropboxsign.com' x-meta: seo: - title: List Team Invites | Dropbox Sign for Developers - description: The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here. - /team/members/{team_id}: + title: Remove User from Team | REST API | Dropbox Sign for Developers + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + /team/settings: get: tags: - Team - summary: List Team Members - description: Provides a paginated list of members (and their roles) that belong to a given team. - operationId: teamMembers + summary: Get team settings + description: team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + operationId: teamSettingsGet parameters: - name: team_id - in: path - description: The id of the team that a member list is being requested from. - required: true + in: query + description: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - name: page - in: query - description: Which page number of the team member list to return. Defaults to `1`. - schema: - type: integer - default: 1 - - name: page_size - in: query - description: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: '200': description: successful operation @@ -17576,10 +18690,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' - examples: - example: - $ref: '#/components/examples/TeamMembersResponse' + $ref: '#/components/schemas/TeamSettingsResponse' 4XX: description: failed_operation content: @@ -17597,8 +18708,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' - 409_example: - $ref: '#/components/examples/Error409Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -17615,39 +18726,58 @@ paths: require_once __DIR__ . '/../vendor/autoload.php'; - use SplFileObject; use Dropbox; $config = Dropbox\Sign\Configuration::getDefaultConfiguration(); - $config->setUsername("YOUR_API_KEY"); - // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + $config->setUsername('YOUR_API_KEY'); + // $config->setAccessToken('YOUR_ACCESS_TOKEN'); try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( - team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", - page: 1, - page_size: 20, - ); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsGet(); + $company = $response->getSettings()->getCompany(); + $data_residency = $response->getSettings()->getDataResidency(); print_r($response); + print_r([ + 'team_id' => $response->getTeamId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'data_residency' => [ + 'value' => $data_residency->getValue(), + 'is_inherited' => $data_residency->getIsInherited(), + 'source' => $data_residency->getSource(), + 'type' => $data_residency->getType(), + 'writable' => $data_residency->getWritable(), + 'lock' => [ + 'mode' => $data_residency->getLock()->getMode(), + 'source' => $data_residency->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamSettingsGet: {$e->getMessage()}"; } - lang: csharp label: C# source: | using System; - using System.Collections.Generic; - using System.IO; - using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; - using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; - public class TeamMembersExample + public class TeamSettingsGetExample { public static void Run() { @@ -17657,17 +18787,28 @@ paths: try { - var response = new TeamApi(config).TeamMembers( - teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", - page: 1, - pageSize: 20 - ); + var response = new TeamApi(config).TeamSettingsGet(); + var company = response.Settings.Company; + var dataResidency = response.Settings.DataResidency; Console.WriteLine(response); + Console.WriteLine(response.TeamId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(dataResidency.Value); + Console.WriteLine(dataResidency.Type); + Console.WriteLine(dataResidency.Lock.Mode); + Console.WriteLine(dataResidency.Lock.Source); + Console.WriteLine(response.Warnings); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamMembers: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamSettingsGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -17676,22 +18817,44 @@ paths: - lang: TypeScript label: TypeScript source: | - import * as fs from 'fs'; import api from "@dropbox/sign" - import models from "@dropbox/sign" const apiCaller = new api.TeamApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - apiCaller.teamMembers( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId - 1, // page - 20, // pageSize - ).then(response => { + apiCaller.teamSettingsGet().then(response => { + const company = response.body.settings.company; + const dataResidency = response.body.settings.dataResidency; console.log(response.body); + console.log({ + teamId: response.body.teamId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + dataResidency: { + value: dataResidency.value, + isInherited: dataResidency.isInherited, + source: dataResidency.source, + type: dataResidency.type, + writable: dataResidency.writable, + lock: { + mode: dataResidency.lock.mode, + source: dataResidency.lock.source, + }, + }, + warnings: response.body.warnings, + }); }).catch(error => { - console.log("Exception when calling TeamApi#teamMembers:"); + console.log("Exception when calling TeamApi#teamSettingsGet:"); console.log(error.body); }); - lang: Java @@ -17701,20 +18864,11 @@ paths: import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; - import com.dropbox.sign.api.*; - import com.dropbox.sign.auth.*; - import com.dropbox.sign.JSON; - import com.dropbox.sign.model.*; - - import java.io.File; - import java.math.BigDecimal; - import java.time.LocalDate; - import java.time.OffsetDateTime; - import java.util.ArrayList; - import java.util.List; - import java.util.Map; + import com.dropbox.sign.api.TeamApi; + import com.dropbox.sign.auth.HttpBasicAuth; + import com.dropbox.sign.model.SettingResponse; - public class TeamMembersExample + public class TeamSettingsGetExample { public static void main(String[] args) { @@ -17724,15 +18878,26 @@ paths: try { - var response = new TeamApi(config).teamMembers( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId - 1, // page - 20 // pageSize - ); + var response = new TeamApi(config).teamSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + SettingResponse dataResidency = response.getSettings().getDataResidency(); System.out.println(response); + System.out.println(response.getTeamId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(dataResidency.getValue()); + System.out.println(dataResidency.getType()); + System.out.println(dataResidency.getLock().getMode()); + System.out.println(dataResidency.getLock().getSource()); + System.out.println(response.getWarnings()); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); + System.err.println("Exception when calling TeamApi#teamSettingsGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -17743,7 +18908,6 @@ paths: - lang: Ruby label: Ruby source: | - require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| @@ -17752,26 +18916,46 @@ paths: end begin - response = Dropbox::Sign::TeamApi.new.team_members( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id - { - page: 1, - page_size: 20, - }, - ) + response = Dropbox::Sign::TeamApi.new.team_settings_get + company = response.settings.company + data_residency = response.settings.data_residency p response + p({ + team_id: response.team_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + data_residency: { + value: data_residency.value, + is_inherited: data_residency.is_inherited, + source: data_residency.source, + type: data_residency.type, + writable: data_residency.writable, + lock: { + mode: data_residency.lock.mode, + source: data_residency.lock.source, + }, + }, + warnings: response.warnings, + }) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_members: #{e}" + puts "Exception when calling TeamApi#team_settings_get: #{e}" end - lang: Python label: Python source: | - import json - from datetime import date, datetime from pprint import pprint - from dropbox_sign import ApiClient, ApiException, Configuration, api, models + from dropbox_sign import ApiClient, ApiException, Configuration, api configuration = Configuration( username="YOUR_API_KEY", @@ -17780,44 +18964,99 @@ paths: with ApiClient(configuration) as api_client: try: - response = api.TeamApi(api_client).team_members( - team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", - page=1, - page_size=20, - ) + response = api.TeamApi(api_client).team_settings_get() + company = response.settings.company + data_residency = response.settings.data_residency pprint(response) + pprint({ + "team_id": response.team_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "data_residency": { + "value": data_residency.value, + "is_inherited": data_residency.is_inherited, + "source": data_residency.source, + "type": data_residency.type, + "writable": data_residency.writable, + "lock": { + "mode": data_residency.lock.mode, + "source": data_residency.lock.source, + }, + }, + "warnings": response.warnings, + }) except ApiException as e: - print("Exception when calling TeamApi#team_members: %s\n" % e) + print("Exception when calling TeamApi#team_settings_get: %s\n" % e) - lang: cURL label: cURL source: | - curl -X GET 'https://api.hellosign.com/v3/team/members/{team_id}?page=1&page_size=20' \ + curl -X GET 'https://api.hellosign.com/v3/team/settings' \ -u 'YOUR_API_KEY:' + + # { + # "team_id": "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + # "settings": { + # "company": { + # "value": "Northwind", + # "is_inherited": false, + # "source": "team", + # "type": "string", + # "writable": true, + # "lock": { + # "mode": "organization_admins", + # "source": "team" + # } + # }, + # "data_residency": { + # "value": "eu", + # "is_inherited": false, + # "source": "team", + # "type": "string", + # "writable": true, + # "lock": { + # "mode": "team_admins", + # "source": "team" + # } + # } + # }, + # "warnings": [] + # } x-meta: seo: - title: List Team Members | Dropbox Sign for Developers - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: + title: Get Team Settings | API Documentation | Dropbox Sign for Developers + description: team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. post: tags: - Team - summary: Remove User from Team - description: Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. - operationId: teamRemoveMember + summary: Modify team settings + description: team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + operationId: teamSettingsUpdate + parameters: + - name: team_id + in: query + description: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' - examples: - example: - $ref: '#/components/examples/TeamRemoveMemberRequest' - account_id_example: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' + $ref: '#/components/schemas/TeamSettingsUpdateRequest' responses: - '201': + '200': description: successful operation headers: X-RateLimit-Limit: @@ -17829,10 +19068,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - example: - $ref: '#/components/examples/TeamRemoveMemberResponse' + $ref: '#/components/schemas/TeamSettingsResponse' 4XX: description: failed_operation content: @@ -17852,6 +19088,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -17868,33 +19106,32 @@ paths: require_once __DIR__ . '/../vendor/autoload.php'; - use SplFileObject; use Dropbox; $config = Dropbox\Sign\Configuration::getDefaultConfiguration(); - $config->setUsername("YOUR_API_KEY"); - // $config->setAccessToken("YOUR_ACCESS_TOKEN"); + $config->setUsername('YOUR_API_KEY'); + // $config->setAccessToken('YOUR_ACCESS_TOKEN'); - $team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) - ->setEmailAddress("teammate@dropboxsign.com") - ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); + $team_settings_update_request = (new Dropbox\Sign\Model\TeamSettingsUpdateRequest()) + ->setDataResidency((new Dropbox\Sign\Model\DataResidencySettingUpdate()) + ->setValue(Dropbox\Sign\Model\DataResidency::EU)) + ->setCompany((new Dropbox\Sign\Model\StringSettingUpdate()) + ->setValue('Northwind') + ->setLockMode(Dropbox\Sign\Model\TeamSettingLock::ORGANIZATION_ADMINS)); try { - $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( - team_remove_member_request: $team_remove_member_request, + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsUpdate( + team_settings_update_request: $team_settings_update_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { - echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; + echo "Exception when calling TeamApi#teamSettingsUpdate: {$e->getMessage()}"; } - lang: csharp label: C# source: | using System; - using System.Collections.Generic; - using System.IO; - using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; @@ -17902,7 +19139,7 @@ paths: namespace Dropbox.SignSandbox; - public class TeamRemoveMemberExample + public class TeamSettingsUpdateExample { public static void Run() { @@ -17910,22 +19147,25 @@ paths: config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; - var teamRemoveMemberRequest = new TeamRemoveMemberRequest( - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com" + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest( + dataResidency: new DataResidencySettingUpdate(value: DataResidency.Eu), + company: new StringSettingUpdate( + value: "Northwind", + lockMode: TeamSettingLock.OrganizationAdmins + ) ); try { - var response = new TeamApi(config).TeamRemoveMember( - teamRemoveMemberRequest: teamRemoveMemberRequest + var response = new TeamApi(config).TeamSettingsUpdate( + teamSettingsUpdateRequest: teamSettingsUpdateRequest ); Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamSettingsUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -17934,7 +19174,6 @@ paths: - lang: TypeScript label: TypeScript source: | - import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" @@ -17942,17 +19181,22 @@ paths: apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; - const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", + const teamSettingsUpdateRequest: models.TeamSettingsUpdateRequest = { + dataResidency: { + value: models.DataResidency.Eu, + }, + company: { + value: "Northwind", + lockMode: models.TeamSettingLock.OrganizationAdmins, + }, }; - apiCaller.teamRemoveMember( - teamRemoveMemberRequest, + apiCaller.teamSettingsUpdate( + teamSettingsUpdateRequest, ).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log("Exception when calling TeamApi#teamSettingsUpdate:"); console.log(error.body); }); - lang: Java @@ -17962,20 +19206,15 @@ paths: import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; - import com.dropbox.sign.api.*; - import com.dropbox.sign.auth.*; - import com.dropbox.sign.JSON; - import com.dropbox.sign.model.*; - - import java.io.File; - import java.math.BigDecimal; - import java.time.LocalDate; - import java.time.OffsetDateTime; - import java.util.ArrayList; - import java.util.List; - import java.util.Map; - - public class TeamRemoveMemberExample + import com.dropbox.sign.api.TeamApi; + import com.dropbox.sign.auth.HttpBasicAuth; + import com.dropbox.sign.model.DataResidency; + import com.dropbox.sign.model.DataResidencySettingUpdate; + import com.dropbox.sign.model.StringSettingUpdate; + import com.dropbox.sign.model.TeamSettingLock; + import com.dropbox.sign.model.TeamSettingsUpdateRequest; + + public class TeamSettingsUpdateExample { public static void main(String[] args) { @@ -17983,19 +19222,21 @@ paths: ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); - var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); - teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); - teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest() + .dataResidency(new DataResidencySettingUpdate().value(DataResidency.EU)) + .company(new StringSettingUpdate() + .value("Northwind") + .lockMode(TeamSettingLock.ORGANIZATION_ADMINS)); try { - var response = new TeamApi(config).teamRemoveMember( - teamRemoveMemberRequest + var response = new TeamApi(config).teamSettingsUpdate( + teamSettingsUpdateRequest ); System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamRemoveMember"); + System.err.println("Exception when calling TeamApi#teamSettingsUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -18006,7 +19247,6 @@ paths: - lang: Ruby label: Ruby source: | - require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| @@ -18014,24 +19254,25 @@ paths: # config.access_token = "YOUR_ACCESS_TOKEN" end - team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new - team_remove_member_request.email_address = "teammate@dropboxsign.com" - team_remove_member_request.new_owner_email_address = "new_teammate@dropboxsign.com" + team_settings_update_request = Dropbox::Sign::TeamSettingsUpdateRequest.new + team_settings_update_request.data_residency = Dropbox::Sign::DataResidencySettingUpdate.new + team_settings_update_request.data_residency.value = Dropbox::Sign::DataResidency::EU + team_settings_update_request.company = Dropbox::Sign::StringSettingUpdate.new + team_settings_update_request.company.value = "Northwind" + team_settings_update_request.company.lock_mode = Dropbox::Sign::TeamSettingLock::ORGANIZATION_ADMINS begin - response = Dropbox::Sign::TeamApi.new.team_remove_member( - team_remove_member_request, + response = Dropbox::Sign::TeamApi.new.team_settings_update( + team_settings_update_request, ) p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling TeamApi#team_remove_member: #{e}" + puts "Exception when calling TeamApi#team_settings_update: #{e}" end - lang: Python label: Python source: | - import json - from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models @@ -18042,30 +19283,43 @@ paths: ) with ApiClient(configuration) as api_client: - team_remove_member_request = models.TeamRemoveMemberRequest( - email_address="teammate@dropboxsign.com", - new_owner_email_address="new_teammate@dropboxsign.com", + team_settings_update_request = models.TeamSettingsUpdateRequest( + data_residency=models.DataResidencySettingUpdate( + value=models.DataResidency.EU, + ), + company=models.StringSettingUpdate( + value="Northwind", + lock_mode=models.TeamSettingLock.ORGANIZATION_ADMINS, + ), ) try: - response = api.TeamApi(api_client).team_remove_member( - team_remove_member_request=team_remove_member_request, + response = api.TeamApi(api_client).team_settings_update( + team_settings_update_request=team_settings_update_request, ) pprint(response) except ApiException as e: - print("Exception when calling TeamApi#team_remove_member: %s\n" % e) + print("Exception when calling TeamApi#team_settings_update: %s\n" % e) - lang: cURL label: cURL source: | - curl -X POST 'https://api.hellosign.com/v3/team/remove_member' \ + curl -X POST 'https://api.hellosign.com/v3/team/settings' \ -u 'YOUR_API_KEY:' \ - -F 'email_address=teammate@dropboxsign.com' \ - -F 'new_owner_email_address=new_teammate@dropboxsign.com' + -H 'Content-Type: application/json' \ + -d '{ + "data_residency": { + "value": "eu" + }, + "company": { + "value": "Northwind", + "lock_mode": "organization_admins" + } + }' x-meta: seo: - title: Remove User from Team | REST API | Dropbox Sign for Developers - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + title: Update Team Settings | API Documentation | Dropbox Sign for Developers + description: team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. /team/sub_teams/{team_id}: get: tags: @@ -23423,6 +24677,124 @@ components: description: The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. type: string type: object + AccountSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: Company name associated with this account or team. + type: string + custom_signing_redirect_enabled: + description: Whether signers are redirected to a custom URL after completing a signature request. + type: boolean + custom_signing_redirect_url: + description: URL where signers are redirected after completing a signature request when custom redirects are enabled. + type: string + custom_tagline: + description: Custom tagline displayed with the account or team branding. + type: string + date_format: + $ref: '#/components/schemas/DateFormat' + is_signature_reminders_enabled: + description: Whether automatic reminder emails are enabled for incomplete signature requests. + type: boolean + request_email_from: + description: Sender name shown on signature request emails. + type: string + request_email_signature: + description: Signature appended to signature request emails. + type: string + required_signature_types: + description: Signature creation methods signers may use. + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + should_enable_tamper_proof: + description: Whether completed documents include a digital tamper-proof seal. + type: boolean + should_include_distinct_pdfs: + description: Whether completed documents remain as separate PDF files instead of being merged into one PDF. + type: boolean + should_offer_signer_access_code: + description: Whether senders can require an access code to verify a signer. + type: boolean + should_offer_signer_sms_authentication: + description: Whether senders can require SMS authentication to verify a signer. + type: boolean + should_remove_document_id: + description: Whether the Dropbox Sign document ID is hidden on sent documents. + type: boolean + is_notify_on_sign_enabled: + description: Whether to notify the account when someone signs a document it sent. + type: boolean + is_notify_on_view_enabled: + description: Whether to notify the account when someone opens a document it sent. + type: boolean + should_autocomplete: + description: Whether values entered in text fields are saved and suggested for future signature requests. + type: boolean + should_include_requested_pdfs: + description: Whether completed signature requests include PDF copies in emails sent to the account. + type: boolean + should_include_requested_pdfs_for_others: + description: Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + type: boolean + should_include_sent_doc_pdfs: + description: Whether emails sent to the account include PDF copies of documents it sends. + type: boolean + should_include_sent_doc_pdfs_for_others: + description: Whether emails sent to recipients include PDF copies of documents the account sends. + type: boolean + should_send_daily_summary: + description: Whether to send the account a daily email summarizing outstanding signature requests. + type: boolean + should_send_embedded_signature_conf_emails: + description: Whether to notify the account when it signs a document on a third-party site. + type: boolean + should_send_ordered_sr_email: + description: Whether to notify all parties when an ordered signature request starts. + type: boolean + should_send_outbound_conf_emails: + description: Whether to notify the account when it signs and sends a document. + type: boolean + template_link_signature_emails_enabled: + description: Whether to notify the account when someone signs a document sent by its team through a template link. + type: boolean + unset: + description: Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + uniqueItems: true + type: object + additionalProperties: false AccountUpdateRequest: properties: account_id: @@ -23909,12 +25281,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: The URL you want signers redirected to after they successfully sign. @@ -24002,12 +25371,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: _t__SignatureRequestBulkSendWithTemplate::METADATA + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: The URL you want signers redirected to after they successfully sign. @@ -25070,6 +26436,16 @@ components: **NOTE:** Only one signer can be assigned per attachment. type: integer type: object + BooleanSettingUpdate: + description: 'Updates a boolean team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: Boolean value to store. + type: boolean + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubBulkSignerList: properties: custom_fields: @@ -25085,6 +26461,11 @@ components: type: array items: $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + metadata: + description: _t__Sub::BulkSigner::METADATA + maxProperties: 10 + type: object + additionalProperties: {} type: object SubBulkSignerListCustomField: required: @@ -25138,6 +26519,41 @@ components: description: The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. type: string type: object + DataResidency: + description: Storage region for team documents. + type: string + enum: + - us + - eu + - au + - jp + - uk + - ca + DataResidencySettingUpdate: + description: 'Updates the data residency team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DataResidency' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + DateFormat: + description: Date format used to display dates. + type: string + enum: + - MM/DD/YYYY + - DD/MM/YYYY + - YYYY/MM/DD + DateFormatSettingUpdate: + description: 'Updates a date format team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DateFormat' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubEditorOptions: description: This allows the requester to specify editor options when a preparing a document properties: @@ -25838,6 +27254,27 @@ components: type: boolean default: false type: object + RequiredSignatureType: + description: A signature creation method a signer may use. + type: string + enum: + - draw + - phone + - type + - upload + RequiredSignatureTypesSettingUpdate: + description: 'Updates the required signature types team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: Signature creation methods signers may use. + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubSignatureRequestSigner: required: - name @@ -26003,6 +27440,23 @@ components: type: boolean default: false type: object + StringSettingUpdate: + description: 'Updates a string team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: String value to store. + type: string + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + TeamSettingLock: + description: 'Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value.' + type: string + enum: + - organization_admins + - team_admins + - members SubWhiteLabelingOptions: description: |- 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) @@ -26091,6 +27545,10 @@ components: description: The name of your Team. type: string default: Untitled Team + parent_team_id: + description: _t__TeamCreate::PARENT_TEAM_ID + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c type: object TeamRemoveMemberRequest: properties: @@ -26129,6 +27587,168 @@ components: - Team Manager - Admin type: object + TeamSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: Company name associated with this account or team. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_signing_redirect_enabled: + description: Whether signers are redirected to a custom URL after completing a signature request. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + custom_signing_redirect_url: + description: URL where signers are redirected after completing a signature request when custom redirects are enabled. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_tagline: + description: Custom tagline displayed with the account or team branding. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + date_format: + description: Date format used to display dates. List the setting in `unset` to inherit the default. + allOf: + - + $ref: '#/components/schemas/DateFormatSettingUpdate' + is_signature_reminders_enabled: + description: Whether automatic reminder emails are enabled for incomplete signature requests. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + request_email_from: + description: Sender name shown on signature request emails. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + request_email_signature: + description: Signature appended to signature request emails. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + required_signature_types: + description: Signature creation methods signers may use. + allOf: + - + $ref: '#/components/schemas/RequiredSignatureTypesSettingUpdate' + should_enable_tamper_proof: + description: Whether completed documents include a digital tamper-proof seal. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_include_distinct_pdfs: + description: Whether completed documents remain as separate PDF files instead of being merged into one PDF. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_access_code: + description: Whether senders can require an access code to verify a signer. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_sms_authentication: + description: Whether senders can require SMS authentication to verify a signer. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_remove_document_id: + description: Whether the Dropbox Sign document ID is hidden on sent documents. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + data_residency: + description: Storage region for team documents. + allOf: + - + $ref: '#/components/schemas/DataResidencySettingUpdate' + allow_team_delete_document_for_everyone: + description: Whether team members can delete a document for all participants. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + allow_team_download_csv: + description: Whether team members can download CSV files. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_creation: + description: Whether team members are prevented from creating templates. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_gallery: + description: Whether team members are prevented from using the template gallery. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + self_sign_message: + description: Default message enforced for team members when they create self-signed documents. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + self_sign_title: + description: Default title enforced for team members when they create self-signed documents. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_message: + description: Default message enforced for team members when they create signature requests. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_title: + description: Default title enforced for team members when they create signature requests. + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + multifactor_auth_app: + description: Whether authenticator-app multifactor authentication is enabled for the team. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + multifactor_auth_sms: + description: Whether SMS multifactor authentication is enabled for the team. + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + unset: + description: Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + uniqueItems: true + type: object + additionalProperties: false TeamUpdateRequest: properties: name: @@ -27017,6 +28637,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + AccountSettingsResponse: + required: + - account_id + - settings + properties: + account_id: + type: string + settings: + $ref: '#/components/schemas/AccountSettingsResponseSettings' + warnings: + description: A list of warnings. + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true AccountVerifyResponse: properties: account: @@ -27388,6 +29024,194 @@ components: type: boolean type: object x-internal-class: true + AccountSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + properties: + company: + description: Company name associated with this account or team. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: Whether signers are redirected to a custom URL after completing a signature request. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: URL where signers are redirected after completing a signature request when custom redirects are enabled. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: Custom tagline displayed with the account or team branding. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: Date format used to display dates. List the setting in `unset` to inherit the default. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: Whether automatic reminder emails are enabled for incomplete signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: Sender name shown on signature request emails. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: Signature appended to signature request emails. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: Signature creation methods signers may use. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: Whether completed documents include a digital tamper-proof seal. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: Whether completed documents remain as separate PDF files instead of being merged into one PDF. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: Whether senders can require an access code to verify a signer. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: Whether senders can require SMS authentication to verify a signer. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: Whether the Dropbox Sign document ID is hidden on sent documents. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_sign_enabled: + description: Whether to notify the account when someone signs a document it sent. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_view_enabled: + description: Whether to notify the account when someone opens a document it sent. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_autocomplete: + description: Whether values entered in text fields are saved and suggested for future signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs: + description: Whether completed signature requests include PDF copies in emails sent to the account. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs_for_others: + description: Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs: + description: Whether emails sent to the account include PDF copies of documents it sends. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs_for_others: + description: Whether emails sent to recipients include PDF copies of documents the account sends. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_daily_summary: + description: Whether to send the account a daily email summarizing outstanding signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_embedded_signature_conf_emails: + description: Whether to notify the account when it signs a document on a third-party site. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_ordered_sr_email: + description: Whether to notify all parties when an ordered signature request starts. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_outbound_conf_emails: + description: Whether to notify the account when it signs and sends a document. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + template_link_signature_emails_enabled: + description: Whether to notify the account when someone signs a document sent by its team through a template link. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true AccountResponseUsage: description: Details concerning monthly usage properties: @@ -27805,6 +29629,55 @@ components: - fax_usage type: object x-internal-class: true + SettingResponse: + required: + - value + - is_inherited + - source + - type + - writable + - lock + properties: + value: + description: Current value of the setting. Null when the setting has no value. + nullable: true + is_inherited: + type: boolean + source: + type: string + enum: + - account + - team + - parent_team + - default + type: + type: string + enum: + - boolean + - integer + - string + - array + writable: + type: boolean + lock: + $ref: '#/components/schemas/SettingLockResponse' + type: object + x-internal-class: true + SettingLockResponse: + required: + - mode + - source + properties: + mode: + $ref: '#/components/schemas/TeamSettingLock' + source: + type: string + enum: + - team + - parent_team + - default + type: object + x-internal-class: true SignatureRequestResponse: description: Contains information about a signature request. properties: @@ -28272,6 +30145,12 @@ components: TeamResponse: description: Contains information about your team and its members properties: + team_id: + description: The id of a team + type: string + parent_team_id: + description: _t__Team::PARENT_TEAM_ID + type: string name: description: The name of your Team type: string @@ -28356,6 +30235,187 @@ components: type: object nullable: true x-internal-class: true + TeamSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + properties: + company: + description: Company name associated with this account or team. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: Whether signers are redirected to a custom URL after completing a signature request. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: URL where signers are redirected after completing a signature request when custom redirects are enabled. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: Custom tagline displayed with the account or team branding. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: Date format used to display dates. List the setting in `unset` to inherit the default. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: Whether automatic reminder emails are enabled for incomplete signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: Sender name shown on signature request emails. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: Signature appended to signature request emails. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: Signature creation methods signers may use. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: Whether completed documents include a digital tamper-proof seal. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: Whether completed documents remain as separate PDF files instead of being merged into one PDF. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: Whether senders can require an access code to verify a signer. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: Whether senders can require SMS authentication to verify a signer. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: Whether the Dropbox Sign document ID is hidden on sent documents. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + data_residency: + description: Storage region for team documents. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_delete_document_for_everyone: + description: Whether team members can delete a document for all participants. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_download_csv: + description: Whether team members can download CSV files. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_creation: + description: Whether team members are prevented from creating templates. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_gallery: + description: Whether team members are prevented from using the template gallery. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_message: + description: Default message enforced for team members when they create self-signed documents. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_title: + description: Default title enforced for team members when they create self-signed documents. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_message: + description: Default message enforced for team members when they create signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_title: + description: Default title enforced for team members when they create signature requests. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_app: + description: Whether authenticator-app multifactor authentication is enabled for the team. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_sms: + description: Whether SMS multifactor authentication is enabled for the team. + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true SubTeamResponse: properties: team_id: @@ -29340,6 +31400,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + TeamSettingsResponse: + required: + - team_id + - settings + properties: + team_id: + type: string + settings: + $ref: '#/components/schemas/TeamSettingsResponseSettings' + warnings: + description: A list of warnings. + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true TeamSubTeamsResponse: required: - sub_teams @@ -30201,6 +32277,16 @@ components: default: Hello API Event Received x-fern-audiences: - events + parameters: + IdempotencyKey: + name: Idempotency-Key + in: header + description: _t__Common::Idempotency::KEY + required: false + schema: + type: string + maxLength: 255 + minLength: 1 examples: AccountCreateRequest: summary: Default Example @@ -35116,6 +37202,11 @@ components: type: integer format: int64 example: 1430170900 + Idempotent-Replayed: + description: _t__Common::Idempotency::REPLAYED + required: false + schema: + type: boolean securitySchemes: api_key: type: http diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 7295d2c6e..9ee53b361 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -13,6 +13,118 @@ servers: - url: 'https://api.hellosign.com/v3' paths: + '/account/api_key/{account_id}': + post: + tags: + - Account + summary: '_t__AccountApiKeyCreate::SUMMARY' + description: '_t__AccountApiKeyCreate::DESCRIPTION' + operationId: accountApiKeyCreate + parameters: + - + name: account_id + in: path + description: '_t__AccountApiKeyCreate::ACCOUNT_ID' + required: true + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountApiKeyCreateRequest' + examples: + example: + $ref: '#/components/examples/AccountApiKeyCreateRequest' + responses: + '201': + 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/AccountApiKeyCreateResponse' + examples: + example: + $ref: '#/components/examples/AccountApiKeyCreateResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountApiKeyCreateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountApiKeyCreateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountApiKeyCreateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountApiKeyCreateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountApiKeyCreateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountApiKeyCreateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountApiKeyCreateExample.sh + x-meta: + seo: + title: '_t__AccountApiKeyCreate::SEO::TITLE' + description: '_t__AccountApiKeyCreate::SEO::DESCRIPTION' + x-hideOn: + - sdk + - doc + x-beta: closed /account/create: post: tags: @@ -319,6 +431,207 @@ paths: seo: title: '_t__AccountUpdate::SEO::TITLE' description: '_t__AccountUpdate::SEO::DESCRIPTION' + /account/settings: + get: + tags: + - Account + summary: '_t__AccountSettingsGet::SUMMARY' + description: '_t__AccountSettingsGet::DESCRIPTION' + operationId: accountSettingsGet + parameters: + - + name: account_id + in: query + description: '_t__AccountSettingsGet::ACCOUNT_ID' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + 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/AccountSettingsResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsGetExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsGetExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsGetExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsGetExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsGetExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsGetExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsGetExample.sh + x-meta: + seo: + title: '_t__AccountSettingsGet::SEO::TITLE' + description: '_t__AccountSettingsGet::SEO::DESCRIPTION' + post: + tags: + - Account + summary: '_t__AccountSettingsUpdate::SUMMARY' + description: '_t__AccountSettingsUpdate::DESCRIPTION' + operationId: accountSettingsUpdate + parameters: + - + name: account_id + in: query + description: '_t__AccountSettingsUpdate::ACCOUNT_ID' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountSettingsUpdateRequest' + 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/AccountSettingsResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsUpdateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsUpdateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsUpdateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsUpdateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsUpdateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsUpdateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsUpdateExample.sh + x-meta: + seo: + title: '_t__AccountSettingsUpdate::SEO::TITLE' + description: '_t__AccountSettingsUpdate::SEO::DESCRIPTION' /account/verify: post: tags: @@ -5810,7 +6123,224 @@ paths: schema: type: string responses: - '200': + '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/TeamInvitesResponse' + examples: + example: + $ref: '#/components/examples/TeamInvitesResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + - basic_account_info + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TeamInvitesExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TeamInvitesExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TeamInvitesExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TeamInvitesExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TeamInvitesExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TeamInvitesExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TeamInvitesExample.sh + x-meta: + seo: + title: '_t__TeamInvites::SEO::TITLE' + description: '_t__TeamInvites::SEO::DESCRIPTION' + '/team/members/{team_id}': + get: + tags: + - Team + summary: '_t__TeamMembers::SUMMARY' + description: '_t__TeamMembers::DESCRIPTION' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: '_t__TeamMembers::TEAM_ID' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: '_t__TeamMembers::PAGE' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: '_t__TeamMembers::PAGE_SIZE' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/TeamMembersResponse' + examples: + example: + $ref: '#/components/examples/TeamMembersResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - team_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TeamMembersExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TeamMembersExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TeamMembersExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TeamMembersExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TeamMembersExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TeamMembersExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TeamMembersExample.sh + x-meta: + seo: + title: '_t__TeamMembers::SEO::TITLE' + description: '_t__TeamMembers::SEO::DESCRIPTION' + /team/remove_member: + post: + tags: + - Team + summary: '_t__TeamRemoveMember::SUMMARY' + description: '_t__TeamRemoveMember::DESCRIPTION' + operationId: teamRemoveMember + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamRemoveMemberRequest' + examples: + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' + responses: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5822,10 +6352,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamInvitesResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: example: - $ref: '#/components/examples/TeamInvitesResponse' + $ref: '#/components/examples/TeamRemoveMemberResponse' 4XX: description: failed_operation content: @@ -5843,6 +6373,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -5850,80 +6382,63 @@ paths: api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvitesExample.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvitesExample.cs + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvitesExample.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvitesExample.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvitesExample.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvitesExample.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvitesExample.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: - title: '_t__TeamInvites::SEO::TITLE' - description: '_t__TeamInvites::SEO::DESCRIPTION' - '/team/members/{team_id}': + title: '_t__TeamRemoveMember::SEO::TITLE' + description: '_t__TeamRemoveMember::SEO::DESCRIPTION' + /team/settings: get: tags: - Team - summary: '_t__TeamMembers::SUMMARY' - description: '_t__TeamMembers::DESCRIPTION' - operationId: teamMembers + summary: '_t__TeamSettingsGet::SUMMARY' + description: '_t__TeamSettingsGet::DESCRIPTION' + operationId: teamSettingsGet parameters: - name: team_id - in: path - description: '_t__TeamMembers::TEAM_ID' - required: true + in: query + description: '_t__TeamSettingsGet::TEAM_ID' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: '_t__TeamMembers::PAGE' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: '_t__TeamMembers::PAGE_SIZE' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: '200': description: 'successful operation' @@ -5937,10 +6452,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' - examples: - example: - $ref: '#/components/examples/TeamMembersResponse' + $ref: '#/components/schemas/TeamSettingsResponse' 4XX: description: failed_operation content: @@ -5958,8 +6470,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' - 409_example: - $ref: '#/components/examples/Error409Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -5973,61 +6485,64 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembersExample.php + $ref: examples/TeamSettingsGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembersExample.cs + $ref: examples/TeamSettingsGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembersExample.ts + $ref: examples/TeamSettingsGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembersExample.java + $ref: examples/TeamSettingsGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembersExample.rb + $ref: examples/TeamSettingsGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembersExample.py + $ref: examples/TeamSettingsGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembersExample.sh + $ref: examples/TeamSettingsGetExample.sh x-meta: seo: - title: '_t__TeamMembers::SEO::TITLE' - description: '_t__TeamMembers::SEO::DESCRIPTION' - /team/remove_member: + title: '_t__TeamSettingsGet::SEO::TITLE' + description: '_t__TeamSettingsGet::SEO::DESCRIPTION' post: tags: - Team - summary: '_t__TeamRemoveMember::SUMMARY' - description: '_t__TeamRemoveMember::DESCRIPTION' - operationId: teamRemoveMember + summary: '_t__TeamSettingsUpdate::SUMMARY' + description: '_t__TeamSettingsUpdate::DESCRIPTION' + operationId: teamSettingsUpdate + parameters: + - + name: team_id + in: query + description: '_t__TeamSettingsUpdate::TEAM_ID' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' - examples: - example: - $ref: '#/components/examples/TeamRemoveMemberRequest' - account_id_example: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' + $ref: '#/components/schemas/TeamSettingsUpdateRequest' responses: - '201': + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6039,10 +6554,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - example: - $ref: '#/components/examples/TeamRemoveMemberResponse' + $ref: '#/components/schemas/TeamSettingsResponse' 4XX: description: failed_operation content: @@ -6062,6 +6574,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -6075,41 +6589,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMemberExample.php + $ref: examples/TeamSettingsUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMemberExample.cs + $ref: examples/TeamSettingsUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMemberExample.ts + $ref: examples/TeamSettingsUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMemberExample.java + $ref: examples/TeamSettingsUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMemberExample.rb + $ref: examples/TeamSettingsUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMemberExample.py + $ref: examples/TeamSettingsUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMemberExample.sh + $ref: examples/TeamSettingsUpdateExample.sh x-meta: seo: - title: '_t__TeamRemoveMember::SEO::TITLE' - description: '_t__TeamRemoveMember::SEO::DESCRIPTION' + title: '_t__TeamSettingsUpdate::SEO::TITLE' + description: '_t__TeamSettingsUpdate::SEO::DESCRIPTION' '/team/sub_teams/{team_id}': get: tags: @@ -7985,6 +8499,18 @@ paths: description: '_t__UnclaimedDraftEditAndResend::SEO::DESCRIPTION' components: schemas: + AccountApiKeyCreateRequest: + required: + - name + properties: + name: + description: '_t__AccountApiKeyCreate::NAME' + type: string + maxLength: 25 + type: object + x-hideOn: + - sdk + - doc AccountCreateRequest: required: - email_address @@ -8013,6 +8539,124 @@ components: description: '_t__AccountCreate::LOCALE' type: string type: object + AccountSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: '_t__Settings::COMPANY' + type: string + custom_signing_redirect_enabled: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_ENABLED' + type: boolean + custom_signing_redirect_url: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_URL' + type: string + custom_tagline: + description: '_t__Settings::CUSTOM_TAGLINE' + type: string + date_format: + $ref: '#/components/schemas/DateFormat' + is_signature_reminders_enabled: + description: '_t__Settings::IS_SIGNATURE_REMINDERS_ENABLED' + type: boolean + request_email_from: + description: '_t__Settings::REQUEST_EMAIL_FROM' + type: string + request_email_signature: + description: '_t__Settings::REQUEST_EMAIL_SIGNATURE' + type: string + required_signature_types: + description: '_t__Settings::REQUIRED_SIGNATURE_TYPES' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + should_enable_tamper_proof: + description: '_t__Settings::SHOULD_ENABLE_TAMPER_PROOF' + type: boolean + should_include_distinct_pdfs: + description: '_t__Settings::SHOULD_INCLUDE_DISTINCT_PDFS' + type: boolean + should_offer_signer_access_code: + description: '_t__Settings::SHOULD_OFFER_SIGNER_ACCESS_CODE' + type: boolean + should_offer_signer_sms_authentication: + description: '_t__Settings::SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION' + type: boolean + should_remove_document_id: + description: '_t__Settings::SHOULD_REMOVE_DOCUMENT_ID' + type: boolean + is_notify_on_sign_enabled: + description: '_t__AccountSettings::IS_NOTIFY_ON_SIGN_ENABLED' + type: boolean + is_notify_on_view_enabled: + description: '_t__AccountSettings::IS_NOTIFY_ON_VIEW_ENABLED' + type: boolean + should_autocomplete: + description: '_t__AccountSettings::SHOULD_AUTOCOMPLETE' + type: boolean + should_include_requested_pdfs: + description: '_t__AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS' + type: boolean + should_include_requested_pdfs_for_others: + description: '_t__AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS' + type: boolean + should_include_sent_doc_pdfs: + description: '_t__AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS' + type: boolean + should_include_sent_doc_pdfs_for_others: + description: '_t__AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS' + type: boolean + should_send_daily_summary: + description: '_t__AccountSettings::SHOULD_SEND_DAILY_SUMMARY' + type: boolean + should_send_embedded_signature_conf_emails: + description: '_t__AccountSettings::SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS' + type: boolean + should_send_ordered_sr_email: + description: '_t__AccountSettings::SHOULD_SEND_ORDERED_SR_EMAIL' + type: boolean + should_send_outbound_conf_emails: + description: '_t__AccountSettings::SHOULD_SEND_OUTBOUND_CONF_EMAILS' + type: boolean + template_link_signature_emails_enabled: + description: '_t__AccountSettings::TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED' + type: boolean + unset: + description: '_t__SettingsUpdateRequest::UNSET' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + uniqueItems: true + type: object + additionalProperties: false AccountUpdateRequest: properties: account_id: @@ -8463,9 +9107,9 @@ components: type: string maxLength: 5000 metadata: - description: '_t__Sub::Metadata::DESCRIPTION' + description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: { } signing_redirect_url: description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::SIGNING_REDIRECT_URL' @@ -8527,9 +9171,9 @@ components: type: string maxLength: 5000 metadata: - description: '_t__Sub::Metadata::DESCRIPTION' + description: '_t__SignatureRequestBulkSendWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: { } signing_redirect_url: description: '_t__SignatureRequestBulkSendWithTemplate::SIGNING_REDIRECT_URL' @@ -9433,6 +10077,16 @@ components: description: '_t__Sub::Attachment::SIGNER_INDEX' type: integer type: object + BooleanSettingUpdate: + description: '_t__BooleanSettingUpdate::DESCRIPTION' + properties: + value: + description: '_t__BooleanSettingUpdate::VALUE' + type: boolean + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubBulkSignerList: properties: custom_fields: @@ -9445,6 +10099,11 @@ components: type: array items: $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + metadata: + description: '_t__Sub::BulkSigner::METADATA' + maxProperties: 10 + type: object + additionalProperties: { } type: object SubBulkSignerListCustomField: required: @@ -9490,6 +10149,41 @@ components: description: '_t__Sub::CustomField::VALUE' type: string type: object + DataResidency: + description: '_t__DataResidency::DESCRIPTION' + type: string + enum: + - us + - eu + - au + - jp + - uk + - ca + DataResidencySettingUpdate: + description: '_t__DataResidencySettingUpdate::DESCRIPTION' + properties: + value: + $ref: '#/components/schemas/DataResidency' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + DateFormat: + description: '_t__DateFormat::DESCRIPTION' + type: string + enum: + - MM/DD/YYYY + - DD/MM/YYYY + - YYYY/MM/DD + DateFormatSettingUpdate: + description: '_t__DateFormatSettingUpdate::DESCRIPTION' + properties: + value: + $ref: '#/components/schemas/DateFormat' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubEditorOptions: description: '_t__Sub::EditorOptions::DESCRIPTION' properties: @@ -10116,6 +10810,27 @@ components: type: boolean default: false type: object + RequiredSignatureType: + description: '_t__RequiredSignatureType::DESCRIPTION' + type: string + enum: + - draw + - phone + - type + - upload + RequiredSignatureTypesSettingUpdate: + description: '_t__RequiredSignatureTypesSettingUpdate::DESCRIPTION' + properties: + value: + description: '_t__RequiredSignatureTypesSettingUpdate::VALUE' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubSignatureRequestSigner: required: - name @@ -10274,6 +10989,23 @@ components: type: boolean default: false type: object + StringSettingUpdate: + description: '_t__StringSettingUpdate::DESCRIPTION' + properties: + value: + description: '_t__StringSettingUpdate::VALUE' + type: string + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + TeamSettingLock: + description: '_t__TeamSettingLock::DESCRIPTION' + type: string + enum: + - organization_admins + - team_admins + - members SubWhiteLabelingOptions: description: '_t__Sub::WhiteLabelingOptions::DESCRIPTION' properties: @@ -10350,6 +11082,10 @@ components: description: '_t__TeamCreate::NAME' type: string default: 'Untitled Team' + parent_team_id: + description: '_t__TeamCreate::PARENT_TEAM_ID' + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c type: object TeamRemoveMemberRequest: properties: @@ -10376,6 +11112,168 @@ components: - 'Team Manager' - Admin type: object + TeamSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: '_t__Settings::COMPANY' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_signing_redirect_enabled: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_ENABLED' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + custom_signing_redirect_url: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_URL' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_tagline: + description: '_t__Settings::CUSTOM_TAGLINE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + date_format: + description: '_t__Settings::DATE_FORMAT' + allOf: + - + $ref: '#/components/schemas/DateFormatSettingUpdate' + is_signature_reminders_enabled: + description: '_t__Settings::IS_SIGNATURE_REMINDERS_ENABLED' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + request_email_from: + description: '_t__Settings::REQUEST_EMAIL_FROM' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + request_email_signature: + description: '_t__Settings::REQUEST_EMAIL_SIGNATURE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + required_signature_types: + description: '_t__Settings::REQUIRED_SIGNATURE_TYPES' + allOf: + - + $ref: '#/components/schemas/RequiredSignatureTypesSettingUpdate' + should_enable_tamper_proof: + description: '_t__Settings::SHOULD_ENABLE_TAMPER_PROOF' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_include_distinct_pdfs: + description: '_t__Settings::SHOULD_INCLUDE_DISTINCT_PDFS' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_access_code: + description: '_t__Settings::SHOULD_OFFER_SIGNER_ACCESS_CODE' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_sms_authentication: + description: '_t__Settings::SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_remove_document_id: + description: '_t__Settings::SHOULD_REMOVE_DOCUMENT_ID' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + data_residency: + description: '_t__TeamSettings::DATA_RESIDENCY' + allOf: + - + $ref: '#/components/schemas/DataResidencySettingUpdate' + allow_team_delete_document_for_everyone: + description: '_t__TeamSettings::ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + allow_team_download_csv: + description: '_t__TeamSettings::ALLOW_TEAM_DOWNLOAD_CSV' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_creation: + description: '_t__TeamSettings::LOCK_TEAM_TEMPLATE_CREATION' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_gallery: + description: '_t__TeamSettings::LOCK_TEAM_TEMPLATE_GALLERY' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + self_sign_message: + description: '_t__TeamSettings::SELF_SIGN_MESSAGE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + self_sign_title: + description: '_t__TeamSettings::SELF_SIGN_TITLE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_message: + description: '_t__TeamSettings::SIGNATURE_REQUEST_MESSAGE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_title: + description: '_t__TeamSettings::SIGNATURE_REQUEST_TITLE' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + multifactor_auth_app: + description: '_t__TeamSettings::MULTIFACTOR_AUTH_APP' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + multifactor_auth_sms: + description: '_t__TeamSettings::MULTIFACTOR_AUTH_SMS' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + unset: + description: '_t__SettingsUpdateRequest::UNSET' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + uniqueItems: true + type: object + additionalProperties: false TeamUpdateRequest: properties: name: @@ -11128,6 +12026,22 @@ components: type: boolean default: false type: object + AccountApiKeyCreateResponse: + required: + - api_key + properties: + api_key: + $ref: '#/components/schemas/AccountApiKeyResponse' + warnings: + description: '_t__WarningResponse::LIST_DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true + x-hideOn: + - sdk + - doc AccountCreateResponse: required: - account @@ -11156,6 +12070,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + AccountSettingsResponse: + required: + - account_id + - settings + properties: + account_id: + type: string + settings: + $ref: '#/components/schemas/AccountSettingsResponseSettings' + warnings: + description: '_t__WarningResponse::LIST_DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true AccountVerifyResponse: properties: account: @@ -11468,6 +12398,49 @@ components: $ref: '#/components/schemas/AccountResponseSettings' type: object x-internal-class: true + AccountApiKeyResponse: + required: + - api_key_id + - account_id + - name + - secret + - is_primary + - created_at + - updated_at + properties: + api_key_id: + description: '_t__AccountApiKey::API_KEY_ID' + type: string + account_id: + description: '_t__AccountApiKey::ACCOUNT_ID' + type: string + name: + description: '_t__AccountApiKey::NAME' + type: string + secret: + description: '_t__AccountApiKeyCreate::SECRET' + type: string + maxLength: 64 + minLength: 64 + readOnly: true + is_primary: + description: '_t__AccountApiKey::IS_PRIMARY' + type: boolean + last_used_at: + description: '_t__AccountApiKey::LAST_USED_AT' + type: integer + nullable: true + created_at: + description: '_t__AccountApiKey::CREATED_AT' + type: integer + updated_at: + description: '_t__AccountApiKey::UPDATED_AT' + type: integer + type: object + x-internal-class: true + x-hideOn: + - sdk + - doc OAuthTokenResponse: properties: access_token: @@ -11527,6 +12500,194 @@ components: type: boolean type: object x-internal-class: true + AccountSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + properties: + company: + description: '_t__Settings::COMPANY' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_URL' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: '_t__Settings::CUSTOM_TAGLINE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: '_t__Settings::DATE_FORMAT' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: '_t__Settings::IS_SIGNATURE_REMINDERS_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: '_t__Settings::REQUEST_EMAIL_FROM' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: '_t__Settings::REQUEST_EMAIL_SIGNATURE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: '_t__Settings::REQUIRED_SIGNATURE_TYPES' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: '_t__Settings::SHOULD_ENABLE_TAMPER_PROOF' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: '_t__Settings::SHOULD_INCLUDE_DISTINCT_PDFS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: '_t__Settings::SHOULD_OFFER_SIGNER_ACCESS_CODE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: '_t__Settings::SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: '_t__Settings::SHOULD_REMOVE_DOCUMENT_ID' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_sign_enabled: + description: '_t__AccountSettings::IS_NOTIFY_ON_SIGN_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_view_enabled: + description: '_t__AccountSettings::IS_NOTIFY_ON_VIEW_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_autocomplete: + description: '_t__AccountSettings::SHOULD_AUTOCOMPLETE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs: + description: '_t__AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs_for_others: + description: '_t__AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs: + description: '_t__AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs_for_others: + description: '_t__AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_daily_summary: + description: '_t__AccountSettings::SHOULD_SEND_DAILY_SUMMARY' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_embedded_signature_conf_emails: + description: '_t__AccountSettings::SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_ordered_sr_email: + description: '_t__AccountSettings::SHOULD_SEND_ORDERED_SR_EMAIL' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_outbound_conf_emails: + description: '_t__AccountSettings::SHOULD_SEND_OUTBOUND_CONF_EMAILS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + template_link_signature_emails_enabled: + description: '_t__AccountSettings::TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true AccountResponseUsage: description: '_t__Account::USAGE' properties: @@ -11933,6 +13094,55 @@ components: - fax_usage type: object x-internal-class: true + SettingResponse: + required: + - value + - is_inherited + - source + - type + - writable + - lock + properties: + value: + description: '_t__SettingResponse::VALUE' + nullable: true + is_inherited: + type: boolean + source: + type: string + enum: + - account + - team + - parent_team + - default + type: + type: string + enum: + - boolean + - integer + - string + - array + writable: + type: boolean + lock: + $ref: '#/components/schemas/SettingLockResponse' + type: object + x-internal-class: true + SettingLockResponse: + required: + - mode + - source + properties: + mode: + $ref: '#/components/schemas/TeamSettingLock' + source: + type: string + enum: + - team + - parent_team + - default + type: object + x-internal-class: true SignatureRequestResponse: description: '_t__SignatureRequestResponse::DESCRIPTION' properties: @@ -12424,6 +13634,12 @@ components: TeamResponse: description: '_t__TeamResponse::DESCRIPTION' properties: + team_id: + description: '_t__TeamGeneral::TEAM_ID' + type: string + parent_team_id: + description: '_t__Team::PARENT_TEAM_ID' + type: string name: description: '_t__Team::NAME' type: string @@ -12508,6 +13724,187 @@ components: type: object nullable: true x-internal-class: true + TeamSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + properties: + company: + description: '_t__Settings::COMPANY' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: '_t__Settings::CUSTOM_SIGNING_REDIRECT_URL' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: '_t__Settings::CUSTOM_TAGLINE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: '_t__Settings::DATE_FORMAT' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: '_t__Settings::IS_SIGNATURE_REMINDERS_ENABLED' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: '_t__Settings::REQUEST_EMAIL_FROM' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: '_t__Settings::REQUEST_EMAIL_SIGNATURE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: '_t__Settings::REQUIRED_SIGNATURE_TYPES' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: '_t__Settings::SHOULD_ENABLE_TAMPER_PROOF' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: '_t__Settings::SHOULD_INCLUDE_DISTINCT_PDFS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: '_t__Settings::SHOULD_OFFER_SIGNER_ACCESS_CODE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: '_t__Settings::SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: '_t__Settings::SHOULD_REMOVE_DOCUMENT_ID' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + data_residency: + description: '_t__TeamSettings::DATA_RESIDENCY' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_delete_document_for_everyone: + description: '_t__TeamSettings::ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_download_csv: + description: '_t__TeamSettings::ALLOW_TEAM_DOWNLOAD_CSV' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_creation: + description: '_t__TeamSettings::LOCK_TEAM_TEMPLATE_CREATION' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_gallery: + description: '_t__TeamSettings::LOCK_TEAM_TEMPLATE_GALLERY' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_message: + description: '_t__TeamSettings::SELF_SIGN_MESSAGE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_title: + description: '_t__TeamSettings::SELF_SIGN_TITLE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_message: + description: '_t__TeamSettings::SIGNATURE_REQUEST_MESSAGE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_title: + description: '_t__TeamSettings::SIGNATURE_REQUEST_TITLE' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_app: + description: '_t__TeamSettings::MULTIFACTOR_AUTH_APP' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_sms: + description: '_t__TeamSettings::MULTIFACTOR_AUTH_SMS' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true SubTeamResponse: properties: team_id: @@ -13342,6 +14739,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + TeamSettingsResponse: + required: + - team_id + - settings + properties: + team_id: + type: string + settings: + $ref: '#/components/schemas/TeamSettingsResponseSettings' + warnings: + description: '_t__WarningResponse::LIST_DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true TeamSubTeamsResponse: required: - sub_teams @@ -14234,7 +15647,25 @@ components: default: 'Hello API Event Received' x-fern-audiences: - events + parameters: + IdempotencyKey: + name: Idempotency-Key + in: header + description: '_t__Common::Idempotency::KEY' + required: false + schema: + type: string + maxLength: 255 + minLength: 1 + x-hideOn: sdk examples: + AccountApiKeyCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/AccountApiKeyCreateRequest.json + x-hideOn: + - sdk + - doc AccountCreateRequest: summary: 'Default Example' value: @@ -14474,6 +15905,13 @@ components: summary: 'Default Example' value: $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountApiKeyCreateResponse: + summary: 'Default Example' + value: + $ref: examples/json/AccountApiKeyCreateResponse.json + x-hideOn: + - sdk + - doc AccountCreateResponse: summary: '_t__AccountCreateResponseExample::SUMMARY' value: @@ -14992,6 +16430,12 @@ components: type: integer format: int64 example: 1430170900 + Idempotent-Replayed: + description: '_t__Common::Idempotency::REPLAYED' + required: false + schema: + type: boolean + x-hideOn: sdk securitySchemes: api_key: type: http diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index a05971e9f..04bb780ad 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -325,6 +325,207 @@ paths: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how update the properties and settings of your Account, click here.' + /account/settings: + get: + tags: + - Account + summary: 'Get account settings' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + operationId: accountSettingsGet + parameters: + - + name: account_id + in: query + description: 'Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer.' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + 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/AccountSettingsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsGetExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsGetExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsGetExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsGetExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsGetExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsGetExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsGetExample.sh + x-meta: + seo: + title: 'Get Account Settings | API Documentation | Dropbox Sign for Developers' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + post: + tags: + - Account + summary: 'Modify account settings' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + operationId: accountSettingsUpdate + parameters: + - + name: account_id + in: query + description: 'Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer.' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountSettingsUpdateRequest' + 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/AccountSettingsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsUpdateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsUpdateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsUpdateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsUpdateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsUpdateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsUpdateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsUpdateExample.sh + x-meta: + seo: + title: 'Update Account Settings | API Documentation | Dropbox Sign for Developers' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' /account/verify: post: tags: @@ -6130,38 +6331,22 @@ paths: seo: title: 'Remove User from Team | REST API | Dropbox Sign for Developers' description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + /team/settings: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get team settings' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + operationId: teamSettingsGet parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'Optional team ID. Defaults to the authenticated account''s team. An organization admin can specify a subteam.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: '200': description: 'successful operation' @@ -6175,10 +6360,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' - examples: - example: - $ref: '#/components/examples/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamSettingsResponse' '4XX': description: failed_operation content: @@ -6196,8 +6378,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' - 409_example: - $ref: '#/components/examples/Error409Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -6211,66 +6393,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeamsExample.php + $ref: examples/TeamSettingsGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeamsExample.cs + $ref: examples/TeamSettingsGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeamsExample.ts + $ref: examples/TeamSettingsGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeamsExample.java + $ref: examples/TeamSettingsGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeamsExample.rb + $ref: examples/TeamSettingsGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeamsExample.py + $ref: examples/TeamSettingsGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeamsExample.sh + $ref: examples/TeamSettingsGetExample.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': + title: 'Get Team Settings | API Documentation | Dropbox Sign for Developers' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' post: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'Modify team settings' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + operationId: teamSettingsUpdate parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: team_id + in: query + description: 'Optional team ID. Defaults to the authenticated account''s team. An organization admin can specify a subteam.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - example: - $ref: '#/components/examples/TemplateAddUserRequest' + $ref: '#/components/schemas/TeamSettingsUpdateRequest' responses: '200': description: 'successful operation' @@ -6284,10 +6462,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - example: - $ref: '#/components/examples/TemplateAddUserResponse' + $ref: '#/components/schemas/TeamSettingsResponse' '4XX': description: failed_operation content: @@ -6307,6 +6482,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -6314,53 +6491,278 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUserExample.php + $ref: examples/TeamSettingsUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUserExample.cs + $ref: examples/TeamSettingsUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUserExample.ts + $ref: examples/TeamSettingsUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUserExample.java + $ref: examples/TeamSettingsUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUserExample.rb + $ref: examples/TeamSettingsUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUserExample.py + $ref: examples/TeamSettingsUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUserExample.sh + $ref: examples/TeamSettingsUpdateExample.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'Update Team Settings | API Documentation | Dropbox Sign for Developers' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: |- + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams + parameters: + - + name: team_id + in: path + description: 'The id of the parent Team.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + responses: + '200': + 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/TeamSubTeamsResponse' + examples: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - team_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TeamSubTeamsExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TeamSubTeamsExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TeamSubTeamsExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TeamSubTeamsExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TeamSubTeamsExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TeamSubTeamsExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TeamSubTeamsExample.sh + x-meta: + seo: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: + tags: + - Template + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to give the Account access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + example: + $ref: '#/components/examples/TemplateAddUserRequest' + 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/TemplateGetResponse' + examples: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - template_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TemplateAddUserExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TemplateAddUserExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TemplateAddUserExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TemplateAddUserExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TemplateAddUserExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TemplateAddUserExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TemplateAddUserExample.sh + x-meta: + seo: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: + tags: + - Template + summary: 'Create Template' + description: |- Creates a template that can be used in future signature requests. If `client_id` is provided, the template will be created as an embedded template. Embedded templates can be used for embedded signature requests and can be edited later by generating a new `edit_url` with [/embedded/edit_url/{template_id}](/api/reference/operation/embeddedEditUrl/). @@ -7949,6 +8351,124 @@ components: description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' type: string type: object + AccountSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: 'Company name associated with this account or team.' + type: string + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: boolean + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: string + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: string + date_format: + $ref: '#/components/schemas/DateFormat' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: boolean + request_email_from: + description: 'Sender name shown on signature request emails.' + type: string + request_email_signature: + description: 'Signature appended to signature request emails.' + type: string + required_signature_types: + description: 'Signature creation methods signers may use.' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: boolean + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: boolean + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: boolean + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: boolean + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: boolean + is_notify_on_sign_enabled: + description: 'Whether to notify the account when someone signs a document it sent.' + type: boolean + is_notify_on_view_enabled: + description: 'Whether to notify the account when someone opens a document it sent.' + type: boolean + should_autocomplete: + description: 'Whether values entered in text fields are saved and suggested for future signature requests.' + type: boolean + should_include_requested_pdfs: + description: 'Whether completed signature requests include PDF copies in emails sent to the account.' + type: boolean + should_include_requested_pdfs_for_others: + description: 'Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.' + type: boolean + should_include_sent_doc_pdfs: + description: 'Whether emails sent to the account include PDF copies of documents it sends.' + type: boolean + should_include_sent_doc_pdfs_for_others: + description: 'Whether emails sent to recipients include PDF copies of documents the account sends.' + type: boolean + should_send_daily_summary: + description: 'Whether to send the account a daily email summarizing outstanding signature requests.' + type: boolean + should_send_embedded_signature_conf_emails: + description: 'Whether to notify the account when it signs a document on a third-party site.' + type: boolean + should_send_ordered_sr_email: + description: 'Whether to notify all parties when an ordered signature request starts.' + type: boolean + should_send_outbound_conf_emails: + description: 'Whether to notify the account when it signs and sends a document.' + type: boolean + template_link_signature_emails_enabled: + description: 'Whether to notify the account when someone signs a document sent by its team through a template link.' + type: boolean + unset: + description: 'Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + uniqueItems: true + type: object + additionalProperties: false AccountUpdateRequest: properties: account_id: @@ -8437,12 +8957,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' @@ -8530,12 +9047,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: '_t__SignatureRequestBulkSendWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' @@ -9618,6 +10132,16 @@ components: **NOTE:** Only one signer can be assigned per attachment. type: integer type: object + BooleanSettingUpdate: + description: 'Updates a boolean team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'Boolean value to store.' + type: boolean + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubBulkSignerList: properties: custom_fields: @@ -9633,6 +10157,11 @@ components: type: array items: $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + metadata: + description: '_t__Sub::BulkSigner::METADATA' + maxProperties: 10 + type: object + additionalProperties: {} type: object SubBulkSignerListCustomField: required: @@ -9686,6 +10215,41 @@ components: description: 'The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing.' type: string type: object + DataResidency: + description: 'Storage region for team documents.' + type: string + enum: + - us + - eu + - au + - jp + - uk + - ca + DataResidencySettingUpdate: + description: 'Updates the data residency team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DataResidency' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + DateFormat: + description: 'Date format used to display dates.' + type: string + enum: + - MM/DD/YYYY + - DD/MM/YYYY + - YYYY/MM/DD + DateFormatSettingUpdate: + description: 'Updates a date format team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DateFormat' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubEditorOptions: description: 'This allows the requester to specify editor options when a preparing a document' properties: @@ -10396,6 +10960,27 @@ components: type: boolean default: false type: object + RequiredSignatureType: + description: 'A signature creation method a signer may use.' + type: string + enum: + - draw + - phone + - type + - upload + RequiredSignatureTypesSettingUpdate: + description: 'Updates the required signature types team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'Signature creation methods signers may use.' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubSignatureRequestSigner: required: - name @@ -10561,6 +11146,23 @@ components: type: boolean default: false type: object + StringSettingUpdate: + description: 'Updates a string team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'String value to store.' + type: string + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + TeamSettingLock: + description: 'Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value.' + type: string + enum: + - organization_admins + - team_admins + - members SubWhiteLabelingOptions: description: |- 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) @@ -10649,6 +11251,10 @@ components: description: 'The name of your Team.' type: string default: 'Untitled Team' + parent_team_id: + description: '_t__TeamCreate::PARENT_TEAM_ID' + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c type: object TeamRemoveMemberRequest: properties: @@ -10687,6 +11293,168 @@ components: - 'Team Manager' - Admin type: object + TeamSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: 'Company name associated with this account or team.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + allOf: + - + $ref: '#/components/schemas/DateFormatSettingUpdate' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + request_email_from: + description: 'Sender name shown on signature request emails.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + request_email_signature: + description: 'Signature appended to signature request emails.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + required_signature_types: + description: 'Signature creation methods signers may use.' + allOf: + - + $ref: '#/components/schemas/RequiredSignatureTypesSettingUpdate' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + data_residency: + description: 'Storage region for team documents.' + allOf: + - + $ref: '#/components/schemas/DataResidencySettingUpdate' + allow_team_delete_document_for_everyone: + description: 'Whether team members can delete a document for all participants.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + allow_team_download_csv: + description: 'Whether team members can download CSV files.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_creation: + description: 'Whether team members are prevented from creating templates.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_gallery: + description: 'Whether team members are prevented from using the template gallery.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + self_sign_message: + description: 'Default message enforced for team members when they create self-signed documents.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + self_sign_title: + description: 'Default title enforced for team members when they create self-signed documents.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_message: + description: 'Default message enforced for team members when they create signature requests.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_title: + description: 'Default title enforced for team members when they create signature requests.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + multifactor_auth_app: + description: 'Whether authenticator-app multifactor authentication is enabled for the team.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + multifactor_auth_sms: + description: 'Whether SMS multifactor authentication is enabled for the team.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + unset: + description: 'Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + uniqueItems: true + type: object + additionalProperties: false TeamUpdateRequest: properties: name: @@ -11575,6 +12343,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + AccountSettingsResponse: + required: + - account_id + - settings + properties: + account_id: + type: string + settings: + $ref: '#/components/schemas/AccountSettingsResponseSettings' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true AccountVerifyResponse: properties: account: @@ -11946,6 +12730,194 @@ components: type: boolean type: object x-internal-class: true + AccountSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + properties: + company: + description: 'Company name associated with this account or team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: 'Sender name shown on signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: 'Signature appended to signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: 'Signature creation methods signers may use.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_sign_enabled: + description: 'Whether to notify the account when someone signs a document it sent.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_view_enabled: + description: 'Whether to notify the account when someone opens a document it sent.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_autocomplete: + description: 'Whether values entered in text fields are saved and suggested for future signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs: + description: 'Whether completed signature requests include PDF copies in emails sent to the account.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs_for_others: + description: 'Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs: + description: 'Whether emails sent to the account include PDF copies of documents it sends.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs_for_others: + description: 'Whether emails sent to recipients include PDF copies of documents the account sends.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_daily_summary: + description: 'Whether to send the account a daily email summarizing outstanding signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_embedded_signature_conf_emails: + description: 'Whether to notify the account when it signs a document on a third-party site.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_ordered_sr_email: + description: 'Whether to notify all parties when an ordered signature request starts.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_outbound_conf_emails: + description: 'Whether to notify the account when it signs and sends a document.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + template_link_signature_emails_enabled: + description: 'Whether to notify the account when someone signs a document sent by its team through a template link.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true AccountResponseUsage: description: 'Details concerning monthly usage' properties: @@ -12366,6 +13338,55 @@ components: - fax_usage type: object x-internal-class: true + SettingResponse: + required: + - value + - is_inherited + - source + - type + - writable + - lock + properties: + value: + description: 'Current value of the setting. Null when the setting has no value.' + nullable: true + is_inherited: + type: boolean + source: + type: string + enum: + - account + - team + - parent_team + - default + type: + type: string + enum: + - boolean + - integer + - string + - array + writable: + type: boolean + lock: + $ref: '#/components/schemas/SettingLockResponse' + type: object + x-internal-class: true + SettingLockResponse: + required: + - mode + - source + properties: + mode: + $ref: '#/components/schemas/TeamSettingLock' + source: + type: string + enum: + - team + - parent_team + - default + type: object + x-internal-class: true SignatureRequestResponse: description: 'Contains information about a signature request.' properties: @@ -12838,6 +13859,12 @@ components: TeamResponse: description: 'Contains information about your team and its members' properties: + team_id: + description: 'The id of a team' + type: string + parent_team_id: + description: '_t__Team::PARENT_TEAM_ID' + type: string name: description: 'The name of your Team' type: string @@ -12922,6 +13949,187 @@ components: type: object nullable: true x-internal-class: true + TeamSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + properties: + company: + description: 'Company name associated with this account or team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: 'Sender name shown on signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: 'Signature appended to signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: 'Signature creation methods signers may use.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + data_residency: + description: 'Storage region for team documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_delete_document_for_everyone: + description: 'Whether team members can delete a document for all participants.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_download_csv: + description: 'Whether team members can download CSV files.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_creation: + description: 'Whether team members are prevented from creating templates.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_gallery: + description: 'Whether team members are prevented from using the template gallery.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_message: + description: 'Default message enforced for team members when they create self-signed documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_title: + description: 'Default title enforced for team members when they create self-signed documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_message: + description: 'Default message enforced for team members when they create signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_title: + description: 'Default title enforced for team members when they create signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_app: + description: 'Whether authenticator-app multifactor authentication is enabled for the team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_sms: + description: 'Whether SMS multifactor authentication is enabled for the team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true SubTeamResponse: properties: team_id: @@ -13924,6 +15132,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + TeamSettingsResponse: + required: + - team_id + - settings + properties: + team_id: + type: string + settings: + $ref: '#/components/schemas/TeamSettingsResponseSettings' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true TeamSubTeamsResponse: required: - sub_teams diff --git a/openapi.yaml b/openapi.yaml index 6be19e5a2..e89fe3774 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -325,6 +325,207 @@ paths: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how update the properties and settings of your Account, click here.' + /account/settings: + get: + tags: + - Account + summary: 'Get account settings' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + operationId: accountSettingsGet + parameters: + - + name: account_id + in: query + description: 'Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer.' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + 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/AccountSettingsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsGetExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsGetExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsGetExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsGetExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsGetExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsGetExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsGetExample.sh + x-meta: + seo: + title: 'Get Account Settings | API Documentation | Dropbox Sign for Developers' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + post: + tags: + - Account + summary: 'Modify account settings' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' + operationId: accountSettingsUpdate + parameters: + - + name: account_id + in: query + description: 'Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer.' + required: false + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountSettingsUpdateRequest' + 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/AccountSettingsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - account_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/AccountSettingsUpdateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/AccountSettingsUpdateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/AccountSettingsUpdateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/AccountSettingsUpdateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/AccountSettingsUpdateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/AccountSettingsUpdateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/AccountSettingsUpdateExample.sh + x-meta: + seo: + title: 'Update Account Settings | API Documentation | Dropbox Sign for Developers' + description: 'account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer.' /account/verify: post: tags: @@ -6130,38 +6331,22 @@ paths: seo: title: 'Remove User from Team | REST API | Dropbox Sign for Developers' description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + /team/settings: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get team settings' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + operationId: teamSettingsGet parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'Optional team ID. Defaults to the authenticated account''s team. An organization admin can specify a subteam.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: '200': description: 'successful operation' @@ -6175,10 +6360,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' - examples: - example: - $ref: '#/components/examples/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamSettingsResponse' '4XX': description: failed_operation content: @@ -6196,8 +6378,8 @@ paths: $ref: '#/components/examples/Error403Response' 429_example: $ref: '#/components/examples/Error429Response' - 409_example: - $ref: '#/components/examples/Error409Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -6211,66 +6393,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeamsExample.php + $ref: examples/TeamSettingsGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeamsExample.cs + $ref: examples/TeamSettingsGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeamsExample.ts + $ref: examples/TeamSettingsGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeamsExample.java + $ref: examples/TeamSettingsGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeamsExample.rb + $ref: examples/TeamSettingsGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeamsExample.py + $ref: examples/TeamSettingsGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeamsExample.sh + $ref: examples/TeamSettingsGetExample.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': + title: 'Get Team Settings | API Documentation | Dropbox Sign for Developers' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' post: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'Modify team settings' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + operationId: teamSettingsUpdate parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: team_id + in: query + description: 'Optional team ID. Defaults to the authenticated account''s team. An organization admin can specify a subteam.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - example: - $ref: '#/components/examples/TemplateAddUserRequest' + $ref: '#/components/schemas/TeamSettingsUpdateRequest' responses: '200': description: 'successful operation' @@ -6284,10 +6462,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - example: - $ref: '#/components/examples/TemplateAddUserResponse' + $ref: '#/components/schemas/TeamSettingsResponse' '4XX': description: failed_operation content: @@ -6307,6 +6482,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -6314,53 +6491,278 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUserExample.php + $ref: examples/TeamSettingsUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUserExample.cs + $ref: examples/TeamSettingsUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUserExample.ts + $ref: examples/TeamSettingsUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUserExample.java + $ref: examples/TeamSettingsUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUserExample.rb + $ref: examples/TeamSettingsUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUserExample.py + $ref: examples/TeamSettingsUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUserExample.sh + $ref: examples/TeamSettingsUpdateExample.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'Update Team Settings | API Documentation | Dropbox Sign for Developers' + description: 'team_id is an optional query parameter and defaults to the authenticated account''s team. An organization admin can specify a subteam.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: |- + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams + parameters: + - + name: team_id + in: path + description: 'The id of the parent Team.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + responses: + '200': + 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/TeamSubTeamsResponse' + examples: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - team_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TeamSubTeamsExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TeamSubTeamsExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TeamSubTeamsExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TeamSubTeamsExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TeamSubTeamsExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TeamSubTeamsExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TeamSubTeamsExample.sh + x-meta: + seo: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: + tags: + - Template + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to give the Account access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + example: + $ref: '#/components/examples/TemplateAddUserRequest' + 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/TemplateGetResponse' + examples: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - template_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/TemplateAddUserExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/TemplateAddUserExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TemplateAddUserExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TemplateAddUserExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TemplateAddUserExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TemplateAddUserExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TemplateAddUserExample.sh + x-meta: + seo: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: + tags: + - Template + summary: 'Create Template' + description: |- Creates a template that can be used in future signature requests. If `client_id` is provided, the template will be created as an embedded template. Embedded templates can be used for embedded signature requests and can be edited later by generating a new `edit_url` with [/embedded/edit_url/{template_id}](/api/reference/operation/embeddedEditUrl/). @@ -7949,6 +8351,124 @@ components: description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' type: string type: object + AccountSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: 'Company name associated with this account or team.' + type: string + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: boolean + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: string + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: string + date_format: + $ref: '#/components/schemas/DateFormat' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: boolean + request_email_from: + description: 'Sender name shown on signature request emails.' + type: string + request_email_signature: + description: 'Signature appended to signature request emails.' + type: string + required_signature_types: + description: 'Signature creation methods signers may use.' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: boolean + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: boolean + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: boolean + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: boolean + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: boolean + is_notify_on_sign_enabled: + description: 'Whether to notify the account when someone signs a document it sent.' + type: boolean + is_notify_on_view_enabled: + description: 'Whether to notify the account when someone opens a document it sent.' + type: boolean + should_autocomplete: + description: 'Whether values entered in text fields are saved and suggested for future signature requests.' + type: boolean + should_include_requested_pdfs: + description: 'Whether completed signature requests include PDF copies in emails sent to the account.' + type: boolean + should_include_requested_pdfs_for_others: + description: 'Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.' + type: boolean + should_include_sent_doc_pdfs: + description: 'Whether emails sent to the account include PDF copies of documents it sends.' + type: boolean + should_include_sent_doc_pdfs_for_others: + description: 'Whether emails sent to recipients include PDF copies of documents the account sends.' + type: boolean + should_send_daily_summary: + description: 'Whether to send the account a daily email summarizing outstanding signature requests.' + type: boolean + should_send_embedded_signature_conf_emails: + description: 'Whether to notify the account when it signs a document on a third-party site.' + type: boolean + should_send_ordered_sr_email: + description: 'Whether to notify all parties when an ordered signature request starts.' + type: boolean + should_send_outbound_conf_emails: + description: 'Whether to notify the account when it signs and sends a document.' + type: boolean + template_link_signature_emails_enabled: + description: 'Whether to notify the account when someone signs a document sent by its team through a template link.' + type: boolean + unset: + description: 'Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + uniqueItems: true + type: object + additionalProperties: false AccountUpdateRequest: properties: account_id: @@ -8437,12 +8957,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' @@ -8530,12 +9047,9 @@ components: type: string maxLength: 5000 metadata: - description: |- - Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. - - Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + description: '_t__SignatureRequestBulkSendWithTemplate::METADATA' + maxProperties: 10 type: object - maxItems: 10 additionalProperties: {} signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' @@ -9598,6 +10112,16 @@ components: **NOTE:** Only one signer can be assigned per attachment. type: integer type: object + BooleanSettingUpdate: + description: 'Updates a boolean team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'Boolean value to store.' + type: boolean + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubBulkSignerList: properties: custom_fields: @@ -9613,6 +10137,11 @@ components: type: array items: $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + metadata: + description: '_t__Sub::BulkSigner::METADATA' + maxProperties: 10 + type: object + additionalProperties: {} type: object SubBulkSignerListCustomField: required: @@ -9666,6 +10195,41 @@ components: description: 'The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing.' type: string type: object + DataResidency: + description: 'Storage region for team documents.' + type: string + enum: + - us + - eu + - au + - jp + - uk + - ca + DataResidencySettingUpdate: + description: 'Updates the data residency team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DataResidency' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + DateFormat: + description: 'Date format used to display dates.' + type: string + enum: + - MM/DD/YYYY + - DD/MM/YYYY + - YYYY/MM/DD + DateFormatSettingUpdate: + description: 'Updates a date format team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + $ref: '#/components/schemas/DateFormat' + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubEditorOptions: description: 'This allows the requester to specify editor options when a preparing a document' properties: @@ -10376,6 +10940,27 @@ components: type: boolean default: false type: object + RequiredSignatureType: + description: 'A signature creation method a signer may use.' + type: string + enum: + - draw + - phone + - type + - upload + RequiredSignatureTypesSettingUpdate: + description: 'Updates the required signature types team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'Signature creation methods signers may use.' + type: array + items: + $ref: '#/components/schemas/RequiredSignatureType' + uniqueItems: true + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false SubSignatureRequestSigner: required: - name @@ -10541,6 +11126,23 @@ components: type: boolean default: false type: object + StringSettingUpdate: + description: 'Updates a string team setting. Provide `value`, `lock_mode`, or both.' + properties: + value: + description: 'String value to store.' + type: string + lock_mode: + $ref: '#/components/schemas/TeamSettingLock' + type: object + additionalProperties: false + TeamSettingLock: + description: 'Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value.' + type: string + enum: + - organization_admins + - team_admins + - members SubWhiteLabelingOptions: description: |- 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) @@ -10629,6 +11231,10 @@ components: description: 'The name of your Team.' type: string default: 'Untitled Team' + parent_team_id: + description: '_t__TeamCreate::PARENT_TEAM_ID' + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c type: object TeamRemoveMemberRequest: properties: @@ -10667,6 +11273,168 @@ components: - 'Team Manager' - Admin type: object + TeamSettingsUpdateRequest: + minProperties: 1 + properties: + company: + description: 'Company name associated with this account or team.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + allOf: + - + $ref: '#/components/schemas/DateFormatSettingUpdate' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + request_email_from: + description: 'Sender name shown on signature request emails.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + request_email_signature: + description: 'Signature appended to signature request emails.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + required_signature_types: + description: 'Signature creation methods signers may use.' + allOf: + - + $ref: '#/components/schemas/RequiredSignatureTypesSettingUpdate' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + data_residency: + description: 'Storage region for team documents.' + allOf: + - + $ref: '#/components/schemas/DataResidencySettingUpdate' + allow_team_delete_document_for_everyone: + description: 'Whether team members can delete a document for all participants.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + allow_team_download_csv: + description: 'Whether team members can download CSV files.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_creation: + description: 'Whether team members are prevented from creating templates.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + lock_team_template_gallery: + description: 'Whether team members are prevented from using the template gallery.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + self_sign_message: + description: 'Default message enforced for team members when they create self-signed documents.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + self_sign_title: + description: 'Default title enforced for team members when they create self-signed documents.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_message: + description: 'Default message enforced for team members when they create signature requests.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + signature_request_title: + description: 'Default title enforced for team members when they create signature requests.' + allOf: + - + $ref: '#/components/schemas/StringSettingUpdate' + multifactor_auth_app: + description: 'Whether authenticator-app multifactor authentication is enabled for the team.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + multifactor_auth_sms: + description: 'Whether SMS multifactor authentication is enabled for the team.' + allOf: + - + $ref: '#/components/schemas/BooleanSettingUpdate' + unset: + description: 'Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.' + type: array + items: + type: string + enum: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + uniqueItems: true + type: object + additionalProperties: false TeamUpdateRequest: properties: name: @@ -11555,6 +12323,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + AccountSettingsResponse: + required: + - account_id + - settings + properties: + account_id: + type: string + settings: + $ref: '#/components/schemas/AccountSettingsResponseSettings' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true AccountVerifyResponse: properties: account: @@ -11926,6 +12710,194 @@ components: type: boolean type: object x-internal-class: true + AccountSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - is_notify_on_sign_enabled + - is_notify_on_view_enabled + - should_autocomplete + - should_include_requested_pdfs + - should_include_requested_pdfs_for_others + - should_include_sent_doc_pdfs + - should_include_sent_doc_pdfs_for_others + - should_send_daily_summary + - should_send_embedded_signature_conf_emails + - should_send_ordered_sr_email + - should_send_outbound_conf_emails + - template_link_signature_emails_enabled + properties: + company: + description: 'Company name associated with this account or team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: 'Sender name shown on signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: 'Signature appended to signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: 'Signature creation methods signers may use.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_sign_enabled: + description: 'Whether to notify the account when someone signs a document it sent.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_notify_on_view_enabled: + description: 'Whether to notify the account when someone opens a document it sent.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_autocomplete: + description: 'Whether values entered in text fields are saved and suggested for future signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs: + description: 'Whether completed signature requests include PDF copies in emails sent to the account.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_requested_pdfs_for_others: + description: 'Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs: + description: 'Whether emails sent to the account include PDF copies of documents it sends.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_sent_doc_pdfs_for_others: + description: 'Whether emails sent to recipients include PDF copies of documents the account sends.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_daily_summary: + description: 'Whether to send the account a daily email summarizing outstanding signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_embedded_signature_conf_emails: + description: 'Whether to notify the account when it signs a document on a third-party site.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_ordered_sr_email: + description: 'Whether to notify all parties when an ordered signature request starts.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_send_outbound_conf_emails: + description: 'Whether to notify the account when it signs and sends a document.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + template_link_signature_emails_enabled: + description: 'Whether to notify the account when someone signs a document sent by its team through a template link.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true AccountResponseUsage: description: 'Details concerning monthly usage' properties: @@ -12346,6 +13318,55 @@ components: - fax_usage type: object x-internal-class: true + SettingResponse: + required: + - value + - is_inherited + - source + - type + - writable + - lock + properties: + value: + description: 'Current value of the setting. Null when the setting has no value.' + nullable: true + is_inherited: + type: boolean + source: + type: string + enum: + - account + - team + - parent_team + - default + type: + type: string + enum: + - boolean + - integer + - string + - array + writable: + type: boolean + lock: + $ref: '#/components/schemas/SettingLockResponse' + type: object + x-internal-class: true + SettingLockResponse: + required: + - mode + - source + properties: + mode: + $ref: '#/components/schemas/TeamSettingLock' + source: + type: string + enum: + - team + - parent_team + - default + type: object + x-internal-class: true SignatureRequestResponse: description: 'Contains information about a signature request.' properties: @@ -12824,6 +13845,12 @@ components: TeamResponse: description: 'Contains information about your team and its members' properties: + team_id: + description: 'The id of a team' + type: string + parent_team_id: + description: '_t__Team::PARENT_TEAM_ID' + type: string name: description: 'The name of your Team' type: string @@ -12908,6 +13935,187 @@ components: type: object nullable: true x-internal-class: true + TeamSettingsResponseSettings: + required: + - company + - custom_signing_redirect_enabled + - custom_signing_redirect_url + - custom_tagline + - date_format + - is_signature_reminders_enabled + - request_email_from + - request_email_signature + - required_signature_types + - should_enable_tamper_proof + - should_include_distinct_pdfs + - should_offer_signer_access_code + - should_offer_signer_sms_authentication + - should_remove_document_id + - data_residency + - allow_team_delete_document_for_everyone + - allow_team_download_csv + - lock_team_template_creation + - lock_team_template_gallery + - self_sign_message + - self_sign_title + - signature_request_message + - signature_request_title + - multifactor_auth_app + - multifactor_auth_sms + properties: + company: + description: 'Company name associated with this account or team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_enabled: + description: 'Whether signers are redirected to a custom URL after completing a signature request.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_signing_redirect_url: + description: 'URL where signers are redirected after completing a signature request when custom redirects are enabled.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + custom_tagline: + description: 'Custom tagline displayed with the account or team branding.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + date_format: + description: 'Date format used to display dates. List the setting in `unset` to inherit the default.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + is_signature_reminders_enabled: + description: 'Whether automatic reminder emails are enabled for incomplete signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_from: + description: 'Sender name shown on signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + request_email_signature: + description: 'Signature appended to signature request emails.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + required_signature_types: + description: 'Signature creation methods signers may use.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_enable_tamper_proof: + description: 'Whether completed documents include a digital tamper-proof seal.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_include_distinct_pdfs: + description: 'Whether completed documents remain as separate PDF files instead of being merged into one PDF.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_access_code: + description: 'Whether senders can require an access code to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_offer_signer_sms_authentication: + description: 'Whether senders can require SMS authentication to verify a signer.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + should_remove_document_id: + description: 'Whether the Dropbox Sign document ID is hidden on sent documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + data_residency: + description: 'Storage region for team documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_delete_document_for_everyone: + description: 'Whether team members can delete a document for all participants.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + allow_team_download_csv: + description: 'Whether team members can download CSV files.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_creation: + description: 'Whether team members are prevented from creating templates.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + lock_team_template_gallery: + description: 'Whether team members are prevented from using the template gallery.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_message: + description: 'Default message enforced for team members when they create self-signed documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + self_sign_title: + description: 'Default title enforced for team members when they create self-signed documents.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_message: + description: 'Default message enforced for team members when they create signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + signature_request_title: + description: 'Default title enforced for team members when they create signature requests.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_app: + description: 'Whether authenticator-app multifactor authentication is enabled for the team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + multifactor_auth_sms: + description: 'Whether SMS multifactor authentication is enabled for the team.' + type: object + allOf: + - + $ref: '#/components/schemas/SettingResponse' + type: object + additionalProperties: false + x-internal-class: true SubTeamResponse: properties: team_id: @@ -13910,6 +15118,22 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + TeamSettingsResponse: + required: + - team_id + - settings + properties: + team_id: + type: string + settings: + $ref: '#/components/schemas/TeamSettingsResponseSettings' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true TeamSubTeamsResponse: required: - sub_teams @@ -14771,6 +15995,16 @@ components: default: 'Hello API Event Received' x-fern-audiences: - events + parameters: + IdempotencyKey: + name: Idempotency-Key + in: header + description: '_t__Common::Idempotency::KEY' + required: false + schema: + type: string + maxLength: 255 + minLength: 1 examples: AccountCreateRequest: summary: 'Default Example' @@ -15526,6 +16760,11 @@ components: type: integer format: int64 example: 1430170900 + Idempotent-Replayed: + description: '_t__Common::Idempotency::REPLAYED' + required: false + schema: + type: boolean securitySchemes: api_key: type: http diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsGetExample.cs new file mode 100644 index 000000000..3ba494a7d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsGetExample.cs @@ -0,0 +1,39 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountSettingsGet(); + var company = response.Settings.Company; + + Console.WriteLine(response); + Console.WriteLine(response.AccountId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsUpdateExample.cs new file mode 100644 index 000000000..e5d0c9c0b --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountSettingsUpdateExample.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest( + dateFormat: DateFormat.MMDDYYYY, + requiredSignatureTypes: new List() + { + RequiredSignatureType.Draw, + RequiredSignatureType.Type, + }, + shouldEnableTamperProof: false, + unset: new List() { "company" } + ); + + try + { + var response = new AccountApi(config).AccountSettingsUpdate( + accountSettingsUpdateRequest: accountSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsGetExample.cs new file mode 100644 index 000000000..87e5b7fb9 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsGetExample.cs @@ -0,0 +1,44 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamSettingsGet(); + var company = response.Settings.Company; + var dataResidency = response.Settings.DataResidency; + + Console.WriteLine(response); + Console.WriteLine(response.TeamId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(dataResidency.Value); + Console.WriteLine(dataResidency.Type); + Console.WriteLine(dataResidency.Lock.Mode); + Console.WriteLine(dataResidency.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsUpdateExample.cs new file mode 100644 index 000000000..778d3451a --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSettingsUpdateExample.cs @@ -0,0 +1,40 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest( + dataResidency: new DataResidencySettingUpdate(value: DataResidency.Eu), + company: new StringSettingUpdate( + value: "Northwind", + lockMode: TeamSettingLock.OrganizationAdmins + ) + ); + + try + { + var response = new TeamApi(config).TeamSettingsUpdate( + teamSettingsUpdateRequest: teamSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsGetExample.java new file mode 100644 index 000000000..cb2003697 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class AccountSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + + System.out.println(response); + System.out.println(response.getAccountId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsUpdateExample.java new file mode 100644 index 000000000..7d800f81f --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountSettingsUpdateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; +import com.dropbox.sign.model.DateFormat; +import com.dropbox.sign.model.RequiredSignatureType; +import java.util.List; + +public class AccountSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest() + .dateFormat(DateFormat.MM_DD_YYYY) + .requiredSignatureTypes(List.of( + RequiredSignatureType.DRAW, + RequiredSignatureType.TYPE + )) + .shouldEnableTamperProof(false) + .unset(List.of("company")); + + try + { + var response = new AccountApi(config).accountSettingsUpdate( + accountSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsGetExample.java new file mode 100644 index 000000000..ca206d4d7 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsGetExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class TeamSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + SettingResponse dataResidency = response.getSettings().getDataResidency(); + + System.out.println(response); + System.out.println(response.getTeamId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(dataResidency.getValue()); + System.out.println(dataResidency.getType()); + System.out.println(dataResidency.getLock().getMode()); + System.out.println(dataResidency.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsUpdateExample.java new file mode 100644 index 000000000..8cb0dd71e --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSettingsUpdateExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.DataResidency; +import com.dropbox.sign.model.DataResidencySettingUpdate; +import com.dropbox.sign.model.StringSettingUpdate; +import com.dropbox.sign.model.TeamSettingLock; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; + +public class TeamSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest() + .dataResidency(new DataResidencySettingUpdate().value(DataResidency.EU)) + .company(new StringSettingUpdate() + .value("Northwind") + .lockMode(TeamSettingLock.ORGANIZATION_ADMINS)); + + try + { + var response = new TeamApi(config).teamSettingsUpdate( + teamSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsUpdate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/sandbox/node/src/AccountSettingsGetExample.ts b/sandbox/node/src/AccountSettingsGetExample.ts new file mode 100644 index 000000000..9f81ec8c5 --- /dev/null +++ b/sandbox/node/src/AccountSettingsGetExample.ts @@ -0,0 +1,28 @@ +import api from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountSettingsGet().then(response => { + const company = response.body.settings.company; + console.log(response.body); + console.log({ + accountId: response.body.accountId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/AccountSettingsUpdateExample.ts b/sandbox/node/src/AccountSettingsUpdateExample.ts new file mode 100644 index 000000000..2ebe2ad8c --- /dev/null +++ b/sandbox/node/src/AccountSettingsUpdateExample.ts @@ -0,0 +1,25 @@ +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountSettingsUpdateRequest: models.AccountSettingsUpdateRequest = { + dateFormat: models.DateFormat.MmDdYyyy, + requiredSignatureTypes: [ + models.RequiredSignatureType.Draw, + models.RequiredSignatureType.Type, + ], + shouldEnableTamperProof: false, + unset: ["company"], +}; + +apiCaller.accountSettingsUpdate( + accountSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamSettingsGetExample.ts b/sandbox/node/src/TeamSettingsGetExample.ts new file mode 100644 index 000000000..3e5a4ee4e --- /dev/null +++ b/sandbox/node/src/TeamSettingsGetExample.ts @@ -0,0 +1,40 @@ +import api from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSettingsGet().then(response => { + const company = response.body.settings.company; + const dataResidency = response.body.settings.dataResidency; + console.log(response.body); + console.log({ + teamId: response.body.teamId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + dataResidency: { + value: dataResidency.value, + isInherited: dataResidency.isInherited, + source: dataResidency.source, + type: dataResidency.type, + writable: dataResidency.writable, + lock: { + mode: dataResidency.lock.mode, + source: dataResidency.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamSettingsUpdateExample.ts b/sandbox/node/src/TeamSettingsUpdateExample.ts new file mode 100644 index 000000000..c5c7d454f --- /dev/null +++ b/sandbox/node/src/TeamSettingsUpdateExample.ts @@ -0,0 +1,25 @@ +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamSettingsUpdateRequest: models.TeamSettingsUpdateRequest = { + dataResidency: { + value: models.DataResidency.Eu, + }, + company: { + value: "Northwind", + lockMode: models.TeamSettingLock.OrganizationAdmins, + }, +}; + +apiCaller.teamSettingsUpdate( + teamSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/php/src/AccountSettingsGetExample.php b/sandbox/php/src/AccountSettingsGetExample.php new file mode 100644 index 000000000..b184119be --- /dev/null +++ b/sandbox/php/src/AccountSettingsGetExample.php @@ -0,0 +1,35 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsGet(); + $company = $response->getSettings()->getCompany(); + + print_r($response); + print_r([ + 'account_id' => $response->getAccountId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/AccountSettingsUpdateExample.php b/sandbox/php/src/AccountSettingsUpdateExample.php new file mode 100644 index 000000000..e1cd920fd --- /dev/null +++ b/sandbox/php/src/AccountSettingsUpdateExample.php @@ -0,0 +1,30 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$account_settings_update_request = (new Dropbox\Sign\Model\AccountSettingsUpdateRequest()) + ->setDateFormat(Dropbox\Sign\Model\DateFormat::MM_DD_YYYY) + ->setRequiredSignatureTypes([ + Dropbox\Sign\Model\RequiredSignatureType::DRAW, + Dropbox\Sign\Model\RequiredSignatureType::TYPE, + ]) + ->setShouldEnableTamperProof(false) + ->setUnset(['company']); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsUpdate( + account_settings_update_request: $account_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamSettingsGetExample.php b/sandbox/php/src/TeamSettingsGetExample.php new file mode 100644 index 000000000..3fb75bd9f --- /dev/null +++ b/sandbox/php/src/TeamSettingsGetExample.php @@ -0,0 +1,47 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsGet(); + $company = $response->getSettings()->getCompany(); + $data_residency = $response->getSettings()->getDataResidency(); + + print_r($response); + print_r([ + 'team_id' => $response->getTeamId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'data_residency' => [ + 'value' => $data_residency->getValue(), + 'is_inherited' => $data_residency->getIsInherited(), + 'source' => $data_residency->getSource(), + 'type' => $data_residency->getType(), + 'writable' => $data_residency->getWritable(), + 'lock' => [ + 'mode' => $data_residency->getLock()->getMode(), + 'source' => $data_residency->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamSettingsUpdateExample.php b/sandbox/php/src/TeamSettingsUpdateExample.php new file mode 100644 index 000000000..3666aa63f --- /dev/null +++ b/sandbox/php/src/TeamSettingsUpdateExample.php @@ -0,0 +1,28 @@ +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$team_settings_update_request = (new Dropbox\Sign\Model\TeamSettingsUpdateRequest()) + ->setDataResidency((new Dropbox\Sign\Model\DataResidencySettingUpdate()) + ->setValue(Dropbox\Sign\Model\DataResidency::EU)) + ->setCompany((new Dropbox\Sign\Model\StringSettingUpdate()) + ->setValue('Northwind') + ->setLockMode(Dropbox\Sign\Model\TeamSettingLock::ORGANIZATION_ADMINS)); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsUpdate( + team_settings_update_request: $team_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/python/src/AccountSettingsGetExample.py b/sandbox/python/src/AccountSettingsGetExample.py new file mode 100644 index 000000000..1a00db47b --- /dev/null +++ b/sandbox/python/src/AccountSettingsGetExample.py @@ -0,0 +1,32 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_settings_get() + company = response.settings.company + + pprint(response) + pprint({ + "account_id": response.account_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "warnings": response.warnings, + }) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_get: %s\n" % e) diff --git a/sandbox/python/src/AccountSettingsUpdateExample.py b/sandbox/python/src/AccountSettingsUpdateExample.py new file mode 100644 index 000000000..be0afdda2 --- /dev/null +++ b/sandbox/python/src/AccountSettingsUpdateExample.py @@ -0,0 +1,28 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_settings_update_request = models.AccountSettingsUpdateRequest( + date_format=models.DateFormat.MM_SLASH_DD_SLASH_YYYY, + required_signature_types=[ + models.RequiredSignatureType.DRAW, + models.RequiredSignatureType.TYPE, + ], + should_enable_tamper_proof=False, + unset=["company"], + ) + + try: + response = api.AccountApi(api_client).account_settings_update( + account_settings_update_request=account_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_update: %s\n" % e) diff --git a/sandbox/python/src/TeamSettingsGetExample.py b/sandbox/python/src/TeamSettingsGetExample.py new file mode 100644 index 000000000..f7bd31619 --- /dev/null +++ b/sandbox/python/src/TeamSettingsGetExample.py @@ -0,0 +1,44 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_settings_get() + company = response.settings.company + data_residency = response.settings.data_residency + + pprint(response) + pprint({ + "team_id": response.team_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "data_residency": { + "value": data_residency.value, + "is_inherited": data_residency.is_inherited, + "source": data_residency.source, + "type": data_residency.type, + "writable": data_residency.writable, + "lock": { + "mode": data_residency.lock.mode, + "source": data_residency.lock.source, + }, + }, + "warnings": response.warnings, + }) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_get: %s\n" % e) diff --git a/sandbox/python/src/TeamSettingsUpdateExample.py b/sandbox/python/src/TeamSettingsUpdateExample.py new file mode 100644 index 000000000..23ad4eb40 --- /dev/null +++ b/sandbox/python/src/TeamSettingsUpdateExample.py @@ -0,0 +1,28 @@ +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_settings_update_request = models.TeamSettingsUpdateRequest( + data_residency=models.DataResidencySettingUpdate( + value=models.DataResidency.EU, + ), + company=models.StringSettingUpdate( + value="Northwind", + lock_mode=models.TeamSettingLock.ORGANIZATION_ADMINS, + ), + ) + + try: + response = api.TeamApi(api_client).team_settings_update( + team_settings_update_request=team_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_update: %s\n" % e) diff --git a/sandbox/ruby/src/AccountSettingsGetExample.rb b/sandbox/ruby/src/AccountSettingsGetExample.rb new file mode 100644 index 000000000..0edd391be --- /dev/null +++ b/sandbox/ruby/src/AccountSettingsGetExample.rb @@ -0,0 +1,30 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_get + company = response.settings.company + + p response + p({ + account_id: response.account_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_get: #{e}" +end diff --git a/sandbox/ruby/src/AccountSettingsUpdateExample.rb b/sandbox/ruby/src/AccountSettingsUpdateExample.rb new file mode 100644 index 000000000..74204fb7e --- /dev/null +++ b/sandbox/ruby/src/AccountSettingsUpdateExample.rb @@ -0,0 +1,25 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_settings_update_request = Dropbox::Sign::AccountSettingsUpdateRequest.new +account_settings_update_request.date_format = Dropbox::Sign::DateFormat::MM_DD_YYYY +account_settings_update_request.required_signature_types = [ + Dropbox::Sign::RequiredSignatureType::DRAW, + Dropbox::Sign::RequiredSignatureType::TYPE, +] +account_settings_update_request.should_enable_tamper_proof = false +account_settings_update_request.unset = ["company"] + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_update( + account_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_update: #{e}" +end diff --git a/sandbox/ruby/src/TeamSettingsGetExample.rb b/sandbox/ruby/src/TeamSettingsGetExample.rb new file mode 100644 index 000000000..02105ac6d --- /dev/null +++ b/sandbox/ruby/src/TeamSettingsGetExample.rb @@ -0,0 +1,42 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_get + company = response.settings.company + data_residency = response.settings.data_residency + + p response + p({ + team_id: response.team_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + data_residency: { + value: data_residency.value, + is_inherited: data_residency.is_inherited, + source: data_residency.source, + type: data_residency.type, + writable: data_residency.writable, + lock: { + mode: data_residency.lock.mode, + source: data_residency.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_get: #{e}" +end diff --git a/sandbox/ruby/src/TeamSettingsUpdateExample.rb b/sandbox/ruby/src/TeamSettingsUpdateExample.rb new file mode 100644 index 000000000..996ec0e5a --- /dev/null +++ b/sandbox/ruby/src/TeamSettingsUpdateExample.rb @@ -0,0 +1,23 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_settings_update_request = Dropbox::Sign::TeamSettingsUpdateRequest.new +team_settings_update_request.data_residency = Dropbox::Sign::DataResidencySettingUpdate.new +team_settings_update_request.data_residency.value = Dropbox::Sign::DataResidency::EU +team_settings_update_request.company = Dropbox::Sign::StringSettingUpdate.new +team_settings_update_request.company.value = "Northwind" +team_settings_update_request.company.lock_mode = Dropbox::Sign::TeamSettingLock::ORGANIZATION_ADMINS + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_update( + team_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_update: #{e}" +end diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index ae722c1ef..cfcb8d6b1 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -133,6 +133,8 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountApi* | [**AccountCreate**](docs/AccountApi.md#accountcreate) | **POST** /account/create | Create Account *AccountApi* | [**AccountGet**](docs/AccountApi.md#accountget) | **GET** /account | Get Account +*AccountApi* | [**AccountSettingsGet**](docs/AccountApi.md#accountsettingsget) | **GET** /account/settings | Get account settings +*AccountApi* | [**AccountSettingsUpdate**](docs/AccountApi.md#accountsettingsupdate) | **POST** /account/settings | Modify account settings *AccountApi* | [**AccountUpdate**](docs/AccountApi.md#accountupdate) | **PUT** /account | Update Account *AccountApi* | [**AccountVerify**](docs/AccountApi.md#accountverify) | **POST** /account/verify | Verify Account *ApiAppApi* | [**ApiAppCreate**](docs/ApiAppApi.md#apiappcreate) | **POST** /api_app | Create API App @@ -188,6 +190,8 @@ Class | Method | HTTP request | Description *TeamApi* | [**TeamInvites**](docs/TeamApi.md#teaminvites) | **GET** /team/invites | List Team Invites *TeamApi* | [**TeamMembers**](docs/TeamApi.md#teammembers) | **GET** /team/members/{team_id} | List Team Members *TeamApi* | [**TeamRemoveMember**](docs/TeamApi.md#teamremovemember) | **POST** /team/remove_member | Remove User from Team +*TeamApi* | [**TeamSettingsGet**](docs/TeamApi.md#teamsettingsget) | **GET** /team/settings | Get team settings +*TeamApi* | [**TeamSettingsUpdate**](docs/TeamApi.md#teamsettingsupdate) | **POST** /team/settings | Modify team settings *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 @@ -217,6 +221,9 @@ Class | Method | HTTP request | Description - [Model.AccountResponseQuotas](docs/AccountResponseQuotas.md) - [Model.AccountResponseSettings](docs/AccountResponseSettings.md) - [Model.AccountResponseUsage](docs/AccountResponseUsage.md) + - [Model.AccountSettingsResponse](docs/AccountSettingsResponse.md) + - [Model.AccountSettingsResponseSettings](docs/AccountSettingsResponseSettings.md) + - [Model.AccountSettingsUpdateRequest](docs/AccountSettingsUpdateRequest.md) - [Model.AccountUpdateRequest](docs/AccountUpdateRequest.md) - [Model.AccountVerifyRequest](docs/AccountVerifyRequest.md) - [Model.AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -230,11 +237,16 @@ Class | Method | HTTP request | Description - [Model.ApiAppResponseOwnerAccount](docs/ApiAppResponseOwnerAccount.md) - [Model.ApiAppResponseWhiteLabelingOptions](docs/ApiAppResponseWhiteLabelingOptions.md) - [Model.ApiAppUpdateRequest](docs/ApiAppUpdateRequest.md) + - [Model.BooleanSettingUpdate](docs/BooleanSettingUpdate.md) - [Model.BulkSendJobGetResponse](docs/BulkSendJobGetResponse.md) - [Model.BulkSendJobGetResponseSignatureRequests](docs/BulkSendJobGetResponseSignatureRequests.md) - [Model.BulkSendJobListResponse](docs/BulkSendJobListResponse.md) - [Model.BulkSendJobResponse](docs/BulkSendJobResponse.md) - [Model.BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md) + - [Model.DataResidency](docs/DataResidency.md) + - [Model.DataResidencySettingUpdate](docs/DataResidencySettingUpdate.md) + - [Model.DateFormat](docs/DateFormat.md) + - [Model.DateFormatSettingUpdate](docs/DateFormatSettingUpdate.md) - [Model.DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md) - [Model.DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md) - [Model.DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md) @@ -273,6 +285,10 @@ Class | Method | HTTP request | Description - [Model.ReportCreateRequest](docs/ReportCreateRequest.md) - [Model.ReportCreateResponse](docs/ReportCreateResponse.md) - [Model.ReportResponse](docs/ReportResponse.md) + - [Model.RequiredSignatureType](docs/RequiredSignatureType.md) + - [Model.RequiredSignatureTypesSettingUpdate](docs/RequiredSignatureTypesSettingUpdate.md) + - [Model.SettingLockResponse](docs/SettingLockResponse.md) + - [Model.SettingResponse](docs/SettingResponse.md) - [Model.SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [Model.SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [Model.SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) @@ -305,6 +321,7 @@ Class | Method | HTTP request | Description - [Model.SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [Model.SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [Model.SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) + - [Model.StringSettingUpdate](docs/StringSettingUpdate.md) - [Model.SubAttachment](docs/SubAttachment.md) - [Model.SubBulkSignerList](docs/SubBulkSignerList.md) - [Model.SubBulkSignerListCustomField](docs/SubBulkSignerListCustomField.md) @@ -353,6 +370,10 @@ Class | Method | HTTP request | Description - [Model.TeamParentResponse](docs/TeamParentResponse.md) - [Model.TeamRemoveMemberRequest](docs/TeamRemoveMemberRequest.md) - [Model.TeamResponse](docs/TeamResponse.md) + - [Model.TeamSettingLock](docs/TeamSettingLock.md) + - [Model.TeamSettingsResponse](docs/TeamSettingsResponse.md) + - [Model.TeamSettingsResponseSettings](docs/TeamSettingsResponseSettings.md) + - [Model.TeamSettingsUpdateRequest](docs/TeamSettingsUpdateRequest.md) - [Model.TeamSubTeamsResponse](docs/TeamSubTeamsResponse.md) - [Model.TeamUpdateRequest](docs/TeamUpdateRequest.md) - [Model.TemplateAddUserRequest](docs/TemplateAddUserRequest.md) diff --git a/sdks/dotnet/docs/AccountApi.md b/sdks/dotnet/docs/AccountApi.md index f62f83365..61ccaddc0 100644 --- a/sdks/dotnet/docs/AccountApi.md +++ b/sdks/dotnet/docs/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to *https://api.hellosign.com/v3* |--------|--------------|-------------| | [**AccountCreate**](AccountApi.md#accountcreate) | **POST** /account/create | Create Account | | [**AccountGet**](AccountApi.md#accountget) | **GET** /account | Get Account | +| [**AccountSettingsGet**](AccountApi.md#accountsettingsget) | **GET** /account/settings | Get account settings | +| [**AccountSettingsUpdate**](AccountApi.md#accountsettingsupdate) | **POST** /account/settings | Modify account settings | | [**AccountUpdate**](AccountApi.md#accountupdate) | **PUT** /account | Update Account | | [**AccountVerify**](AccountApi.md#accountverify) | **POST** /account/verify | Verify Account | @@ -196,6 +198,212 @@ catch (ApiException e) - **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) + + +# **AccountSettingsGet** +> AccountSettingsResponse AccountSettingsGet (string? accountId = null) + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example +```csharp +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountSettingsGet(); + var company = response.Settings.Company; + + Console.WriteLine(response); + Console.WriteLine(response.AccountId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the AccountSettingsGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get account settings + ApiResponse response = apiInstance.AccountSettingsGetWithHttpInfo(accountId); + 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 AccountApi.AccountSettingsGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **accountId** | **string?** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **AccountSettingsUpdate** +> AccountSettingsResponse AccountSettingsUpdate (AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = null) + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example +```csharp +using System; +using System.Collections.Generic; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest( + dateFormat: DateFormat.MMDDYYYY, + requiredSignatureTypes: new List() + { + RequiredSignatureType.Draw, + RequiredSignatureType.Type, + }, + shouldEnableTamperProof: false, + unset: new List() { "company" } + ); + + try + { + var response = new AccountApi(config).AccountSettingsUpdate( + accountSettingsUpdateRequest: accountSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the AccountSettingsUpdateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Modify account settings + ApiResponse response = apiInstance.AccountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId); + 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 AccountApi.AccountSettingsUpdateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **accountSettingsUpdateRequest** | [**AccountSettingsUpdateRequest**](AccountSettingsUpdateRequest.md) | | | +| **accountId** | **string?** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| diff --git a/sdks/dotnet/docs/AccountSettingsResponse.md b/sdks/dotnet/docs/AccountSettingsResponse.md new file mode 100644 index 000000000..6d8b89a19 --- /dev/null +++ b/sdks/dotnet/docs/AccountSettingsResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.AccountSettingsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | **string** | | **Settings** | [**AccountSettingsResponseSettings**](AccountSettingsResponseSettings.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/AccountSettingsResponseSettings.md b/sdks/dotnet/docs/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..9200e7431 --- /dev/null +++ b/sdks/dotnet/docs/AccountSettingsResponseSettings.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.AccountSettingsResponseSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Company** | [**SettingResponse**](SettingResponse.md) | Company name associated with this account or team. | **CustomSigningRedirectEnabled** | [**SettingResponse**](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | **CustomSigningRedirectUrl** | [**SettingResponse**](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | **CustomTagline** | [**SettingResponse**](SettingResponse.md) | Custom tagline displayed with the account or team branding. | **DateFormat** | [**SettingResponse**](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | **IsSignatureRemindersEnabled** | [**SettingResponse**](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | **RequestEmailFrom** | [**SettingResponse**](SettingResponse.md) | Sender name shown on signature request emails. | **RequestEmailSignature** | [**SettingResponse**](SettingResponse.md) | Signature appended to signature request emails. | **RequiredSignatureTypes** | [**SettingResponse**](SettingResponse.md) | Signature creation methods signers may use. | **ShouldEnableTamperProof** | [**SettingResponse**](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | **ShouldIncludeDistinctPdfs** | [**SettingResponse**](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | **ShouldOfferSignerAccessCode** | [**SettingResponse**](SettingResponse.md) | Whether senders can require an access code to verify a signer. | **ShouldOfferSignerSmsAuthentication** | [**SettingResponse**](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | **ShouldRemoveDocumentId** | [**SettingResponse**](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | **IsNotifyOnSignEnabled** | [**SettingResponse**](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | **IsNotifyOnViewEnabled** | [**SettingResponse**](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | **ShouldAutocomplete** | [**SettingResponse**](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | **ShouldIncludeRequestedPdfs** | [**SettingResponse**](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | **ShouldIncludeRequestedPdfsForOthers** | [**SettingResponse**](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | **ShouldIncludeSentDocPdfs** | [**SettingResponse**](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | **ShouldIncludeSentDocPdfsForOthers** | [**SettingResponse**](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | **ShouldSendDailySummary** | [**SettingResponse**](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | **ShouldSendEmbeddedSignatureConfEmails** | [**SettingResponse**](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | **ShouldSendOrderedSrEmail** | [**SettingResponse**](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | **ShouldSendOutboundConfEmails** | [**SettingResponse**](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | **TemplateLinkSignatureEmailsEnabled** | [**SettingResponse**](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | + +[[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/AccountSettingsUpdateRequest.md b/sdks/dotnet/docs/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..73ea47910 --- /dev/null +++ b/sdks/dotnet/docs/AccountSettingsUpdateRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.AccountSettingsUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Company** | **string** | Company name associated with this account or team. | [optional] **CustomSigningRedirectEnabled** | **bool** | Whether signers are redirected to a custom URL after completing a signature request. | [optional] **CustomSigningRedirectUrl** | **string** | URL where signers are redirected after completing a signature request when custom redirects are enabled. | [optional] **CustomTagline** | **string** | Custom tagline displayed with the account or team branding. | [optional] **DateFormat** | **DateFormat** | | [optional] **IsSignatureRemindersEnabled** | **bool** | Whether automatic reminder emails are enabled for incomplete signature requests. | [optional] **RequestEmailFrom** | **string** | Sender name shown on signature request emails. | [optional] **RequestEmailSignature** | **string** | Signature appended to signature request emails. | [optional] **RequiredSignatureTypes** | [**List<RequiredSignatureType>**](RequiredSignatureType.md) | Signature creation methods signers may use. | [optional] **ShouldEnableTamperProof** | **bool** | Whether completed documents include a digital tamper-proof seal. | [optional] **ShouldIncludeDistinctPdfs** | **bool** | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | [optional] **ShouldOfferSignerAccessCode** | **bool** | Whether senders can require an access code to verify a signer. | [optional] **ShouldOfferSignerSmsAuthentication** | **bool** | Whether senders can require SMS authentication to verify a signer. | [optional] **ShouldRemoveDocumentId** | **bool** | Whether the Dropbox Sign document ID is hidden on sent documents. | [optional] **IsNotifyOnSignEnabled** | **bool** | Whether to notify the account when someone signs a document it sent. | [optional] **IsNotifyOnViewEnabled** | **bool** | Whether to notify the account when someone opens a document it sent. | [optional] **ShouldAutocomplete** | **bool** | Whether values entered in text fields are saved and suggested for future signature requests. | [optional] **ShouldIncludeRequestedPdfs** | **bool** | Whether completed signature requests include PDF copies in emails sent to the account. | [optional] **ShouldIncludeRequestedPdfsForOthers** | **bool** | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | [optional] **ShouldIncludeSentDocPdfs** | **bool** | Whether emails sent to the account include PDF copies of documents it sends. | [optional] **ShouldIncludeSentDocPdfsForOthers** | **bool** | Whether emails sent to recipients include PDF copies of documents the account sends. | [optional] **ShouldSendDailySummary** | **bool** | Whether to send the account a daily email summarizing outstanding signature requests. | [optional] **ShouldSendEmbeddedSignatureConfEmails** | **bool** | Whether to notify the account when it signs a document on a third-party site. | [optional] **ShouldSendOrderedSrEmail** | **bool** | Whether to notify all parties when an ordered signature request starts. | [optional] **ShouldSendOutboundConfEmails** | **bool** | Whether to notify the account when it signs and sends a document. | [optional] **TemplateLinkSignatureEmailsEnabled** | **bool** | Whether to notify the account when someone signs a document sent by its team through a template link. | [optional] **Unset** | **List<AccountSettingsUpdateRequest.UnsetEnum>** | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | [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/BooleanSettingUpdate.md b/sdks/dotnet/docs/BooleanSettingUpdate.md new file mode 100644 index 000000000..0db922b6d --- /dev/null +++ b/sdks/dotnet/docs/BooleanSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.BooleanSettingUpdate +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **bool** | Boolean value to store. | [optional] **LockMode** | **TeamSettingLock** | | [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/DataResidency.md b/sdks/dotnet/docs/DataResidency.md new file mode 100644 index 000000000..63737e7f2 --- /dev/null +++ b/sdks/dotnet/docs/DataResidency.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.DataResidency +Storage region for team documents. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/DataResidencySettingUpdate.md b/sdks/dotnet/docs/DataResidencySettingUpdate.md new file mode 100644 index 000000000..82778b885 --- /dev/null +++ b/sdks/dotnet/docs/DataResidencySettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.DataResidencySettingUpdate +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **DataResidency** | | [optional] **LockMode** | **TeamSettingLock** | | [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/DateFormat.md b/sdks/dotnet/docs/DateFormat.md new file mode 100644 index 000000000..38f119a9a --- /dev/null +++ b/sdks/dotnet/docs/DateFormat.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.DateFormat +Date format used to display dates. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/DateFormatSettingUpdate.md b/sdks/dotnet/docs/DateFormatSettingUpdate.md new file mode 100644 index 000000000..158169541 --- /dev/null +++ b/sdks/dotnet/docs/DateFormatSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.DateFormatSettingUpdate +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **DateFormat** | | [optional] **LockMode** | **TeamSettingLock** | | [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/RequiredSignatureType.md b/sdks/dotnet/docs/RequiredSignatureType.md new file mode 100644 index 000000000..82e3af5b3 --- /dev/null +++ b/sdks/dotnet/docs/RequiredSignatureType.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.RequiredSignatureType +A signature creation method a signer may use. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/RequiredSignatureTypesSettingUpdate.md b/sdks/dotnet/docs/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..c08dc81ed --- /dev/null +++ b/sdks/dotnet/docs/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.RequiredSignatureTypesSettingUpdate +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | [**List<RequiredSignatureType>**](RequiredSignatureType.md) | Signature creation methods signers may use. | [optional] **LockMode** | **TeamSettingLock** | | [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/SettingLockResponse.md b/sdks/dotnet/docs/SettingLockResponse.md new file mode 100644 index 000000000..c1154a456 --- /dev/null +++ b/sdks/dotnet/docs/SettingLockResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SettingLockResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | **TeamSettingLock** | | **Source** | **string** | | + +[[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/SettingResponse.md b/sdks/dotnet/docs/SettingResponse.md new file mode 100644 index 000000000..e1435197c --- /dev/null +++ b/sdks/dotnet/docs/SettingResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SettingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **Object** | Current value of the setting. Null when the setting has no value. | **IsInherited** | **bool** | | **Source** | **string** | | **Type** | **string** | | **Writable** | **bool** | | **Lock** | [**SettingLockResponse**](SettingLockResponse.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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 5d61e0f69..ea4693196 100644 --- a/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md index 546578d42..58afb5fbc 100644 --- a/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/dotnet/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | _t__SignatureRequestBulkSendWithTemplate::METADATA | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/StringSettingUpdate.md b/sdks/dotnet/docs/StringSettingUpdate.md new file mode 100644 index 000000000..d6e49148f --- /dev/null +++ b/sdks/dotnet/docs/StringSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.StringSettingUpdate +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | String value to store. | [optional] **LockMode** | **TeamSettingLock** | | [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/SubBulkSignerList.md b/sdks/dotnet/docs/SubBulkSignerList.md index c256792ff..08120acfe 100644 --- a/sdks/dotnet/docs/SubBulkSignerList.md +++ b/sdks/dotnet/docs/SubBulkSignerList.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CustomFields** | [**List<SubBulkSignerListCustomField>**](SubBulkSignerListCustomField.md) | An array of custom field values. | [optional] **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | [optional] +**CustomFields** | [**List<SubBulkSignerListCustomField>**](SubBulkSignerListCustomField.md) | An array of custom field values. | [optional] **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | [optional] **Metadata** | **Dictionary<string, Object>** | _t__Sub::BulkSigner::METADATA | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/TeamApi.md b/sdks/dotnet/docs/TeamApi.md index 2e5e8784f..c30367114 100644 --- a/sdks/dotnet/docs/TeamApi.md +++ b/sdks/dotnet/docs/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**TeamInvites**](TeamApi.md#teaminvites) | **GET** /team/invites | List Team Invites | | [**TeamMembers**](TeamApi.md#teammembers) | **GET** /team/members/{team_id} | List Team Members | | [**TeamRemoveMember**](TeamApi.md#teamremovemember) | **POST** /team/remove_member | Remove User from Team | +| [**TeamSettingsGet**](TeamApi.md#teamsettingsget) | **GET** /team/settings | Get team settings | +| [**TeamSettingsUpdate**](TeamApi.md#teamsettingsupdate) | **POST** /team/settings | Modify team settings | | [**TeamSubTeams**](TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | [**TeamUpdate**](TeamApi.md#teamupdate) | **PUT** /team | Update Team | @@ -783,6 +785,213 @@ catch (ApiException e) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **TeamSettingsGet** +> TeamSettingsResponse TeamSettingsGet (string? teamId = null) + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example +```csharp +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamSettingsGet(); + var company = response.Settings.Company; + var dataResidency = response.Settings.DataResidency; + + Console.WriteLine(response); + Console.WriteLine(response.TeamId); + Console.WriteLine(company.Value); + Console.WriteLine(company.IsInherited); + Console.WriteLine(company.Source); + Console.WriteLine(company.Type); + Console.WriteLine(company.Writable); + Console.WriteLine(company.Lock.Mode); + Console.WriteLine(company.Lock.Source); + Console.WriteLine(dataResidency.Value); + Console.WriteLine(dataResidency.Type); + Console.WriteLine(dataResidency.Lock.Mode); + Console.WriteLine(dataResidency.Lock.Source); + Console.WriteLine(response.Warnings); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the TeamSettingsGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get team settings + ApiResponse response = apiInstance.TeamSettingsGetWithHttpInfo(teamId); + 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 TeamApi.TeamSettingsGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **teamId** | **string?** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TeamSettingsUpdate** +> TeamSettingsResponse TeamSettingsUpdate (TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = null) + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example +```csharp +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamSettingsUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest( + dataResidency: new DataResidencySettingUpdate(value: DataResidency.Eu), + company: new StringSettingUpdate( + value: "Northwind", + lockMode: TeamSettingLock.OrganizationAdmins + ) + ); + + try + { + var response = new TeamApi(config).TeamSettingsUpdate( + teamSettingsUpdateRequest: teamSettingsUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSettingsUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the TeamSettingsUpdateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Modify team settings + ApiResponse response = apiInstance.TeamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId); + 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 TeamApi.TeamSettingsUpdateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **teamSettingsUpdateRequest** | [**TeamSettingsUpdateRequest**](TeamSettingsUpdateRequest.md) | | | +| **teamId** | **string?** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **TeamSubTeams** > TeamSubTeamsResponse TeamSubTeams (string teamId, int? page = null, int? pageSize = null) diff --git a/sdks/dotnet/docs/TeamCreateRequest.md b/sdks/dotnet/docs/TeamCreateRequest.md index e3727b07c..7759475d5 100644 --- a/sdks/dotnet/docs/TeamCreateRequest.md +++ b/sdks/dotnet/docs/TeamCreateRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of your Team. | [optional] [default to "Untitled Team"] +**Name** | **string** | The name of your Team. | [optional] [default to "Untitled Team"]**ParentTeamId** | **string** | _t__TeamCreate::PARENT_TEAM_ID | [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/TeamResponse.md b/sdks/dotnet/docs/TeamResponse.md index 977696c0a..c578a4581 100644 --- a/sdks/dotnet/docs/TeamResponse.md +++ b/sdks/dotnet/docs/TeamResponse.md @@ -5,7 +5,7 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of your Team | [optional] **Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] **InvitedAccounts** | [**List<AccountResponse>**](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | [optional] **InvitedEmails** | **List<string>** | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | [optional] +**TeamId** | **string** | The id of a team | [optional] **ParentTeamId** | **string** | _t__Team::PARENT_TEAM_ID | [optional] **Name** | **string** | The name of your Team | [optional] **Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [optional] **InvitedAccounts** | [**List<AccountResponse>**](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | [optional] **InvitedEmails** | **List<string>** | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | [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/TeamSettingLock.md b/sdks/dotnet/docs/TeamSettingLock.md new file mode 100644 index 000000000..75ed9a02c --- /dev/null +++ b/sdks/dotnet/docs/TeamSettingLock.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.TeamSettingLock +Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/TeamSettingsResponse.md b/sdks/dotnet/docs/TeamSettingsResponse.md new file mode 100644 index 000000000..084a19289 --- /dev/null +++ b/sdks/dotnet/docs/TeamSettingsResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.TeamSettingsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TeamId** | **string** | | **Settings** | [**TeamSettingsResponseSettings**](TeamSettingsResponseSettings.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/TeamSettingsResponseSettings.md b/sdks/dotnet/docs/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..5bdd73e76 --- /dev/null +++ b/sdks/dotnet/docs/TeamSettingsResponseSettings.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.TeamSettingsResponseSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Company** | [**SettingResponse**](SettingResponse.md) | Company name associated with this account or team. | **CustomSigningRedirectEnabled** | [**SettingResponse**](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | **CustomSigningRedirectUrl** | [**SettingResponse**](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | **CustomTagline** | [**SettingResponse**](SettingResponse.md) | Custom tagline displayed with the account or team branding. | **DateFormat** | [**SettingResponse**](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | **IsSignatureRemindersEnabled** | [**SettingResponse**](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | **RequestEmailFrom** | [**SettingResponse**](SettingResponse.md) | Sender name shown on signature request emails. | **RequestEmailSignature** | [**SettingResponse**](SettingResponse.md) | Signature appended to signature request emails. | **RequiredSignatureTypes** | [**SettingResponse**](SettingResponse.md) | Signature creation methods signers may use. | **ShouldEnableTamperProof** | [**SettingResponse**](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | **ShouldIncludeDistinctPdfs** | [**SettingResponse**](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | **ShouldOfferSignerAccessCode** | [**SettingResponse**](SettingResponse.md) | Whether senders can require an access code to verify a signer. | **ShouldOfferSignerSmsAuthentication** | [**SettingResponse**](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | **ShouldRemoveDocumentId** | [**SettingResponse**](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | **DataResidency** | [**SettingResponse**](SettingResponse.md) | Storage region for team documents. | **AllowTeamDeleteDocumentForEveryone** | [**SettingResponse**](SettingResponse.md) | Whether team members can delete a document for all participants. | **AllowTeamDownloadCsv** | [**SettingResponse**](SettingResponse.md) | Whether team members can download CSV files. | **LockTeamTemplateCreation** | [**SettingResponse**](SettingResponse.md) | Whether team members are prevented from creating templates. | **LockTeamTemplateGallery** | [**SettingResponse**](SettingResponse.md) | Whether team members are prevented from using the template gallery. | **SelfSignMessage** | [**SettingResponse**](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | **SelfSignTitle** | [**SettingResponse**](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | **SignatureRequestMessage** | [**SettingResponse**](SettingResponse.md) | Default message enforced for team members when they create signature requests. | **SignatureRequestTitle** | [**SettingResponse**](SettingResponse.md) | Default title enforced for team members when they create signature requests. | **MultifactorAuthApp** | [**SettingResponse**](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | **MultifactorAuthSms** | [**SettingResponse**](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | + +[[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/TeamSettingsUpdateRequest.md b/sdks/dotnet/docs/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..3ed02e2b9 --- /dev/null +++ b/sdks/dotnet/docs/TeamSettingsUpdateRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.TeamSettingsUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Company** | [**StringSettingUpdate**](StringSettingUpdate.md) | Company name associated with this account or team. | [optional] **CustomSigningRedirectEnabled** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | [optional] **CustomSigningRedirectUrl** | [**StringSettingUpdate**](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | [optional] **CustomTagline** | [**StringSettingUpdate**](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | [optional] **DateFormat** | [**DateFormatSettingUpdate**](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | [optional] **IsSignatureRemindersEnabled** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | [optional] **RequestEmailFrom** | [**StringSettingUpdate**](StringSettingUpdate.md) | Sender name shown on signature request emails. | [optional] **RequestEmailSignature** | [**StringSettingUpdate**](StringSettingUpdate.md) | Signature appended to signature request emails. | [optional] **RequiredSignatureTypes** | [**RequiredSignatureTypesSettingUpdate**](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | [optional] **ShouldEnableTamperProof** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | [optional] **ShouldIncludeDistinctPdfs** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | [optional] **ShouldOfferSignerAccessCode** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | [optional] **ShouldOfferSignerSmsAuthentication** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | [optional] **ShouldRemoveDocumentId** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | [optional] **DataResidency** | [**DataResidencySettingUpdate**](DataResidencySettingUpdate.md) | Storage region for team documents. | [optional] **AllowTeamDeleteDocumentForEveryone** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | [optional] **AllowTeamDownloadCsv** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether team members can download CSV files. | [optional] **LockTeamTemplateCreation** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | [optional] **LockTeamTemplateGallery** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | [optional] **SelfSignMessage** | [**StringSettingUpdate**](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | [optional] **SelfSignTitle** | [**StringSettingUpdate**](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | [optional] **SignatureRequestMessage** | [**StringSettingUpdate**](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | [optional] **SignatureRequestTitle** | [**StringSettingUpdate**](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | [optional] **MultifactorAuthApp** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | [optional] **MultifactorAuthSms** | [**BooleanSettingUpdate**](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | [optional] **Unset** | **List<TeamSettingsUpdateRequest.UnsetEnum>** | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | [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/src/Dropbox.Sign/Api/AccountApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs index 1a06b0003..052a486c2 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/AccountApi.cs @@ -80,6 +80,58 @@ public interface IAccountApiSync : IApiAccessor /// ApiResponse of AccountGetResponse ApiResponse AccountGetWithHttpInfo(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0); /// + /// Get account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// AccountSettingsResponse + AccountSettingsResponse AccountSettingsGet(string? accountId = default(string?), int operationIndex = 0); + + /// + /// Get account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// ApiResponse of AccountSettingsResponse + ApiResponse AccountSettingsGetWithHttpInfo(string? accountId = default(string?), int operationIndex = 0); + /// + /// Modify account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// AccountSettingsResponse + AccountSettingsResponse AccountSettingsUpdate(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0); + + /// + /// Modify account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// ApiResponse of AccountSettingsResponse + ApiResponse AccountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0); + /// /// Update Account /// /// @@ -195,6 +247,62 @@ public interface IAccountApiAsync : IApiAccessor /// Task of ApiResponse (AccountGetResponse) System.Threading.Tasks.Task> AccountGetWithHttpInfoAsync(string? accountId = default(string?), string? emailAddress = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// + /// Get account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AccountSettingsResponse + System.Threading.Tasks.Task AccountSettingsGetAsync(string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Get account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AccountSettingsResponse) + System.Threading.Tasks.Task> AccountSettingsGetWithHttpInfoAsync(string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Modify account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AccountSettingsResponse + System.Threading.Tasks.Task AccountSettingsUpdateAsync(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Modify account settings + /// + /// + /// account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AccountSettingsResponse) + System.Threading.Tasks.Task> AccountSettingsUpdateWithHttpInfoAsync(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// /// Update Account /// /// @@ -734,6 +842,372 @@ public Dropbox.Sign.Client.ApiResponse AccountCreateWithH return localVarResponse; } + /// + /// Get account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// AccountSettingsResponse + public AccountSettingsResponse AccountSettingsGet(string? accountId = default(string?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = AccountSettingsGetWithHttpInfo(accountId); + return localVarResponse.Data; + } + + /// + /// Get account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// ApiResponse of AccountSettingsResponse + public Dropbox.Sign.Client.ApiResponse AccountSettingsGetWithHttpInfo(string? accountId = default(string?), 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 (accountId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "account_id", accountId)); + } + + localVarRequestOptions.Operation = "AccountApi.AccountSettingsGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/account/settings", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AccountSettingsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AccountSettingsResponse + public async System.Threading.Tasks.Task AccountSettingsGetAsync(string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountSettingsGetWithHttpInfoAsync(accountId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AccountSettingsResponse) + public async System.Threading.Tasks.Task> AccountSettingsGetWithHttpInfoAsync(string? accountId = default(string?), 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 (accountId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "account_id", accountId)); + } + + localVarRequestOptions.Operation = "AccountApi.AccountSettingsGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/account/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AccountSettingsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Modify account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// AccountSettingsResponse + public AccountSettingsResponse AccountSettingsUpdate(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = AccountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId); + return localVarResponse.Data; + } + + /// + /// Modify account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// ApiResponse of AccountSettingsResponse + public Dropbox.Sign.Client.ApiResponse AccountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0) + { + // verify the required parameter 'accountSettingsUpdateRequest' is set + if (accountSettingsUpdateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'accountSettingsUpdateRequest' when calling AccountApi->AccountSettingsUpdate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = accountSettingsUpdateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = accountSettingsUpdateRequest; + } + + // 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 (accountId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "account_id", accountId)); + } + + localVarRequestOptions.Operation = "AccountApi.AccountSettingsUpdate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/account/settings", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AccountSettingsUpdate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Modify account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of AccountSettingsResponse + public async System.Threading.Tasks.Task AccountSettingsUpdateAsync(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await AccountSettingsUpdateWithHttpInfoAsync(accountSettingsUpdateRequest, accountId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Modify account settings account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/AccountSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (AccountSettingsResponse) + public async System.Threading.Tasks.Task> AccountSettingsUpdateWithHttpInfoAsync(AccountSettingsUpdateRequest accountSettingsUpdateRequest, string? accountId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'accountSettingsUpdateRequest' is set + if (accountSettingsUpdateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'accountSettingsUpdateRequest' when calling AccountApi->AccountSettingsUpdate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = accountSettingsUpdateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = accountSettingsUpdateRequest; + } + + // 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 (accountId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "account_id", accountId)); + } + + localVarRequestOptions.Operation = "AccountApi.AccountSettingsUpdate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/account/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AccountSettingsUpdate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Update Account Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs index fd94530dd..27f6ddffd 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/TeamApi.cs @@ -230,6 +230,58 @@ public interface ITeamApiSync : IApiAccessor /// ApiResponse of TeamGetResponse ApiResponse TeamRemoveMemberWithHttpInfo(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0); /// + /// Get team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// TeamSettingsResponse + TeamSettingsResponse TeamSettingsGet(string? teamId = default(string?), int operationIndex = 0); + + /// + /// Get team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// ApiResponse of TeamSettingsResponse + ApiResponse TeamSettingsGetWithHttpInfo(string? teamId = default(string?), int operationIndex = 0); + /// + /// Modify team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// TeamSettingsResponse + TeamSettingsResponse TeamSettingsUpdate(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0); + + /// + /// Modify team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// ApiResponse of TeamSettingsResponse + ApiResponse TeamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0); + /// /// List Sub Teams /// /// @@ -511,6 +563,62 @@ public interface ITeamApiAsync : IApiAccessor /// Task of ApiResponse (TeamGetResponse) System.Threading.Tasks.Task> TeamRemoveMemberWithHttpInfoAsync(TeamRemoveMemberRequest teamRemoveMemberRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// + /// Get team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TeamSettingsResponse + System.Threading.Tasks.Task TeamSettingsGetAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Get team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TeamSettingsResponse) + System.Threading.Tasks.Task> TeamSettingsGetWithHttpInfoAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Modify team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TeamSettingsResponse + System.Threading.Tasks.Task TeamSettingsUpdateAsync(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Modify team settings + /// + /// + /// team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TeamSettingsResponse) + System.Threading.Tasks.Task> TeamSettingsUpdateWithHttpInfoAsync(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// /// List Sub Teams /// /// @@ -2098,6 +2206,372 @@ public Dropbox.Sign.Client.ApiResponse TeamRemoveMemberWithHttp return localVarResponse; } + /// + /// Get team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// TeamSettingsResponse + public TeamSettingsResponse TeamSettingsGet(string? teamId = default(string?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = TeamSettingsGetWithHttpInfo(teamId); + return localVarResponse.Data; + } + + /// + /// Get team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// ApiResponse of TeamSettingsResponse + public Dropbox.Sign.Client.ApiResponse TeamSettingsGetWithHttpInfo(string? teamId = default(string?), 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 (teamId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); + } + + localVarRequestOptions.Operation = "TeamApi.TeamSettingsGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/team/settings", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TeamSettingsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TeamSettingsResponse + public async System.Threading.Tasks.Task TeamSettingsGetAsync(string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamSettingsGetWithHttpInfoAsync(teamId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsGetExample.cs + /// Thrown when fails to make API call + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TeamSettingsResponse) + public async System.Threading.Tasks.Task> TeamSettingsGetWithHttpInfoAsync(string? teamId = default(string?), 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 (teamId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); + } + + localVarRequestOptions.Operation = "TeamApi.TeamSettingsGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/team/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TeamSettingsGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Modify team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// TeamSettingsResponse + public TeamSettingsResponse TeamSettingsUpdate(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = TeamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId); + return localVarResponse.Data; + } + + /// + /// Modify team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// ApiResponse of TeamSettingsResponse + public Dropbox.Sign.Client.ApiResponse TeamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0) + { + // verify the required parameter 'teamSettingsUpdateRequest' is set + if (teamSettingsUpdateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'teamSettingsUpdateRequest' when calling TeamApi->TeamSettingsUpdate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = teamSettingsUpdateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = teamSettingsUpdateRequest; + } + + // 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 (teamId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); + } + + localVarRequestOptions.Operation = "TeamApi.TeamSettingsUpdate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/team/settings", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TeamSettingsUpdate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Modify team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of TeamSettingsResponse + public async System.Threading.Tasks.Task TeamSettingsUpdateAsync(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await TeamSettingsUpdateWithHttpInfoAsync(teamSettingsUpdateRequest, teamId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Modify team settings team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + /// + /// https://github.com/hellosign/dropbox-sign-dotnet/blob/main/examples/TeamSettingsUpdateExample.cs + /// Thrown when fails to make API call + /// + /// Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (TeamSettingsResponse) + public async System.Threading.Tasks.Task> TeamSettingsUpdateWithHttpInfoAsync(TeamSettingsUpdateRequest teamSettingsUpdateRequest, string? teamId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'teamSettingsUpdateRequest' is set + if (teamSettingsUpdateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'teamSettingsUpdateRequest' when calling TeamApi->TeamSettingsUpdate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = teamSettingsUpdateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = teamSettingsUpdateRequest; + } + + // 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 (teamId != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "team_id", teamId)); + } + + localVarRequestOptions.Operation = "TeamApi.TeamSettingsUpdate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/team/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TeamSettingsUpdate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// List Sub Teams Provides a paginated list of sub teams that belong to a given team. /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponse.cs new file mode 100644 index 000000000..fff056e58 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponse.cs @@ -0,0 +1,227 @@ +/* + * 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 +{ + /// + /// AccountSettingsResponse + /// + [DataContract(Name = "AccountSettingsResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class AccountSettingsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccountSettingsResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// accountId (required). + /// settings (required). + /// A list of warnings.. + public AccountSettingsResponse(string accountId = default(string), AccountSettingsResponseSettings settings = default(AccountSettingsResponseSettings), List warnings = default(List)) + { + + // to ensure "accountId" is required (not null) + if (accountId == null) + { + throw new ArgumentNullException("accountId is a required property for AccountSettingsResponse and cannot be null"); + } + this.AccountId = accountId; + // to ensure "settings" is required (not null) + if (settings == null) + { + throw new ArgumentNullException("settings is a required property for AccountSettingsResponse and cannot be null"); + } + this.Settings = settings; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static AccountSettingsResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of AccountSettingsResponse"); + } + + return obj; + } + + /// + /// Gets or Sets AccountId + /// + [DataMember(Name = "account_id", IsRequired = true, EmitDefaultValue = true)] + public string AccountId { get; set; } + + /// + /// Gets or Sets Settings + /// + [DataMember(Name = "settings", IsRequired = true, EmitDefaultValue = true)] + public AccountSettingsResponseSettings Settings { 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 AccountSettingsResponse {\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" Settings: ").Append(Settings).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 AccountSettingsResponse); + } + + /// + /// Returns true if AccountSettingsResponse instances are equal + /// + /// Instance of AccountSettingsResponse to be compared + /// Boolean + public bool Equals(AccountSettingsResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.AccountId == input.AccountId || + (this.AccountId != null && + this.AccountId.Equals(input.AccountId)) + ) && + ( + this.Settings == input.Settings || + (this.Settings != null && + this.Settings.Equals(input.Settings)) + ) && + ( + 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.AccountId != null) + { + hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); + } + if (this.Settings != null) + { + hashCode = (hashCode * 59) + this.Settings.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 = "account_id", + Property = "AccountId", + Type = "string", + Value = AccountId, + }); + types.Add(new OpenApiType() + { + Name = "settings", + Property = "Settings", + Type = "AccountSettingsResponseSettings", + Value = Settings, + }); + types.Add(new OpenApiType() + { + Name = "warnings", + Property = "Warnings", + Type = "List", + Value = Warnings, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponseSettings.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponseSettings.cs new file mode 100644 index 000000000..db8a7906c --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsResponseSettings.cs @@ -0,0 +1,946 @@ +/* + * 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 +{ + /// + /// AccountSettingsResponseSettings + /// + [DataContract(Name = "AccountSettingsResponseSettings")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class AccountSettingsResponseSettings : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccountSettingsResponseSettings() { } + /// + /// Initializes a new instance of the class. + /// + /// Company name associated with this account or team. (required). + /// Whether signers are redirected to a custom URL after completing a signature request. (required). + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. (required). + /// Custom tagline displayed with the account or team branding. (required). + /// Date format used to display dates. List the setting in `unset` to inherit the default. (required). + /// Whether automatic reminder emails are enabled for incomplete signature requests. (required). + /// Sender name shown on signature request emails. (required). + /// Signature appended to signature request emails. (required). + /// Signature creation methods signers may use. (required). + /// Whether completed documents include a digital tamper-proof seal. (required). + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. (required). + /// Whether senders can require an access code to verify a signer. (required). + /// Whether senders can require SMS authentication to verify a signer. (required). + /// Whether the Dropbox Sign document ID is hidden on sent documents. (required). + /// Whether to notify the account when someone signs a document it sent. (required). + /// Whether to notify the account when someone opens a document it sent. (required). + /// Whether values entered in text fields are saved and suggested for future signature requests. (required). + /// Whether completed signature requests include PDF copies in emails sent to the account. (required). + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. (required). + /// Whether emails sent to the account include PDF copies of documents it sends. (required). + /// Whether emails sent to recipients include PDF copies of documents the account sends. (required). + /// Whether to send the account a daily email summarizing outstanding signature requests. (required). + /// Whether to notify the account when it signs a document on a third-party site. (required). + /// Whether to notify all parties when an ordered signature request starts. (required). + /// Whether to notify the account when it signs and sends a document. (required). + /// Whether to notify the account when someone signs a document sent by its team through a template link. (required). + public AccountSettingsResponseSettings(SettingResponse company = default(SettingResponse), SettingResponse customSigningRedirectEnabled = default(SettingResponse), SettingResponse customSigningRedirectUrl = default(SettingResponse), SettingResponse customTagline = default(SettingResponse), SettingResponse dateFormat = default(SettingResponse), SettingResponse isSignatureRemindersEnabled = default(SettingResponse), SettingResponse requestEmailFrom = default(SettingResponse), SettingResponse requestEmailSignature = default(SettingResponse), SettingResponse requiredSignatureTypes = default(SettingResponse), SettingResponse shouldEnableTamperProof = default(SettingResponse), SettingResponse shouldIncludeDistinctPdfs = default(SettingResponse), SettingResponse shouldOfferSignerAccessCode = default(SettingResponse), SettingResponse shouldOfferSignerSmsAuthentication = default(SettingResponse), SettingResponse shouldRemoveDocumentId = default(SettingResponse), SettingResponse isNotifyOnSignEnabled = default(SettingResponse), SettingResponse isNotifyOnViewEnabled = default(SettingResponse), SettingResponse shouldAutocomplete = default(SettingResponse), SettingResponse shouldIncludeRequestedPdfs = default(SettingResponse), SettingResponse shouldIncludeRequestedPdfsForOthers = default(SettingResponse), SettingResponse shouldIncludeSentDocPdfs = default(SettingResponse), SettingResponse shouldIncludeSentDocPdfsForOthers = default(SettingResponse), SettingResponse shouldSendDailySummary = default(SettingResponse), SettingResponse shouldSendEmbeddedSignatureConfEmails = default(SettingResponse), SettingResponse shouldSendOrderedSrEmail = default(SettingResponse), SettingResponse shouldSendOutboundConfEmails = default(SettingResponse), SettingResponse templateLinkSignatureEmailsEnabled = default(SettingResponse)) + { + + // to ensure "company" is required (not null) + if (company == null) + { + throw new ArgumentNullException("company is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.Company = company; + // to ensure "customSigningRedirectEnabled" is required (not null) + if (customSigningRedirectEnabled == null) + { + throw new ArgumentNullException("customSigningRedirectEnabled is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.CustomSigningRedirectEnabled = customSigningRedirectEnabled; + // to ensure "customSigningRedirectUrl" is required (not null) + if (customSigningRedirectUrl == null) + { + throw new ArgumentNullException("customSigningRedirectUrl is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.CustomSigningRedirectUrl = customSigningRedirectUrl; + // to ensure "customTagline" is required (not null) + if (customTagline == null) + { + throw new ArgumentNullException("customTagline is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.CustomTagline = customTagline; + // to ensure "dateFormat" is required (not null) + if (dateFormat == null) + { + throw new ArgumentNullException("dateFormat is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.DateFormat = dateFormat; + // to ensure "isSignatureRemindersEnabled" is required (not null) + if (isSignatureRemindersEnabled == null) + { + throw new ArgumentNullException("isSignatureRemindersEnabled is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.IsSignatureRemindersEnabled = isSignatureRemindersEnabled; + // to ensure "requestEmailFrom" is required (not null) + if (requestEmailFrom == null) + { + throw new ArgumentNullException("requestEmailFrom is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.RequestEmailFrom = requestEmailFrom; + // to ensure "requestEmailSignature" is required (not null) + if (requestEmailSignature == null) + { + throw new ArgumentNullException("requestEmailSignature is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.RequestEmailSignature = requestEmailSignature; + // to ensure "requiredSignatureTypes" is required (not null) + if (requiredSignatureTypes == null) + { + throw new ArgumentNullException("requiredSignatureTypes is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.RequiredSignatureTypes = requiredSignatureTypes; + // to ensure "shouldEnableTamperProof" is required (not null) + if (shouldEnableTamperProof == null) + { + throw new ArgumentNullException("shouldEnableTamperProof is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldEnableTamperProof = shouldEnableTamperProof; + // to ensure "shouldIncludeDistinctPdfs" is required (not null) + if (shouldIncludeDistinctPdfs == null) + { + throw new ArgumentNullException("shouldIncludeDistinctPdfs is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + // to ensure "shouldOfferSignerAccessCode" is required (not null) + if (shouldOfferSignerAccessCode == null) + { + throw new ArgumentNullException("shouldOfferSignerAccessCode is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + // to ensure "shouldOfferSignerSmsAuthentication" is required (not null) + if (shouldOfferSignerSmsAuthentication == null) + { + throw new ArgumentNullException("shouldOfferSignerSmsAuthentication is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + // to ensure "shouldRemoveDocumentId" is required (not null) + if (shouldRemoveDocumentId == null) + { + throw new ArgumentNullException("shouldRemoveDocumentId is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldRemoveDocumentId = shouldRemoveDocumentId; + // to ensure "isNotifyOnSignEnabled" is required (not null) + if (isNotifyOnSignEnabled == null) + { + throw new ArgumentNullException("isNotifyOnSignEnabled is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.IsNotifyOnSignEnabled = isNotifyOnSignEnabled; + // to ensure "isNotifyOnViewEnabled" is required (not null) + if (isNotifyOnViewEnabled == null) + { + throw new ArgumentNullException("isNotifyOnViewEnabled is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.IsNotifyOnViewEnabled = isNotifyOnViewEnabled; + // to ensure "shouldAutocomplete" is required (not null) + if (shouldAutocomplete == null) + { + throw new ArgumentNullException("shouldAutocomplete is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldAutocomplete = shouldAutocomplete; + // to ensure "shouldIncludeRequestedPdfs" is required (not null) + if (shouldIncludeRequestedPdfs == null) + { + throw new ArgumentNullException("shouldIncludeRequestedPdfs is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + // to ensure "shouldIncludeRequestedPdfsForOthers" is required (not null) + if (shouldIncludeRequestedPdfsForOthers == null) + { + throw new ArgumentNullException("shouldIncludeRequestedPdfsForOthers is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + // to ensure "shouldIncludeSentDocPdfs" is required (not null) + if (shouldIncludeSentDocPdfs == null) + { + throw new ArgumentNullException("shouldIncludeSentDocPdfs is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + // to ensure "shouldIncludeSentDocPdfsForOthers" is required (not null) + if (shouldIncludeSentDocPdfsForOthers == null) + { + throw new ArgumentNullException("shouldIncludeSentDocPdfsForOthers is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + // to ensure "shouldSendDailySummary" is required (not null) + if (shouldSendDailySummary == null) + { + throw new ArgumentNullException("shouldSendDailySummary is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldSendDailySummary = shouldSendDailySummary; + // to ensure "shouldSendEmbeddedSignatureConfEmails" is required (not null) + if (shouldSendEmbeddedSignatureConfEmails == null) + { + throw new ArgumentNullException("shouldSendEmbeddedSignatureConfEmails is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + // to ensure "shouldSendOrderedSrEmail" is required (not null) + if (shouldSendOrderedSrEmail == null) + { + throw new ArgumentNullException("shouldSendOrderedSrEmail is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + // to ensure "shouldSendOutboundConfEmails" is required (not null) + if (shouldSendOutboundConfEmails == null) + { + throw new ArgumentNullException("shouldSendOutboundConfEmails is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.ShouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + // to ensure "templateLinkSignatureEmailsEnabled" is required (not null) + if (templateLinkSignatureEmailsEnabled == null) + { + throw new ArgumentNullException("templateLinkSignatureEmailsEnabled is a required property for AccountSettingsResponseSettings and cannot be null"); + } + this.TemplateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static AccountSettingsResponseSettings Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of AccountSettingsResponseSettings"); + } + + return obj; + } + + /// + /// Company name associated with this account or team. + /// + /// Company name associated with this account or team. + [DataMember(Name = "company", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse Company { get; set; } + + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + [DataMember(Name = "custom_signing_redirect_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomSigningRedirectEnabled { get; set; } + + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + [DataMember(Name = "custom_signing_redirect_url", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomSigningRedirectUrl { get; set; } + + /// + /// Custom tagline displayed with the account or team branding. + /// + /// Custom tagline displayed with the account or team branding. + [DataMember(Name = "custom_tagline", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomTagline { get; set; } + + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + [DataMember(Name = "date_format", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse DateFormat { get; set; } + + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + [DataMember(Name = "is_signature_reminders_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse IsSignatureRemindersEnabled { get; set; } + + /// + /// Sender name shown on signature request emails. + /// + /// Sender name shown on signature request emails. + [DataMember(Name = "request_email_from", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequestEmailFrom { get; set; } + + /// + /// Signature appended to signature request emails. + /// + /// Signature appended to signature request emails. + [DataMember(Name = "request_email_signature", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequestEmailSignature { get; set; } + + /// + /// Signature creation methods signers may use. + /// + /// Signature creation methods signers may use. + [DataMember(Name = "required_signature_types", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequiredSignatureTypes { get; set; } + + /// + /// Whether completed documents include a digital tamper-proof seal. + /// + /// Whether completed documents include a digital tamper-proof seal. + [DataMember(Name = "should_enable_tamper_proof", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldEnableTamperProof { get; set; } + + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + [DataMember(Name = "should_include_distinct_pdfs", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeDistinctPdfs { get; set; } + + /// + /// Whether senders can require an access code to verify a signer. + /// + /// Whether senders can require an access code to verify a signer. + [DataMember(Name = "should_offer_signer_access_code", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldOfferSignerAccessCode { get; set; } + + /// + /// Whether senders can require SMS authentication to verify a signer. + /// + /// Whether senders can require SMS authentication to verify a signer. + [DataMember(Name = "should_offer_signer_sms_authentication", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldOfferSignerSmsAuthentication { get; set; } + + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + [DataMember(Name = "should_remove_document_id", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldRemoveDocumentId { get; set; } + + /// + /// Whether to notify the account when someone signs a document it sent. + /// + /// Whether to notify the account when someone signs a document it sent. + [DataMember(Name = "is_notify_on_sign_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse IsNotifyOnSignEnabled { get; set; } + + /// + /// Whether to notify the account when someone opens a document it sent. + /// + /// Whether to notify the account when someone opens a document it sent. + [DataMember(Name = "is_notify_on_view_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse IsNotifyOnViewEnabled { get; set; } + + /// + /// Whether values entered in text fields are saved and suggested for future signature requests. + /// + /// Whether values entered in text fields are saved and suggested for future signature requests. + [DataMember(Name = "should_autocomplete", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldAutocomplete { get; set; } + + /// + /// Whether completed signature requests include PDF copies in emails sent to the account. + /// + /// Whether completed signature requests include PDF copies in emails sent to the account. + [DataMember(Name = "should_include_requested_pdfs", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeRequestedPdfs { get; set; } + + /// + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + /// + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + [DataMember(Name = "should_include_requested_pdfs_for_others", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeRequestedPdfsForOthers { get; set; } + + /// + /// Whether emails sent to the account include PDF copies of documents it sends. + /// + /// Whether emails sent to the account include PDF copies of documents it sends. + [DataMember(Name = "should_include_sent_doc_pdfs", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeSentDocPdfs { get; set; } + + /// + /// Whether emails sent to recipients include PDF copies of documents the account sends. + /// + /// Whether emails sent to recipients include PDF copies of documents the account sends. + [DataMember(Name = "should_include_sent_doc_pdfs_for_others", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeSentDocPdfsForOthers { get; set; } + + /// + /// Whether to send the account a daily email summarizing outstanding signature requests. + /// + /// Whether to send the account a daily email summarizing outstanding signature requests. + [DataMember(Name = "should_send_daily_summary", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldSendDailySummary { get; set; } + + /// + /// Whether to notify the account when it signs a document on a third-party site. + /// + /// Whether to notify the account when it signs a document on a third-party site. + [DataMember(Name = "should_send_embedded_signature_conf_emails", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldSendEmbeddedSignatureConfEmails { get; set; } + + /// + /// Whether to notify all parties when an ordered signature request starts. + /// + /// Whether to notify all parties when an ordered signature request starts. + [DataMember(Name = "should_send_ordered_sr_email", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldSendOrderedSrEmail { get; set; } + + /// + /// Whether to notify the account when it signs and sends a document. + /// + /// Whether to notify the account when it signs and sends a document. + [DataMember(Name = "should_send_outbound_conf_emails", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldSendOutboundConfEmails { get; set; } + + /// + /// Whether to notify the account when someone signs a document sent by its team through a template link. + /// + /// Whether to notify the account when someone signs a document sent by its team through a template link. + [DataMember(Name = "template_link_signature_emails_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse TemplateLinkSignatureEmailsEnabled { 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 AccountSettingsResponseSettings {\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" CustomSigningRedirectEnabled: ").Append(CustomSigningRedirectEnabled).Append("\n"); + sb.Append(" CustomSigningRedirectUrl: ").Append(CustomSigningRedirectUrl).Append("\n"); + sb.Append(" CustomTagline: ").Append(CustomTagline).Append("\n"); + sb.Append(" DateFormat: ").Append(DateFormat).Append("\n"); + sb.Append(" IsSignatureRemindersEnabled: ").Append(IsSignatureRemindersEnabled).Append("\n"); + sb.Append(" RequestEmailFrom: ").Append(RequestEmailFrom).Append("\n"); + sb.Append(" RequestEmailSignature: ").Append(RequestEmailSignature).Append("\n"); + sb.Append(" RequiredSignatureTypes: ").Append(RequiredSignatureTypes).Append("\n"); + sb.Append(" ShouldEnableTamperProof: ").Append(ShouldEnableTamperProof).Append("\n"); + sb.Append(" ShouldIncludeDistinctPdfs: ").Append(ShouldIncludeDistinctPdfs).Append("\n"); + sb.Append(" ShouldOfferSignerAccessCode: ").Append(ShouldOfferSignerAccessCode).Append("\n"); + sb.Append(" ShouldOfferSignerSmsAuthentication: ").Append(ShouldOfferSignerSmsAuthentication).Append("\n"); + sb.Append(" ShouldRemoveDocumentId: ").Append(ShouldRemoveDocumentId).Append("\n"); + sb.Append(" IsNotifyOnSignEnabled: ").Append(IsNotifyOnSignEnabled).Append("\n"); + sb.Append(" IsNotifyOnViewEnabled: ").Append(IsNotifyOnViewEnabled).Append("\n"); + sb.Append(" ShouldAutocomplete: ").Append(ShouldAutocomplete).Append("\n"); + sb.Append(" ShouldIncludeRequestedPdfs: ").Append(ShouldIncludeRequestedPdfs).Append("\n"); + sb.Append(" ShouldIncludeRequestedPdfsForOthers: ").Append(ShouldIncludeRequestedPdfsForOthers).Append("\n"); + sb.Append(" ShouldIncludeSentDocPdfs: ").Append(ShouldIncludeSentDocPdfs).Append("\n"); + sb.Append(" ShouldIncludeSentDocPdfsForOthers: ").Append(ShouldIncludeSentDocPdfsForOthers).Append("\n"); + sb.Append(" ShouldSendDailySummary: ").Append(ShouldSendDailySummary).Append("\n"); + sb.Append(" ShouldSendEmbeddedSignatureConfEmails: ").Append(ShouldSendEmbeddedSignatureConfEmails).Append("\n"); + sb.Append(" ShouldSendOrderedSrEmail: ").Append(ShouldSendOrderedSrEmail).Append("\n"); + sb.Append(" ShouldSendOutboundConfEmails: ").Append(ShouldSendOutboundConfEmails).Append("\n"); + sb.Append(" TemplateLinkSignatureEmailsEnabled: ").Append(TemplateLinkSignatureEmailsEnabled).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 AccountSettingsResponseSettings); + } + + /// + /// Returns true if AccountSettingsResponseSettings instances are equal + /// + /// Instance of AccountSettingsResponseSettings to be compared + /// Boolean + public bool Equals(AccountSettingsResponseSettings input) + { + if (input == null) + { + return false; + } + return + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.CustomSigningRedirectEnabled == input.CustomSigningRedirectEnabled || + (this.CustomSigningRedirectEnabled != null && + this.CustomSigningRedirectEnabled.Equals(input.CustomSigningRedirectEnabled)) + ) && + ( + this.CustomSigningRedirectUrl == input.CustomSigningRedirectUrl || + (this.CustomSigningRedirectUrl != null && + this.CustomSigningRedirectUrl.Equals(input.CustomSigningRedirectUrl)) + ) && + ( + this.CustomTagline == input.CustomTagline || + (this.CustomTagline != null && + this.CustomTagline.Equals(input.CustomTagline)) + ) && + ( + this.DateFormat == input.DateFormat || + (this.DateFormat != null && + this.DateFormat.Equals(input.DateFormat)) + ) && + ( + this.IsSignatureRemindersEnabled == input.IsSignatureRemindersEnabled || + (this.IsSignatureRemindersEnabled != null && + this.IsSignatureRemindersEnabled.Equals(input.IsSignatureRemindersEnabled)) + ) && + ( + this.RequestEmailFrom == input.RequestEmailFrom || + (this.RequestEmailFrom != null && + this.RequestEmailFrom.Equals(input.RequestEmailFrom)) + ) && + ( + this.RequestEmailSignature == input.RequestEmailSignature || + (this.RequestEmailSignature != null && + this.RequestEmailSignature.Equals(input.RequestEmailSignature)) + ) && + ( + this.RequiredSignatureTypes == input.RequiredSignatureTypes || + (this.RequiredSignatureTypes != null && + this.RequiredSignatureTypes.Equals(input.RequiredSignatureTypes)) + ) && + ( + this.ShouldEnableTamperProof == input.ShouldEnableTamperProof || + (this.ShouldEnableTamperProof != null && + this.ShouldEnableTamperProof.Equals(input.ShouldEnableTamperProof)) + ) && + ( + this.ShouldIncludeDistinctPdfs == input.ShouldIncludeDistinctPdfs || + (this.ShouldIncludeDistinctPdfs != null && + this.ShouldIncludeDistinctPdfs.Equals(input.ShouldIncludeDistinctPdfs)) + ) && + ( + this.ShouldOfferSignerAccessCode == input.ShouldOfferSignerAccessCode || + (this.ShouldOfferSignerAccessCode != null && + this.ShouldOfferSignerAccessCode.Equals(input.ShouldOfferSignerAccessCode)) + ) && + ( + this.ShouldOfferSignerSmsAuthentication == input.ShouldOfferSignerSmsAuthentication || + (this.ShouldOfferSignerSmsAuthentication != null && + this.ShouldOfferSignerSmsAuthentication.Equals(input.ShouldOfferSignerSmsAuthentication)) + ) && + ( + this.ShouldRemoveDocumentId == input.ShouldRemoveDocumentId || + (this.ShouldRemoveDocumentId != null && + this.ShouldRemoveDocumentId.Equals(input.ShouldRemoveDocumentId)) + ) && + ( + this.IsNotifyOnSignEnabled == input.IsNotifyOnSignEnabled || + (this.IsNotifyOnSignEnabled != null && + this.IsNotifyOnSignEnabled.Equals(input.IsNotifyOnSignEnabled)) + ) && + ( + this.IsNotifyOnViewEnabled == input.IsNotifyOnViewEnabled || + (this.IsNotifyOnViewEnabled != null && + this.IsNotifyOnViewEnabled.Equals(input.IsNotifyOnViewEnabled)) + ) && + ( + this.ShouldAutocomplete == input.ShouldAutocomplete || + (this.ShouldAutocomplete != null && + this.ShouldAutocomplete.Equals(input.ShouldAutocomplete)) + ) && + ( + this.ShouldIncludeRequestedPdfs == input.ShouldIncludeRequestedPdfs || + (this.ShouldIncludeRequestedPdfs != null && + this.ShouldIncludeRequestedPdfs.Equals(input.ShouldIncludeRequestedPdfs)) + ) && + ( + this.ShouldIncludeRequestedPdfsForOthers == input.ShouldIncludeRequestedPdfsForOthers || + (this.ShouldIncludeRequestedPdfsForOthers != null && + this.ShouldIncludeRequestedPdfsForOthers.Equals(input.ShouldIncludeRequestedPdfsForOthers)) + ) && + ( + this.ShouldIncludeSentDocPdfs == input.ShouldIncludeSentDocPdfs || + (this.ShouldIncludeSentDocPdfs != null && + this.ShouldIncludeSentDocPdfs.Equals(input.ShouldIncludeSentDocPdfs)) + ) && + ( + this.ShouldIncludeSentDocPdfsForOthers == input.ShouldIncludeSentDocPdfsForOthers || + (this.ShouldIncludeSentDocPdfsForOthers != null && + this.ShouldIncludeSentDocPdfsForOthers.Equals(input.ShouldIncludeSentDocPdfsForOthers)) + ) && + ( + this.ShouldSendDailySummary == input.ShouldSendDailySummary || + (this.ShouldSendDailySummary != null && + this.ShouldSendDailySummary.Equals(input.ShouldSendDailySummary)) + ) && + ( + this.ShouldSendEmbeddedSignatureConfEmails == input.ShouldSendEmbeddedSignatureConfEmails || + (this.ShouldSendEmbeddedSignatureConfEmails != null && + this.ShouldSendEmbeddedSignatureConfEmails.Equals(input.ShouldSendEmbeddedSignatureConfEmails)) + ) && + ( + this.ShouldSendOrderedSrEmail == input.ShouldSendOrderedSrEmail || + (this.ShouldSendOrderedSrEmail != null && + this.ShouldSendOrderedSrEmail.Equals(input.ShouldSendOrderedSrEmail)) + ) && + ( + this.ShouldSendOutboundConfEmails == input.ShouldSendOutboundConfEmails || + (this.ShouldSendOutboundConfEmails != null && + this.ShouldSendOutboundConfEmails.Equals(input.ShouldSendOutboundConfEmails)) + ) && + ( + this.TemplateLinkSignatureEmailsEnabled == input.TemplateLinkSignatureEmailsEnabled || + (this.TemplateLinkSignatureEmailsEnabled != null && + this.TemplateLinkSignatureEmailsEnabled.Equals(input.TemplateLinkSignatureEmailsEnabled)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.CustomSigningRedirectEnabled != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectEnabled.GetHashCode(); + } + if (this.CustomSigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectUrl.GetHashCode(); + } + if (this.CustomTagline != null) + { + hashCode = (hashCode * 59) + this.CustomTagline.GetHashCode(); + } + if (this.DateFormat != null) + { + hashCode = (hashCode * 59) + this.DateFormat.GetHashCode(); + } + if (this.IsSignatureRemindersEnabled != null) + { + hashCode = (hashCode * 59) + this.IsSignatureRemindersEnabled.GetHashCode(); + } + if (this.RequestEmailFrom != null) + { + hashCode = (hashCode * 59) + this.RequestEmailFrom.GetHashCode(); + } + if (this.RequestEmailSignature != null) + { + hashCode = (hashCode * 59) + this.RequestEmailSignature.GetHashCode(); + } + if (this.RequiredSignatureTypes != null) + { + hashCode = (hashCode * 59) + this.RequiredSignatureTypes.GetHashCode(); + } + if (this.ShouldEnableTamperProof != null) + { + hashCode = (hashCode * 59) + this.ShouldEnableTamperProof.GetHashCode(); + } + if (this.ShouldIncludeDistinctPdfs != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeDistinctPdfs.GetHashCode(); + } + if (this.ShouldOfferSignerAccessCode != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerAccessCode.GetHashCode(); + } + if (this.ShouldOfferSignerSmsAuthentication != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerSmsAuthentication.GetHashCode(); + } + if (this.ShouldRemoveDocumentId != null) + { + hashCode = (hashCode * 59) + this.ShouldRemoveDocumentId.GetHashCode(); + } + if (this.IsNotifyOnSignEnabled != null) + { + hashCode = (hashCode * 59) + this.IsNotifyOnSignEnabled.GetHashCode(); + } + if (this.IsNotifyOnViewEnabled != null) + { + hashCode = (hashCode * 59) + this.IsNotifyOnViewEnabled.GetHashCode(); + } + if (this.ShouldAutocomplete != null) + { + hashCode = (hashCode * 59) + this.ShouldAutocomplete.GetHashCode(); + } + if (this.ShouldIncludeRequestedPdfs != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeRequestedPdfs.GetHashCode(); + } + if (this.ShouldIncludeRequestedPdfsForOthers != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeRequestedPdfsForOthers.GetHashCode(); + } + if (this.ShouldIncludeSentDocPdfs != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeSentDocPdfs.GetHashCode(); + } + if (this.ShouldIncludeSentDocPdfsForOthers != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeSentDocPdfsForOthers.GetHashCode(); + } + if (this.ShouldSendDailySummary != null) + { + hashCode = (hashCode * 59) + this.ShouldSendDailySummary.GetHashCode(); + } + if (this.ShouldSendEmbeddedSignatureConfEmails != null) + { + hashCode = (hashCode * 59) + this.ShouldSendEmbeddedSignatureConfEmails.GetHashCode(); + } + if (this.ShouldSendOrderedSrEmail != null) + { + hashCode = (hashCode * 59) + this.ShouldSendOrderedSrEmail.GetHashCode(); + } + if (this.ShouldSendOutboundConfEmails != null) + { + hashCode = (hashCode * 59) + this.ShouldSendOutboundConfEmails.GetHashCode(); + } + if (this.TemplateLinkSignatureEmailsEnabled != null) + { + hashCode = (hashCode * 59) + this.TemplateLinkSignatureEmailsEnabled.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 = "company", + Property = "Company", + Type = "SettingResponse", + Value = Company, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_enabled", + Property = "CustomSigningRedirectEnabled", + Type = "SettingResponse", + Value = CustomSigningRedirectEnabled, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_url", + Property = "CustomSigningRedirectUrl", + Type = "SettingResponse", + Value = CustomSigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "custom_tagline", + Property = "CustomTagline", + Type = "SettingResponse", + Value = CustomTagline, + }); + types.Add(new OpenApiType() + { + Name = "date_format", + Property = "DateFormat", + Type = "SettingResponse", + Value = DateFormat, + }); + types.Add(new OpenApiType() + { + Name = "is_signature_reminders_enabled", + Property = "IsSignatureRemindersEnabled", + Type = "SettingResponse", + Value = IsSignatureRemindersEnabled, + }); + types.Add(new OpenApiType() + { + Name = "request_email_from", + Property = "RequestEmailFrom", + Type = "SettingResponse", + Value = RequestEmailFrom, + }); + types.Add(new OpenApiType() + { + Name = "request_email_signature", + Property = "RequestEmailSignature", + Type = "SettingResponse", + Value = RequestEmailSignature, + }); + types.Add(new OpenApiType() + { + Name = "required_signature_types", + Property = "RequiredSignatureTypes", + Type = "SettingResponse", + Value = RequiredSignatureTypes, + }); + types.Add(new OpenApiType() + { + Name = "should_enable_tamper_proof", + Property = "ShouldEnableTamperProof", + Type = "SettingResponse", + Value = ShouldEnableTamperProof, + }); + types.Add(new OpenApiType() + { + Name = "should_include_distinct_pdfs", + Property = "ShouldIncludeDistinctPdfs", + Type = "SettingResponse", + Value = ShouldIncludeDistinctPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_access_code", + Property = "ShouldOfferSignerAccessCode", + Type = "SettingResponse", + Value = ShouldOfferSignerAccessCode, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_sms_authentication", + Property = "ShouldOfferSignerSmsAuthentication", + Type = "SettingResponse", + Value = ShouldOfferSignerSmsAuthentication, + }); + types.Add(new OpenApiType() + { + Name = "should_remove_document_id", + Property = "ShouldRemoveDocumentId", + Type = "SettingResponse", + Value = ShouldRemoveDocumentId, + }); + types.Add(new OpenApiType() + { + Name = "is_notify_on_sign_enabled", + Property = "IsNotifyOnSignEnabled", + Type = "SettingResponse", + Value = IsNotifyOnSignEnabled, + }); + types.Add(new OpenApiType() + { + Name = "is_notify_on_view_enabled", + Property = "IsNotifyOnViewEnabled", + Type = "SettingResponse", + Value = IsNotifyOnViewEnabled, + }); + types.Add(new OpenApiType() + { + Name = "should_autocomplete", + Property = "ShouldAutocomplete", + Type = "SettingResponse", + Value = ShouldAutocomplete, + }); + types.Add(new OpenApiType() + { + Name = "should_include_requested_pdfs", + Property = "ShouldIncludeRequestedPdfs", + Type = "SettingResponse", + Value = ShouldIncludeRequestedPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_include_requested_pdfs_for_others", + Property = "ShouldIncludeRequestedPdfsForOthers", + Type = "SettingResponse", + Value = ShouldIncludeRequestedPdfsForOthers, + }); + types.Add(new OpenApiType() + { + Name = "should_include_sent_doc_pdfs", + Property = "ShouldIncludeSentDocPdfs", + Type = "SettingResponse", + Value = ShouldIncludeSentDocPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_include_sent_doc_pdfs_for_others", + Property = "ShouldIncludeSentDocPdfsForOthers", + Type = "SettingResponse", + Value = ShouldIncludeSentDocPdfsForOthers, + }); + types.Add(new OpenApiType() + { + Name = "should_send_daily_summary", + Property = "ShouldSendDailySummary", + Type = "SettingResponse", + Value = ShouldSendDailySummary, + }); + types.Add(new OpenApiType() + { + Name = "should_send_embedded_signature_conf_emails", + Property = "ShouldSendEmbeddedSignatureConfEmails", + Type = "SettingResponse", + Value = ShouldSendEmbeddedSignatureConfEmails, + }); + types.Add(new OpenApiType() + { + Name = "should_send_ordered_sr_email", + Property = "ShouldSendOrderedSrEmail", + Type = "SettingResponse", + Value = ShouldSendOrderedSrEmail, + }); + types.Add(new OpenApiType() + { + Name = "should_send_outbound_conf_emails", + Property = "ShouldSendOutboundConfEmails", + Type = "SettingResponse", + Value = ShouldSendOutboundConfEmails, + }); + types.Add(new OpenApiType() + { + Name = "template_link_signature_emails_enabled", + Property = "TemplateLinkSignatureEmailsEnabled", + Type = "SettingResponse", + Value = TemplateLinkSignatureEmailsEnabled, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsUpdateRequest.cs new file mode 100644 index 000000000..9d1bac761 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/AccountSettingsUpdateRequest.cs @@ -0,0 +1,926 @@ +/* + * 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 +{ + /// + /// AccountSettingsUpdateRequest + /// + [DataContract(Name = "AccountSettingsUpdateRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class AccountSettingsUpdateRequest : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets DateFormat + /// + [DataMember(Name = "date_format", EmitDefaultValue = true)] + public DateFormat? DateFormat { get; set; } + /// + /// Defines Unset + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum UnsetEnum + { + /// + /// Enum Company for value: company + /// + [EnumMember(Value = "company")] + Company = 1, + + /// + /// Enum CustomSigningRedirectEnabled for value: custom_signing_redirect_enabled + /// + [EnumMember(Value = "custom_signing_redirect_enabled")] + CustomSigningRedirectEnabled = 2, + + /// + /// Enum CustomSigningRedirectUrl for value: custom_signing_redirect_url + /// + [EnumMember(Value = "custom_signing_redirect_url")] + CustomSigningRedirectUrl = 3, + + /// + /// Enum CustomTagline for value: custom_tagline + /// + [EnumMember(Value = "custom_tagline")] + CustomTagline = 4, + + /// + /// Enum DateFormat for value: date_format + /// + [EnumMember(Value = "date_format")] + DateFormat = 5, + + /// + /// Enum IsSignatureRemindersEnabled for value: is_signature_reminders_enabled + /// + [EnumMember(Value = "is_signature_reminders_enabled")] + IsSignatureRemindersEnabled = 6, + + /// + /// Enum RequestEmailFrom for value: request_email_from + /// + [EnumMember(Value = "request_email_from")] + RequestEmailFrom = 7, + + /// + /// Enum RequestEmailSignature for value: request_email_signature + /// + [EnumMember(Value = "request_email_signature")] + RequestEmailSignature = 8, + + /// + /// Enum RequiredSignatureTypes for value: required_signature_types + /// + [EnumMember(Value = "required_signature_types")] + RequiredSignatureTypes = 9, + + /// + /// Enum ShouldEnableTamperProof for value: should_enable_tamper_proof + /// + [EnumMember(Value = "should_enable_tamper_proof")] + ShouldEnableTamperProof = 10, + + /// + /// Enum ShouldIncludeDistinctPdfs for value: should_include_distinct_pdfs + /// + [EnumMember(Value = "should_include_distinct_pdfs")] + ShouldIncludeDistinctPdfs = 11, + + /// + /// Enum ShouldOfferSignerAccessCode for value: should_offer_signer_access_code + /// + [EnumMember(Value = "should_offer_signer_access_code")] + ShouldOfferSignerAccessCode = 12, + + /// + /// Enum ShouldOfferSignerSmsAuthentication for value: should_offer_signer_sms_authentication + /// + [EnumMember(Value = "should_offer_signer_sms_authentication")] + ShouldOfferSignerSmsAuthentication = 13, + + /// + /// Enum ShouldRemoveDocumentId for value: should_remove_document_id + /// + [EnumMember(Value = "should_remove_document_id")] + ShouldRemoveDocumentId = 14, + + /// + /// Enum IsNotifyOnSignEnabled for value: is_notify_on_sign_enabled + /// + [EnumMember(Value = "is_notify_on_sign_enabled")] + IsNotifyOnSignEnabled = 15, + + /// + /// Enum IsNotifyOnViewEnabled for value: is_notify_on_view_enabled + /// + [EnumMember(Value = "is_notify_on_view_enabled")] + IsNotifyOnViewEnabled = 16, + + /// + /// Enum ShouldAutocomplete for value: should_autocomplete + /// + [EnumMember(Value = "should_autocomplete")] + ShouldAutocomplete = 17, + + /// + /// Enum ShouldIncludeRequestedPdfs for value: should_include_requested_pdfs + /// + [EnumMember(Value = "should_include_requested_pdfs")] + ShouldIncludeRequestedPdfs = 18, + + /// + /// Enum ShouldIncludeRequestedPdfsForOthers for value: should_include_requested_pdfs_for_others + /// + [EnumMember(Value = "should_include_requested_pdfs_for_others")] + ShouldIncludeRequestedPdfsForOthers = 19, + + /// + /// Enum ShouldIncludeSentDocPdfs for value: should_include_sent_doc_pdfs + /// + [EnumMember(Value = "should_include_sent_doc_pdfs")] + ShouldIncludeSentDocPdfs = 20, + + /// + /// Enum ShouldIncludeSentDocPdfsForOthers for value: should_include_sent_doc_pdfs_for_others + /// + [EnumMember(Value = "should_include_sent_doc_pdfs_for_others")] + ShouldIncludeSentDocPdfsForOthers = 21, + + /// + /// Enum ShouldSendDailySummary for value: should_send_daily_summary + /// + [EnumMember(Value = "should_send_daily_summary")] + ShouldSendDailySummary = 22, + + /// + /// Enum ShouldSendEmbeddedSignatureConfEmails for value: should_send_embedded_signature_conf_emails + /// + [EnumMember(Value = "should_send_embedded_signature_conf_emails")] + ShouldSendEmbeddedSignatureConfEmails = 23, + + /// + /// Enum ShouldSendOrderedSrEmail for value: should_send_ordered_sr_email + /// + [EnumMember(Value = "should_send_ordered_sr_email")] + ShouldSendOrderedSrEmail = 24, + + /// + /// Enum ShouldSendOutboundConfEmails for value: should_send_outbound_conf_emails + /// + [EnumMember(Value = "should_send_outbound_conf_emails")] + ShouldSendOutboundConfEmails = 25, + + /// + /// Enum TemplateLinkSignatureEmailsEnabled for value: template_link_signature_emails_enabled + /// + [EnumMember(Value = "template_link_signature_emails_enabled")] + TemplateLinkSignatureEmailsEnabled = 26 + } + + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AccountSettingsUpdateRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Company name associated with this account or team.. + /// Whether signers are redirected to a custom URL after completing a signature request.. + /// URL where signers are redirected after completing a signature request when custom redirects are enabled.. + /// Custom tagline displayed with the account or team branding.. + /// dateFormat. + /// Whether automatic reminder emails are enabled for incomplete signature requests.. + /// Sender name shown on signature request emails.. + /// Signature appended to signature request emails.. + /// Signature creation methods signers may use.. + /// Whether completed documents include a digital tamper-proof seal.. + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF.. + /// Whether senders can require an access code to verify a signer.. + /// Whether senders can require SMS authentication to verify a signer.. + /// Whether the Dropbox Sign document ID is hidden on sent documents.. + /// Whether to notify the account when someone signs a document it sent.. + /// Whether to notify the account when someone opens a document it sent.. + /// Whether values entered in text fields are saved and suggested for future signature requests.. + /// Whether completed signature requests include PDF copies in emails sent to the account.. + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.. + /// Whether emails sent to the account include PDF copies of documents it sends.. + /// Whether emails sent to recipients include PDF copies of documents the account sends.. + /// Whether to send the account a daily email summarizing outstanding signature requests.. + /// Whether to notify the account when it signs a document on a third-party site.. + /// Whether to notify all parties when an ordered signature request starts.. + /// Whether to notify the account when it signs and sends a document.. + /// Whether to notify the account when someone signs a document sent by its team through a template link.. + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.. + public AccountSettingsUpdateRequest(string company = default(string), bool customSigningRedirectEnabled = default(bool), string customSigningRedirectUrl = default(string), string customTagline = default(string), DateFormat? dateFormat = default(DateFormat?), bool isSignatureRemindersEnabled = default(bool), string requestEmailFrom = default(string), string requestEmailSignature = default(string), List requiredSignatureTypes = default(List), bool shouldEnableTamperProof = default(bool), bool shouldIncludeDistinctPdfs = default(bool), bool shouldOfferSignerAccessCode = default(bool), bool shouldOfferSignerSmsAuthentication = default(bool), bool shouldRemoveDocumentId = default(bool), bool isNotifyOnSignEnabled = default(bool), bool isNotifyOnViewEnabled = default(bool), bool shouldAutocomplete = default(bool), bool shouldIncludeRequestedPdfs = default(bool), bool shouldIncludeRequestedPdfsForOthers = default(bool), bool shouldIncludeSentDocPdfs = default(bool), bool shouldIncludeSentDocPdfsForOthers = default(bool), bool shouldSendDailySummary = default(bool), bool shouldSendEmbeddedSignatureConfEmails = default(bool), bool shouldSendOrderedSrEmail = default(bool), bool shouldSendOutboundConfEmails = default(bool), bool templateLinkSignatureEmailsEnabled = default(bool), List unset = default(List)) + { + + this.Company = company; + this.CustomSigningRedirectEnabled = customSigningRedirectEnabled; + this.CustomSigningRedirectUrl = customSigningRedirectUrl; + this.CustomTagline = customTagline; + this.DateFormat = dateFormat; + this.IsSignatureRemindersEnabled = isSignatureRemindersEnabled; + this.RequestEmailFrom = requestEmailFrom; + this.RequestEmailSignature = requestEmailSignature; + this.RequiredSignatureTypes = requiredSignatureTypes; + this.ShouldEnableTamperProof = shouldEnableTamperProof; + this.ShouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + this.ShouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + this.ShouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + this.ShouldRemoveDocumentId = shouldRemoveDocumentId; + this.IsNotifyOnSignEnabled = isNotifyOnSignEnabled; + this.IsNotifyOnViewEnabled = isNotifyOnViewEnabled; + this.ShouldAutocomplete = shouldAutocomplete; + this.ShouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + this.ShouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + this.ShouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + this.ShouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + this.ShouldSendDailySummary = shouldSendDailySummary; + this.ShouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + this.ShouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + this.ShouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + this.TemplateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + this.Unset = unset; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static AccountSettingsUpdateRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of AccountSettingsUpdateRequest"); + } + + return obj; + } + + /// + /// Company name associated with this account or team. + /// + /// Company name associated with this account or team. + [DataMember(Name = "company", EmitDefaultValue = true)] + public string Company { get; set; } + + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + [DataMember(Name = "custom_signing_redirect_enabled", EmitDefaultValue = true)] + public bool CustomSigningRedirectEnabled { get; set; } + + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + [DataMember(Name = "custom_signing_redirect_url", EmitDefaultValue = true)] + public string CustomSigningRedirectUrl { get; set; } + + /// + /// Custom tagline displayed with the account or team branding. + /// + /// Custom tagline displayed with the account or team branding. + [DataMember(Name = "custom_tagline", EmitDefaultValue = true)] + public string CustomTagline { get; set; } + + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + [DataMember(Name = "is_signature_reminders_enabled", EmitDefaultValue = true)] + public bool IsSignatureRemindersEnabled { get; set; } + + /// + /// Sender name shown on signature request emails. + /// + /// Sender name shown on signature request emails. + [DataMember(Name = "request_email_from", EmitDefaultValue = true)] + public string RequestEmailFrom { get; set; } + + /// + /// Signature appended to signature request emails. + /// + /// Signature appended to signature request emails. + [DataMember(Name = "request_email_signature", EmitDefaultValue = true)] + public string RequestEmailSignature { get; set; } + + /// + /// Signature creation methods signers may use. + /// + /// Signature creation methods signers may use. + [DataMember(Name = "required_signature_types", EmitDefaultValue = true)] + public List RequiredSignatureTypes { get; set; } + + /// + /// Whether completed documents include a digital tamper-proof seal. + /// + /// Whether completed documents include a digital tamper-proof seal. + [DataMember(Name = "should_enable_tamper_proof", EmitDefaultValue = true)] + public bool ShouldEnableTamperProof { get; set; } + + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + [DataMember(Name = "should_include_distinct_pdfs", EmitDefaultValue = true)] + public bool ShouldIncludeDistinctPdfs { get; set; } + + /// + /// Whether senders can require an access code to verify a signer. + /// + /// Whether senders can require an access code to verify a signer. + [DataMember(Name = "should_offer_signer_access_code", EmitDefaultValue = true)] + public bool ShouldOfferSignerAccessCode { get; set; } + + /// + /// Whether senders can require SMS authentication to verify a signer. + /// + /// Whether senders can require SMS authentication to verify a signer. + [DataMember(Name = "should_offer_signer_sms_authentication", EmitDefaultValue = true)] + public bool ShouldOfferSignerSmsAuthentication { get; set; } + + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + [DataMember(Name = "should_remove_document_id", EmitDefaultValue = true)] + public bool ShouldRemoveDocumentId { get; set; } + + /// + /// Whether to notify the account when someone signs a document it sent. + /// + /// Whether to notify the account when someone signs a document it sent. + [DataMember(Name = "is_notify_on_sign_enabled", EmitDefaultValue = true)] + public bool IsNotifyOnSignEnabled { get; set; } + + /// + /// Whether to notify the account when someone opens a document it sent. + /// + /// Whether to notify the account when someone opens a document it sent. + [DataMember(Name = "is_notify_on_view_enabled", EmitDefaultValue = true)] + public bool IsNotifyOnViewEnabled { get; set; } + + /// + /// Whether values entered in text fields are saved and suggested for future signature requests. + /// + /// Whether values entered in text fields are saved and suggested for future signature requests. + [DataMember(Name = "should_autocomplete", EmitDefaultValue = true)] + public bool ShouldAutocomplete { get; set; } + + /// + /// Whether completed signature requests include PDF copies in emails sent to the account. + /// + /// Whether completed signature requests include PDF copies in emails sent to the account. + [DataMember(Name = "should_include_requested_pdfs", EmitDefaultValue = true)] + public bool ShouldIncludeRequestedPdfs { get; set; } + + /// + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + /// + /// Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + [DataMember(Name = "should_include_requested_pdfs_for_others", EmitDefaultValue = true)] + public bool ShouldIncludeRequestedPdfsForOthers { get; set; } + + /// + /// Whether emails sent to the account include PDF copies of documents it sends. + /// + /// Whether emails sent to the account include PDF copies of documents it sends. + [DataMember(Name = "should_include_sent_doc_pdfs", EmitDefaultValue = true)] + public bool ShouldIncludeSentDocPdfs { get; set; } + + /// + /// Whether emails sent to recipients include PDF copies of documents the account sends. + /// + /// Whether emails sent to recipients include PDF copies of documents the account sends. + [DataMember(Name = "should_include_sent_doc_pdfs_for_others", EmitDefaultValue = true)] + public bool ShouldIncludeSentDocPdfsForOthers { get; set; } + + /// + /// Whether to send the account a daily email summarizing outstanding signature requests. + /// + /// Whether to send the account a daily email summarizing outstanding signature requests. + [DataMember(Name = "should_send_daily_summary", EmitDefaultValue = true)] + public bool ShouldSendDailySummary { get; set; } + + /// + /// Whether to notify the account when it signs a document on a third-party site. + /// + /// Whether to notify the account when it signs a document on a third-party site. + [DataMember(Name = "should_send_embedded_signature_conf_emails", EmitDefaultValue = true)] + public bool ShouldSendEmbeddedSignatureConfEmails { get; set; } + + /// + /// Whether to notify all parties when an ordered signature request starts. + /// + /// Whether to notify all parties when an ordered signature request starts. + [DataMember(Name = "should_send_ordered_sr_email", EmitDefaultValue = true)] + public bool ShouldSendOrderedSrEmail { get; set; } + + /// + /// Whether to notify the account when it signs and sends a document. + /// + /// Whether to notify the account when it signs and sends a document. + [DataMember(Name = "should_send_outbound_conf_emails", EmitDefaultValue = true)] + public bool ShouldSendOutboundConfEmails { get; set; } + + /// + /// Whether to notify the account when someone signs a document sent by its team through a template link. + /// + /// Whether to notify the account when someone signs a document sent by its team through a template link. + [DataMember(Name = "template_link_signature_emails_enabled", EmitDefaultValue = true)] + public bool TemplateLinkSignatureEmailsEnabled { get; set; } + + /// + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + /// + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + [DataMember(Name = "unset", EmitDefaultValue = true)] + public List Unset { 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 AccountSettingsUpdateRequest {\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" CustomSigningRedirectEnabled: ").Append(CustomSigningRedirectEnabled).Append("\n"); + sb.Append(" CustomSigningRedirectUrl: ").Append(CustomSigningRedirectUrl).Append("\n"); + sb.Append(" CustomTagline: ").Append(CustomTagline).Append("\n"); + sb.Append(" DateFormat: ").Append(DateFormat).Append("\n"); + sb.Append(" IsSignatureRemindersEnabled: ").Append(IsSignatureRemindersEnabled).Append("\n"); + sb.Append(" RequestEmailFrom: ").Append(RequestEmailFrom).Append("\n"); + sb.Append(" RequestEmailSignature: ").Append(RequestEmailSignature).Append("\n"); + sb.Append(" RequiredSignatureTypes: ").Append(RequiredSignatureTypes).Append("\n"); + sb.Append(" ShouldEnableTamperProof: ").Append(ShouldEnableTamperProof).Append("\n"); + sb.Append(" ShouldIncludeDistinctPdfs: ").Append(ShouldIncludeDistinctPdfs).Append("\n"); + sb.Append(" ShouldOfferSignerAccessCode: ").Append(ShouldOfferSignerAccessCode).Append("\n"); + sb.Append(" ShouldOfferSignerSmsAuthentication: ").Append(ShouldOfferSignerSmsAuthentication).Append("\n"); + sb.Append(" ShouldRemoveDocumentId: ").Append(ShouldRemoveDocumentId).Append("\n"); + sb.Append(" IsNotifyOnSignEnabled: ").Append(IsNotifyOnSignEnabled).Append("\n"); + sb.Append(" IsNotifyOnViewEnabled: ").Append(IsNotifyOnViewEnabled).Append("\n"); + sb.Append(" ShouldAutocomplete: ").Append(ShouldAutocomplete).Append("\n"); + sb.Append(" ShouldIncludeRequestedPdfs: ").Append(ShouldIncludeRequestedPdfs).Append("\n"); + sb.Append(" ShouldIncludeRequestedPdfsForOthers: ").Append(ShouldIncludeRequestedPdfsForOthers).Append("\n"); + sb.Append(" ShouldIncludeSentDocPdfs: ").Append(ShouldIncludeSentDocPdfs).Append("\n"); + sb.Append(" ShouldIncludeSentDocPdfsForOthers: ").Append(ShouldIncludeSentDocPdfsForOthers).Append("\n"); + sb.Append(" ShouldSendDailySummary: ").Append(ShouldSendDailySummary).Append("\n"); + sb.Append(" ShouldSendEmbeddedSignatureConfEmails: ").Append(ShouldSendEmbeddedSignatureConfEmails).Append("\n"); + sb.Append(" ShouldSendOrderedSrEmail: ").Append(ShouldSendOrderedSrEmail).Append("\n"); + sb.Append(" ShouldSendOutboundConfEmails: ").Append(ShouldSendOutboundConfEmails).Append("\n"); + sb.Append(" TemplateLinkSignatureEmailsEnabled: ").Append(TemplateLinkSignatureEmailsEnabled).Append("\n"); + sb.Append(" Unset: ").Append(Unset).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 AccountSettingsUpdateRequest); + } + + /// + /// Returns true if AccountSettingsUpdateRequest instances are equal + /// + /// Instance of AccountSettingsUpdateRequest to be compared + /// Boolean + public bool Equals(AccountSettingsUpdateRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.CustomSigningRedirectEnabled == input.CustomSigningRedirectEnabled || + this.CustomSigningRedirectEnabled.Equals(input.CustomSigningRedirectEnabled) + ) && + ( + this.CustomSigningRedirectUrl == input.CustomSigningRedirectUrl || + (this.CustomSigningRedirectUrl != null && + this.CustomSigningRedirectUrl.Equals(input.CustomSigningRedirectUrl)) + ) && + ( + this.CustomTagline == input.CustomTagline || + (this.CustomTagline != null && + this.CustomTagline.Equals(input.CustomTagline)) + ) && + ( + this.DateFormat == input.DateFormat || + this.DateFormat.Equals(input.DateFormat) + ) && + ( + this.IsSignatureRemindersEnabled == input.IsSignatureRemindersEnabled || + this.IsSignatureRemindersEnabled.Equals(input.IsSignatureRemindersEnabled) + ) && + ( + this.RequestEmailFrom == input.RequestEmailFrom || + (this.RequestEmailFrom != null && + this.RequestEmailFrom.Equals(input.RequestEmailFrom)) + ) && + ( + this.RequestEmailSignature == input.RequestEmailSignature || + (this.RequestEmailSignature != null && + this.RequestEmailSignature.Equals(input.RequestEmailSignature)) + ) && + ( + this.RequiredSignatureTypes == input.RequiredSignatureTypes || + this.RequiredSignatureTypes != null && + input.RequiredSignatureTypes != null && + this.RequiredSignatureTypes.SequenceEqual(input.RequiredSignatureTypes) + ) && + ( + this.ShouldEnableTamperProof == input.ShouldEnableTamperProof || + this.ShouldEnableTamperProof.Equals(input.ShouldEnableTamperProof) + ) && + ( + this.ShouldIncludeDistinctPdfs == input.ShouldIncludeDistinctPdfs || + this.ShouldIncludeDistinctPdfs.Equals(input.ShouldIncludeDistinctPdfs) + ) && + ( + this.ShouldOfferSignerAccessCode == input.ShouldOfferSignerAccessCode || + this.ShouldOfferSignerAccessCode.Equals(input.ShouldOfferSignerAccessCode) + ) && + ( + this.ShouldOfferSignerSmsAuthentication == input.ShouldOfferSignerSmsAuthentication || + this.ShouldOfferSignerSmsAuthentication.Equals(input.ShouldOfferSignerSmsAuthentication) + ) && + ( + this.ShouldRemoveDocumentId == input.ShouldRemoveDocumentId || + this.ShouldRemoveDocumentId.Equals(input.ShouldRemoveDocumentId) + ) && + ( + this.IsNotifyOnSignEnabled == input.IsNotifyOnSignEnabled || + this.IsNotifyOnSignEnabled.Equals(input.IsNotifyOnSignEnabled) + ) && + ( + this.IsNotifyOnViewEnabled == input.IsNotifyOnViewEnabled || + this.IsNotifyOnViewEnabled.Equals(input.IsNotifyOnViewEnabled) + ) && + ( + this.ShouldAutocomplete == input.ShouldAutocomplete || + this.ShouldAutocomplete.Equals(input.ShouldAutocomplete) + ) && + ( + this.ShouldIncludeRequestedPdfs == input.ShouldIncludeRequestedPdfs || + this.ShouldIncludeRequestedPdfs.Equals(input.ShouldIncludeRequestedPdfs) + ) && + ( + this.ShouldIncludeRequestedPdfsForOthers == input.ShouldIncludeRequestedPdfsForOthers || + this.ShouldIncludeRequestedPdfsForOthers.Equals(input.ShouldIncludeRequestedPdfsForOthers) + ) && + ( + this.ShouldIncludeSentDocPdfs == input.ShouldIncludeSentDocPdfs || + this.ShouldIncludeSentDocPdfs.Equals(input.ShouldIncludeSentDocPdfs) + ) && + ( + this.ShouldIncludeSentDocPdfsForOthers == input.ShouldIncludeSentDocPdfsForOthers || + this.ShouldIncludeSentDocPdfsForOthers.Equals(input.ShouldIncludeSentDocPdfsForOthers) + ) && + ( + this.ShouldSendDailySummary == input.ShouldSendDailySummary || + this.ShouldSendDailySummary.Equals(input.ShouldSendDailySummary) + ) && + ( + this.ShouldSendEmbeddedSignatureConfEmails == input.ShouldSendEmbeddedSignatureConfEmails || + this.ShouldSendEmbeddedSignatureConfEmails.Equals(input.ShouldSendEmbeddedSignatureConfEmails) + ) && + ( + this.ShouldSendOrderedSrEmail == input.ShouldSendOrderedSrEmail || + this.ShouldSendOrderedSrEmail.Equals(input.ShouldSendOrderedSrEmail) + ) && + ( + this.ShouldSendOutboundConfEmails == input.ShouldSendOutboundConfEmails || + this.ShouldSendOutboundConfEmails.Equals(input.ShouldSendOutboundConfEmails) + ) && + ( + this.TemplateLinkSignatureEmailsEnabled == input.TemplateLinkSignatureEmailsEnabled || + this.TemplateLinkSignatureEmailsEnabled.Equals(input.TemplateLinkSignatureEmailsEnabled) + ) && + ( + this.Unset == input.Unset || + this.Unset != null && + input.Unset != null && + this.Unset.SequenceEqual(input.Unset) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CustomSigningRedirectEnabled.GetHashCode(); + if (this.CustomSigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectUrl.GetHashCode(); + } + if (this.CustomTagline != null) + { + hashCode = (hashCode * 59) + this.CustomTagline.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DateFormat.GetHashCode(); + hashCode = (hashCode * 59) + this.IsSignatureRemindersEnabled.GetHashCode(); + if (this.RequestEmailFrom != null) + { + hashCode = (hashCode * 59) + this.RequestEmailFrom.GetHashCode(); + } + if (this.RequestEmailSignature != null) + { + hashCode = (hashCode * 59) + this.RequestEmailSignature.GetHashCode(); + } + if (this.RequiredSignatureTypes != null) + { + hashCode = (hashCode * 59) + this.RequiredSignatureTypes.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ShouldEnableTamperProof.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldIncludeDistinctPdfs.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldOfferSignerAccessCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldOfferSignerSmsAuthentication.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldRemoveDocumentId.GetHashCode(); + hashCode = (hashCode * 59) + this.IsNotifyOnSignEnabled.GetHashCode(); + hashCode = (hashCode * 59) + this.IsNotifyOnViewEnabled.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldAutocomplete.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldIncludeRequestedPdfs.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldIncludeRequestedPdfsForOthers.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldIncludeSentDocPdfs.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldIncludeSentDocPdfsForOthers.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldSendDailySummary.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldSendEmbeddedSignatureConfEmails.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldSendOrderedSrEmail.GetHashCode(); + hashCode = (hashCode * 59) + this.ShouldSendOutboundConfEmails.GetHashCode(); + hashCode = (hashCode * 59) + this.TemplateLinkSignatureEmailsEnabled.GetHashCode(); + if (this.Unset != null) + { + hashCode = (hashCode * 59) + this.Unset.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 = "company", + Property = "Company", + Type = "string", + Value = Company, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_enabled", + Property = "CustomSigningRedirectEnabled", + Type = "bool", + Value = CustomSigningRedirectEnabled, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_url", + Property = "CustomSigningRedirectUrl", + Type = "string", + Value = CustomSigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "custom_tagline", + Property = "CustomTagline", + Type = "string", + Value = CustomTagline, + }); + types.Add(new OpenApiType() + { + Name = "date_format", + Property = "DateFormat", + Type = "DateFormat", + Value = DateFormat, + }); + types.Add(new OpenApiType() + { + Name = "is_signature_reminders_enabled", + Property = "IsSignatureRemindersEnabled", + Type = "bool", + Value = IsSignatureRemindersEnabled, + }); + types.Add(new OpenApiType() + { + Name = "request_email_from", + Property = "RequestEmailFrom", + Type = "string", + Value = RequestEmailFrom, + }); + types.Add(new OpenApiType() + { + Name = "request_email_signature", + Property = "RequestEmailSignature", + Type = "string", + Value = RequestEmailSignature, + }); + types.Add(new OpenApiType() + { + Name = "required_signature_types", + Property = "RequiredSignatureTypes", + Type = "List", + Value = RequiredSignatureTypes, + }); + types.Add(new OpenApiType() + { + Name = "should_enable_tamper_proof", + Property = "ShouldEnableTamperProof", + Type = "bool", + Value = ShouldEnableTamperProof, + }); + types.Add(new OpenApiType() + { + Name = "should_include_distinct_pdfs", + Property = "ShouldIncludeDistinctPdfs", + Type = "bool", + Value = ShouldIncludeDistinctPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_access_code", + Property = "ShouldOfferSignerAccessCode", + Type = "bool", + Value = ShouldOfferSignerAccessCode, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_sms_authentication", + Property = "ShouldOfferSignerSmsAuthentication", + Type = "bool", + Value = ShouldOfferSignerSmsAuthentication, + }); + types.Add(new OpenApiType() + { + Name = "should_remove_document_id", + Property = "ShouldRemoveDocumentId", + Type = "bool", + Value = ShouldRemoveDocumentId, + }); + types.Add(new OpenApiType() + { + Name = "is_notify_on_sign_enabled", + Property = "IsNotifyOnSignEnabled", + Type = "bool", + Value = IsNotifyOnSignEnabled, + }); + types.Add(new OpenApiType() + { + Name = "is_notify_on_view_enabled", + Property = "IsNotifyOnViewEnabled", + Type = "bool", + Value = IsNotifyOnViewEnabled, + }); + types.Add(new OpenApiType() + { + Name = "should_autocomplete", + Property = "ShouldAutocomplete", + Type = "bool", + Value = ShouldAutocomplete, + }); + types.Add(new OpenApiType() + { + Name = "should_include_requested_pdfs", + Property = "ShouldIncludeRequestedPdfs", + Type = "bool", + Value = ShouldIncludeRequestedPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_include_requested_pdfs_for_others", + Property = "ShouldIncludeRequestedPdfsForOthers", + Type = "bool", + Value = ShouldIncludeRequestedPdfsForOthers, + }); + types.Add(new OpenApiType() + { + Name = "should_include_sent_doc_pdfs", + Property = "ShouldIncludeSentDocPdfs", + Type = "bool", + Value = ShouldIncludeSentDocPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_include_sent_doc_pdfs_for_others", + Property = "ShouldIncludeSentDocPdfsForOthers", + Type = "bool", + Value = ShouldIncludeSentDocPdfsForOthers, + }); + types.Add(new OpenApiType() + { + Name = "should_send_daily_summary", + Property = "ShouldSendDailySummary", + Type = "bool", + Value = ShouldSendDailySummary, + }); + types.Add(new OpenApiType() + { + Name = "should_send_embedded_signature_conf_emails", + Property = "ShouldSendEmbeddedSignatureConfEmails", + Type = "bool", + Value = ShouldSendEmbeddedSignatureConfEmails, + }); + types.Add(new OpenApiType() + { + Name = "should_send_ordered_sr_email", + Property = "ShouldSendOrderedSrEmail", + Type = "bool", + Value = ShouldSendOrderedSrEmail, + }); + types.Add(new OpenApiType() + { + Name = "should_send_outbound_conf_emails", + Property = "ShouldSendOutboundConfEmails", + Type = "bool", + Value = ShouldSendOutboundConfEmails, + }); + types.Add(new OpenApiType() + { + Name = "template_link_signature_emails_enabled", + Property = "TemplateLinkSignatureEmailsEnabled", + Type = "bool", + Value = TemplateLinkSignatureEmailsEnabled, + }); + types.Add(new OpenApiType() + { + Name = "unset", + Property = "Unset", + Type = "List", + Value = Unset, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/BooleanSettingUpdate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/BooleanSettingUpdate.cs new file mode 100644 index 000000000..e43d60e23 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/BooleanSettingUpdate.cs @@ -0,0 +1,183 @@ +/* + * 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 +{ + /// + /// Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + /// + [DataContract(Name = "BooleanSettingUpdate")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class BooleanSettingUpdate : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets LockMode + /// + [DataMember(Name = "lock_mode", EmitDefaultValue = true)] + public TeamSettingLock? LockMode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BooleanSettingUpdate() { } + /// + /// Initializes a new instance of the class. + /// + /// Boolean value to store.. + /// lockMode. + public BooleanSettingUpdate(bool value = default(bool), TeamSettingLock? lockMode = default(TeamSettingLock?)) + { + + this.Value = value; + this.LockMode = lockMode; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static BooleanSettingUpdate Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of BooleanSettingUpdate"); + } + + return obj; + } + + /// + /// Boolean value to store. + /// + /// Boolean value to store. + [DataMember(Name = "value", EmitDefaultValue = true)] + public bool Value { 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 BooleanSettingUpdate {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" LockMode: ").Append(LockMode).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 BooleanSettingUpdate); + } + + /// + /// Returns true if BooleanSettingUpdate instances are equal + /// + /// Instance of BooleanSettingUpdate to be compared + /// Boolean + public bool Equals(BooleanSettingUpdate input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + this.Value.Equals(input.Value) + ) && + ( + this.LockMode == input.LockMode || + this.LockMode.Equals(input.LockMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.LockMode.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 = "value", + Property = "Value", + Type = "bool", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "lock_mode", + Property = "LockMode", + Type = "TeamSettingLock", + Value = LockMode, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/DataResidency.cs b/sdks/dotnet/src/Dropbox.Sign/Model/DataResidency.cs new file mode 100644 index 000000000..d88a5daba --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/DataResidency.cs @@ -0,0 +1,73 @@ +/* + * 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 +{ + /// + /// Storage region for team documents. + /// + /// Storage region for team documents. + [JsonConverter(typeof(StringEnumConverter))] + public enum DataResidency + { + /// + /// Enum Us for value: us + /// + [EnumMember(Value = "us")] + Us = 1, + + /// + /// Enum Eu for value: eu + /// + [EnumMember(Value = "eu")] + Eu = 2, + + /// + /// Enum Au for value: au + /// + [EnumMember(Value = "au")] + Au = 3, + + /// + /// Enum Jp for value: jp + /// + [EnumMember(Value = "jp")] + Jp = 4, + + /// + /// Enum Uk for value: uk + /// + [EnumMember(Value = "uk")] + Uk = 5, + + /// + /// Enum Ca for value: ca + /// + [EnumMember(Value = "ca")] + Ca = 6 + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/DataResidencySettingUpdate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/DataResidencySettingUpdate.cs new file mode 100644 index 000000000..2a4cd2a3f --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/DataResidencySettingUpdate.cs @@ -0,0 +1,182 @@ +/* + * 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 +{ + /// + /// Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + /// + [DataContract(Name = "DataResidencySettingUpdate")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class DataResidencySettingUpdate : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", EmitDefaultValue = true)] + public DataResidency? Value { get; set; } + + /// + /// Gets or Sets LockMode + /// + [DataMember(Name = "lock_mode", EmitDefaultValue = true)] + public TeamSettingLock? LockMode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DataResidencySettingUpdate() { } + /// + /// Initializes a new instance of the class. + /// + /// value. + /// lockMode. + public DataResidencySettingUpdate(DataResidency? value = default(DataResidency?), TeamSettingLock? lockMode = default(TeamSettingLock?)) + { + + this.Value = value; + this.LockMode = lockMode; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static DataResidencySettingUpdate Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of DataResidencySettingUpdate"); + } + + return obj; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DataResidencySettingUpdate {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" LockMode: ").Append(LockMode).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 DataResidencySettingUpdate); + } + + /// + /// Returns true if DataResidencySettingUpdate instances are equal + /// + /// Instance of DataResidencySettingUpdate to be compared + /// Boolean + public bool Equals(DataResidencySettingUpdate input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + this.Value.Equals(input.Value) + ) && + ( + this.LockMode == input.LockMode || + this.LockMode.Equals(input.LockMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.LockMode.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 = "value", + Property = "Value", + Type = "DataResidency", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "lock_mode", + Property = "LockMode", + Type = "TeamSettingLock", + Value = LockMode, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/DateFormat.cs b/sdks/dotnet/src/Dropbox.Sign/Model/DateFormat.cs new file mode 100644 index 000000000..d884ff9b1 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/DateFormat.cs @@ -0,0 +1,55 @@ +/* + * 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 +{ + /// + /// Date format used to display dates. + /// + /// Date format used to display dates. + [JsonConverter(typeof(StringEnumConverter))] + public enum DateFormat + { + /// + /// Enum MMDDYYYY for value: MM/DD/YYYY + /// + [EnumMember(Value = "MM/DD/YYYY")] + MMDDYYYY = 1, + + /// + /// Enum DDMMYYYY for value: DD/MM/YYYY + /// + [EnumMember(Value = "DD/MM/YYYY")] + DDMMYYYY = 2, + + /// + /// Enum YYYYMMDD for value: YYYY/MM/DD + /// + [EnumMember(Value = "YYYY/MM/DD")] + YYYYMMDD = 3 + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/DateFormatSettingUpdate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/DateFormatSettingUpdate.cs new file mode 100644 index 000000000..10a1ae5f1 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/DateFormatSettingUpdate.cs @@ -0,0 +1,182 @@ +/* + * 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 +{ + /// + /// Updates a date format team setting. Provide `value`, `lock_mode`, or both. + /// + [DataContract(Name = "DateFormatSettingUpdate")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class DateFormatSettingUpdate : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", EmitDefaultValue = true)] + public DateFormat? Value { get; set; } + + /// + /// Gets or Sets LockMode + /// + [DataMember(Name = "lock_mode", EmitDefaultValue = true)] + public TeamSettingLock? LockMode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DateFormatSettingUpdate() { } + /// + /// Initializes a new instance of the class. + /// + /// value. + /// lockMode. + public DateFormatSettingUpdate(DateFormat? value = default(DateFormat?), TeamSettingLock? lockMode = default(TeamSettingLock?)) + { + + this.Value = value; + this.LockMode = lockMode; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static DateFormatSettingUpdate Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of DateFormatSettingUpdate"); + } + + return obj; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DateFormatSettingUpdate {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" LockMode: ").Append(LockMode).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 DateFormatSettingUpdate); + } + + /// + /// Returns true if DateFormatSettingUpdate instances are equal + /// + /// Instance of DateFormatSettingUpdate to be compared + /// Boolean + public bool Equals(DateFormatSettingUpdate input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + this.Value.Equals(input.Value) + ) && + ( + this.LockMode == input.LockMode || + this.LockMode.Equals(input.LockMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.LockMode.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 = "value", + Property = "Value", + Type = "DateFormat", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "lock_mode", + Property = "LockMode", + Type = "TeamSettingLock", + Value = LockMode, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureType.cs b/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureType.cs new file mode 100644 index 000000000..46010c067 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureType.cs @@ -0,0 +1,61 @@ +/* + * 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 +{ + /// + /// A signature creation method a signer may use. + /// + /// A signature creation method a signer may use. + [JsonConverter(typeof(StringEnumConverter))] + public enum RequiredSignatureType + { + /// + /// Enum Draw for value: draw + /// + [EnumMember(Value = "draw")] + Draw = 1, + + /// + /// Enum Phone for value: phone + /// + [EnumMember(Value = "phone")] + Phone = 2, + + /// + /// Enum Type for value: type + /// + [EnumMember(Value = "type")] + Type = 3, + + /// + /// Enum Upload for value: upload + /// + [EnumMember(Value = "upload")] + Upload = 4 + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureTypesSettingUpdate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureTypesSettingUpdate.cs new file mode 100644 index 000000000..a43d4cd3c --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/RequiredSignatureTypesSettingUpdate.cs @@ -0,0 +1,188 @@ +/* + * 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 +{ + /// + /// Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + /// + [DataContract(Name = "RequiredSignatureTypesSettingUpdate")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class RequiredSignatureTypesSettingUpdate : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets LockMode + /// + [DataMember(Name = "lock_mode", EmitDefaultValue = true)] + public TeamSettingLock? LockMode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RequiredSignatureTypesSettingUpdate() { } + /// + /// Initializes a new instance of the class. + /// + /// Signature creation methods signers may use.. + /// lockMode. + public RequiredSignatureTypesSettingUpdate(List value = default(List), TeamSettingLock? lockMode = default(TeamSettingLock?)) + { + + this.Value = value; + this.LockMode = lockMode; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static RequiredSignatureTypesSettingUpdate Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of RequiredSignatureTypesSettingUpdate"); + } + + return obj; + } + + /// + /// Signature creation methods signers may use. + /// + /// Signature creation methods signers may use. + [DataMember(Name = "value", EmitDefaultValue = true)] + public List Value { 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 RequiredSignatureTypesSettingUpdate {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" LockMode: ").Append(LockMode).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 RequiredSignatureTypesSettingUpdate); + } + + /// + /// Returns true if RequiredSignatureTypesSettingUpdate instances are equal + /// + /// Instance of RequiredSignatureTypesSettingUpdate to be compared + /// Boolean + public bool Equals(RequiredSignatureTypesSettingUpdate input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + this.Value != null && + input.Value != null && + this.Value.SequenceEqual(input.Value) + ) && + ( + this.LockMode == input.LockMode || + this.LockMode.Equals(input.LockMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + hashCode = (hashCode * 59) + this.LockMode.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 = "value", + Property = "Value", + Type = "List", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "lock_mode", + Property = "LockMode", + Type = "TeamSettingLock", + Value = LockMode, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SettingLockResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SettingLockResponse.cs new file mode 100644 index 000000000..86cbec3b6 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SettingLockResponse.cs @@ -0,0 +1,207 @@ +/* + * 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 +{ + /// + /// SettingLockResponse + /// + [DataContract(Name = "SettingLockResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SettingLockResponse : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets Mode + /// + [DataMember(Name = "mode", IsRequired = true, EmitDefaultValue = true)] + public TeamSettingLock Mode { get; set; } + /// + /// Defines Source + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SourceEnum + { + /// + /// Enum Team for value: team + /// + [EnumMember(Value = "team")] + Team = 1, + + /// + /// Enum ParentTeam for value: parent_team + /// + [EnumMember(Value = "parent_team")] + ParentTeam = 2, + + /// + /// Enum Default for value: default + /// + [EnumMember(Value = "default")] + Default = 3 + } + + + /// + /// Gets or Sets Source + /// + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] + public SourceEnum Source { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SettingLockResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// mode (required). + /// source (required). + public SettingLockResponse(TeamSettingLock mode = default(TeamSettingLock), SourceEnum source = default(SourceEnum)) + { + + this.Mode = mode; + this.Source = source; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SettingLockResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SettingLockResponse"); + } + + return obj; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SettingLockResponse {\n"); + sb.Append(" Mode: ").Append(Mode).Append("\n"); + sb.Append(" Source: ").Append(Source).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 SettingLockResponse); + } + + /// + /// Returns true if SettingLockResponse instances are equal + /// + /// Instance of SettingLockResponse to be compared + /// Boolean + public bool Equals(SettingLockResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Mode == input.Mode || + this.Mode.Equals(input.Mode) + ) && + ( + this.Source == input.Source || + this.Source.Equals(input.Source) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Mode.GetHashCode(); + hashCode = (hashCode * 59) + this.Source.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 = "mode", + Property = "Mode", + Type = "TeamSettingLock", + Value = Mode, + }); + types.Add(new OpenApiType() + { + Name = "source", + Property = "Source", + Type = "string", + Value = Source, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SettingResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SettingResponse.cs new file mode 100644 index 000000000..b1ec840ad --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SettingResponse.cs @@ -0,0 +1,347 @@ +/* + * 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 +{ + /// + /// SettingResponse + /// + [DataContract(Name = "SettingResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SettingResponse : IEquatable, IValidatableObject + { + /// + /// Defines Source + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SourceEnum + { + /// + /// Enum Account for value: account + /// + [EnumMember(Value = "account")] + Account = 1, + + /// + /// Enum Team for value: team + /// + [EnumMember(Value = "team")] + Team = 2, + + /// + /// Enum ParentTeam for value: parent_team + /// + [EnumMember(Value = "parent_team")] + ParentTeam = 3, + + /// + /// Enum Default for value: default + /// + [EnumMember(Value = "default")] + Default = 4 + } + + + /// + /// Gets or Sets Source + /// + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] + public SourceEnum Source { get; set; } + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Boolean for value: boolean + /// + [EnumMember(Value = "boolean")] + Boolean = 1, + + /// + /// Enum Integer for value: integer + /// + [EnumMember(Value = "integer")] + Integer = 2, + + /// + /// Enum String for value: string + /// + [EnumMember(Value = "string")] + String = 3, + + /// + /// Enum Array for value: array + /// + [EnumMember(Value = "array")] + Array = 4 + } + + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SettingResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Current value of the setting. Null when the setting has no value. (required). + /// isInherited (required). + /// source (required). + /// type (required). + /// writable (required). + /// varLock (required). + public SettingResponse(Object value = default(Object), bool isInherited = default(bool), SourceEnum source = default(SourceEnum), TypeEnum type = default(TypeEnum), bool writable = default(bool), SettingLockResponse varLock = default(SettingLockResponse)) + { + + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for SettingResponse and cannot be null"); + } + this.Value = value; + this.IsInherited = isInherited; + this.Source = source; + this.Type = type; + this.Writable = writable; + // to ensure "varLock" is required (not null) + if (varLock == null) + { + throw new ArgumentNullException("varLock is a required property for SettingResponse and cannot be null"); + } + this.Lock = varLock; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SettingResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SettingResponse"); + } + + return obj; + } + + /// + /// Current value of the setting. Null when the setting has no value. + /// + /// Current value of the setting. Null when the setting has no value. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public Object Value { get; set; } + + /// + /// Gets or Sets IsInherited + /// + [DataMember(Name = "is_inherited", IsRequired = true, EmitDefaultValue = true)] + public bool IsInherited { get; set; } + + /// + /// Gets or Sets Writable + /// + [DataMember(Name = "writable", IsRequired = true, EmitDefaultValue = true)] + public bool Writable { get; set; } + + /// + /// Gets or Sets Lock + /// + [DataMember(Name = "lock", IsRequired = true, EmitDefaultValue = true)] + public SettingLockResponse Lock { 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 SettingResponse {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" IsInherited: ").Append(IsInherited).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Writable: ").Append(Writable).Append("\n"); + sb.Append(" Lock: ").Append(Lock).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 SettingResponse); + } + + /// + /// Returns true if SettingResponse instances are equal + /// + /// Instance of SettingResponse to be compared + /// Boolean + public bool Equals(SettingResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.IsInherited == input.IsInherited || + this.IsInherited.Equals(input.IsInherited) + ) && + ( + this.Source == input.Source || + this.Source.Equals(input.Source) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.Writable == input.Writable || + this.Writable.Equals(input.Writable) + ) && + ( + this.Lock == input.Lock || + (this.Lock != null && + this.Lock.Equals(input.Lock)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsInherited.GetHashCode(); + hashCode = (hashCode * 59) + this.Source.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Writable.GetHashCode(); + if (this.Lock != null) + { + hashCode = (hashCode * 59) + this.Lock.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 = "value", + Property = "Value", + Type = "Object", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "is_inherited", + Property = "IsInherited", + Type = "bool", + Value = IsInherited, + }); + types.Add(new OpenApiType() + { + Name = "source", + Property = "Source", + Type = "string", + Value = Source, + }); + types.Add(new OpenApiType() + { + Name = "type", + Property = "Type", + Type = "string", + Value = Type, + }); + types.Add(new OpenApiType() + { + Name = "writable", + Property = "Writable", + Type = "bool", + Value = Writable, + }); + types.Add(new OpenApiType() + { + Name = "lock", + Property = "Lock", + Type = "SettingLockResponse", + Value = Lock, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs index 3f56fc76f..e1858d1e9 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs @@ -49,7 +49,7 @@ protected SignatureRequestBulkCreateEmbeddedWithTemplateRequest() { } /// 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.. /// 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.. + /// _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA. /// 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). @@ -157,9 +157,9 @@ public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest Init(string 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. + /// _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs index e374fb50c..4d036316f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs @@ -49,7 +49,7 @@ protected SignatureRequestBulkSendWithTemplateRequest() { } /// 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.. /// 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.. + /// _t__SignatureRequestBulkSendWithTemplate::METADATA. /// 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). @@ -152,9 +152,9 @@ public static SignatureRequestBulkSendWithTemplateRequest Init(string jsonData) 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. + /// _t__SignatureRequestBulkSendWithTemplate::METADATA /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// _t__SignatureRequestBulkSendWithTemplate::METADATA [DataMember(Name = "metadata", EmitDefaultValue = true)] public Dictionary Metadata { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/StringSettingUpdate.cs b/sdks/dotnet/src/Dropbox.Sign/Model/StringSettingUpdate.cs new file mode 100644 index 000000000..6e841182c --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/StringSettingUpdate.cs @@ -0,0 +1,187 @@ +/* + * 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 +{ + /// + /// Updates a string team setting. Provide `value`, `lock_mode`, or both. + /// + [DataContract(Name = "StringSettingUpdate")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class StringSettingUpdate : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets LockMode + /// + [DataMember(Name = "lock_mode", EmitDefaultValue = true)] + public TeamSettingLock? LockMode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StringSettingUpdate() { } + /// + /// Initializes a new instance of the class. + /// + /// String value to store.. + /// lockMode. + public StringSettingUpdate(string value = default(string), TeamSettingLock? lockMode = default(TeamSettingLock?)) + { + + this.Value = value; + this.LockMode = lockMode; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static StringSettingUpdate Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of StringSettingUpdate"); + } + + return obj; + } + + /// + /// String value to store. + /// + /// String value to store. + [DataMember(Name = "value", EmitDefaultValue = true)] + public string Value { 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 StringSettingUpdate {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" LockMode: ").Append(LockMode).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 StringSettingUpdate); + } + + /// + /// Returns true if StringSettingUpdate instances are equal + /// + /// Instance of StringSettingUpdate to be compared + /// Boolean + public bool Equals(StringSettingUpdate input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.LockMode == input.LockMode || + this.LockMode.Equals(input.LockMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + hashCode = (hashCode * 59) + this.LockMode.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 = "value", + Property = "Value", + Type = "string", + Value = Value, + }); + types.Add(new OpenApiType() + { + Name = "lock_mode", + Property = "LockMode", + Type = "TeamSettingLock", + Value = LockMode, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs index 3651de670..8c17f645f 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubBulkSignerList.cs @@ -43,11 +43,13 @@ protected SubBulkSignerList() { } /// /// An array of custom field values.. /// Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value.. - public SubBulkSignerList(List customFields = default(List), List signers = default(List)) + /// _t__Sub::BulkSigner::METADATA. + public SubBulkSignerList(List customFields = default(List), List signers = default(List), Dictionary metadata = default(Dictionary)) { this.CustomFields = customFields; this.Signers = signers; + this.Metadata = metadata; } /// @@ -80,6 +82,13 @@ public static SubBulkSignerList Init(string jsonData) [DataMember(Name = "signers", EmitDefaultValue = true)] public List Signers { get; set; } + /// + /// _t__Sub::BulkSigner::METADATA + /// + /// _t__Sub::BulkSigner::METADATA + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + /// /// Returns the string presentation of the object /// @@ -90,6 +99,7 @@ public override string ToString() sb.Append("class SubBulkSignerList {\n"); sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); sb.Append(" Signers: ").Append(Signers).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -136,6 +146,12 @@ public bool Equals(SubBulkSignerList input) this.Signers != null && input.Signers != null && this.Signers.SequenceEqual(input.Signers) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) ); } @@ -156,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Signers.GetHashCode(); } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } return hashCode; } } @@ -186,6 +206,13 @@ public List GetOpenApiTypes() Type = "List", Value = Signers, }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs index 28d663851..7107fbf81 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamCreateRequest.cs @@ -42,11 +42,13 @@ protected TeamCreateRequest() { } /// Initializes a new instance of the class. /// /// The name of your Team. (default to "Untitled Team"). - public TeamCreateRequest(string name = @"Untitled Team") + /// _t__TeamCreate::PARENT_TEAM_ID. + public TeamCreateRequest(string name = @"Untitled Team", string parentTeamId = default(string)) { // use default value if no "name" provided this.Name = name ?? "Untitled Team"; + this.ParentTeamId = parentTeamId; } /// @@ -72,6 +74,14 @@ public static TeamCreateRequest Init(string jsonData) [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } + /// + /// _t__TeamCreate::PARENT_TEAM_ID + /// + /// _t__TeamCreate::PARENT_TEAM_ID + /// 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + [DataMember(Name = "parent_team_id", EmitDefaultValue = true)] + public string ParentTeamId { get; set; } + /// /// Returns the string presentation of the object /// @@ -81,6 +91,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class TeamCreateRequest {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ParentTeamId: ").Append(ParentTeamId).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -120,6 +131,11 @@ public bool Equals(TeamCreateRequest input) this.Name == input.Name || (this.Name != null && this.Name.Equals(input.Name)) + ) && + ( + this.ParentTeamId == input.ParentTeamId || + (this.ParentTeamId != null && + this.ParentTeamId.Equals(input.ParentTeamId)) ); } @@ -136,6 +152,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Name.GetHashCode(); } + if (this.ParentTeamId != null) + { + hashCode = (hashCode * 59) + this.ParentTeamId.GetHashCode(); + } return hashCode; } } @@ -159,6 +179,13 @@ public List GetOpenApiTypes() Type = "string", Value = Name, }); + types.Add(new OpenApiType() + { + Name = "parent_team_id", + Property = "ParentTeamId", + Type = "string", + Value = ParentTeamId, + }); return types; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs index 56d78eb53..bbbac99d5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamResponse.cs @@ -41,13 +41,17 @@ protected TeamResponse() { } /// /// Initializes a new instance of the class. /// + /// The id of a team. + /// _t__Team::PARENT_TEAM_ID. /// The name of your Team. /// accounts. /// A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`.. /// A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.. - public TeamResponse(string name = default(string), List accounts = default(List), List invitedAccounts = default(List), List invitedEmails = default(List)) + public TeamResponse(string teamId = default(string), string parentTeamId = default(string), string name = default(string), List accounts = default(List), List invitedAccounts = default(List), List invitedEmails = default(List)) { + this.TeamId = teamId; + this.ParentTeamId = parentTeamId; this.Name = name; this.Accounts = accounts; this.InvitedAccounts = invitedAccounts; @@ -70,6 +74,20 @@ public static TeamResponse Init(string jsonData) return obj; } + /// + /// The id of a team + /// + /// The id of a team + [DataMember(Name = "team_id", EmitDefaultValue = true)] + public string TeamId { get; set; } + + /// + /// _t__Team::PARENT_TEAM_ID + /// + /// _t__Team::PARENT_TEAM_ID + [DataMember(Name = "parent_team_id", EmitDefaultValue = true)] + public string ParentTeamId { get; set; } + /// /// The name of your Team /// @@ -105,6 +123,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TeamResponse {\n"); + sb.Append(" TeamId: ").Append(TeamId).Append("\n"); + sb.Append(" ParentTeamId: ").Append(ParentTeamId).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Accounts: ").Append(Accounts).Append("\n"); sb.Append(" InvitedAccounts: ").Append(InvitedAccounts).Append("\n"); @@ -144,6 +164,16 @@ public bool Equals(TeamResponse input) return false; } return + ( + this.TeamId == input.TeamId || + (this.TeamId != null && + this.TeamId.Equals(input.TeamId)) + ) && + ( + this.ParentTeamId == input.ParentTeamId || + (this.ParentTeamId != null && + this.ParentTeamId.Equals(input.ParentTeamId)) + ) && ( this.Name == input.Name || (this.Name != null && @@ -178,6 +208,14 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.TeamId != null) + { + hashCode = (hashCode * 59) + this.TeamId.GetHashCode(); + } + if (this.ParentTeamId != null) + { + hashCode = (hashCode * 59) + this.ParentTeamId.GetHashCode(); + } if (this.Name != null) { hashCode = (hashCode * 59) + this.Name.GetHashCode(); @@ -211,6 +249,20 @@ public List GetOpenApiTypes() { var types = new List(); types.Add(new OpenApiType() + { + Name = "team_id", + Property = "TeamId", + Type = "string", + Value = TeamId, + }); + types.Add(new OpenApiType() + { + Name = "parent_team_id", + Property = "ParentTeamId", + Type = "string", + Value = ParentTeamId, + }); + types.Add(new OpenApiType() { Name = "name", Property = "Name", diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingLock.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingLock.cs new file mode 100644 index 000000000..1d3c17d46 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingLock.cs @@ -0,0 +1,55 @@ +/* + * 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 +{ + /// + /// Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + /// + /// Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + [JsonConverter(typeof(StringEnumConverter))] + public enum TeamSettingLock + { + /// + /// Enum OrganizationAdmins for value: organization_admins + /// + [EnumMember(Value = "organization_admins")] + OrganizationAdmins = 1, + + /// + /// Enum TeamAdmins for value: team_admins + /// + [EnumMember(Value = "team_admins")] + TeamAdmins = 2, + + /// + /// Enum Members for value: members + /// + [EnumMember(Value = "members")] + Members = 3 + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponse.cs new file mode 100644 index 000000000..5396e5ca3 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponse.cs @@ -0,0 +1,227 @@ +/* + * 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 +{ + /// + /// TeamSettingsResponse + /// + [DataContract(Name = "TeamSettingsResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class TeamSettingsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamSettingsResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// teamId (required). + /// settings (required). + /// A list of warnings.. + public TeamSettingsResponse(string teamId = default(string), TeamSettingsResponseSettings settings = default(TeamSettingsResponseSettings), List warnings = default(List)) + { + + // to ensure "teamId" is required (not null) + if (teamId == null) + { + throw new ArgumentNullException("teamId is a required property for TeamSettingsResponse and cannot be null"); + } + this.TeamId = teamId; + // to ensure "settings" is required (not null) + if (settings == null) + { + throw new ArgumentNullException("settings is a required property for TeamSettingsResponse and cannot be null"); + } + this.Settings = settings; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static TeamSettingsResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of TeamSettingsResponse"); + } + + return obj; + } + + /// + /// Gets or Sets TeamId + /// + [DataMember(Name = "team_id", IsRequired = true, EmitDefaultValue = true)] + public string TeamId { get; set; } + + /// + /// Gets or Sets Settings + /// + [DataMember(Name = "settings", IsRequired = true, EmitDefaultValue = true)] + public TeamSettingsResponseSettings Settings { 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 TeamSettingsResponse {\n"); + sb.Append(" TeamId: ").Append(TeamId).Append("\n"); + sb.Append(" Settings: ").Append(Settings).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 TeamSettingsResponse); + } + + /// + /// Returns true if TeamSettingsResponse instances are equal + /// + /// Instance of TeamSettingsResponse to be compared + /// Boolean + public bool Equals(TeamSettingsResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.TeamId == input.TeamId || + (this.TeamId != null && + this.TeamId.Equals(input.TeamId)) + ) && + ( + this.Settings == input.Settings || + (this.Settings != null && + this.Settings.Equals(input.Settings)) + ) && + ( + 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.TeamId != null) + { + hashCode = (hashCode * 59) + this.TeamId.GetHashCode(); + } + if (this.Settings != null) + { + hashCode = (hashCode * 59) + this.Settings.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 = "team_id", + Property = "TeamId", + Type = "string", + Value = TeamId, + }); + types.Add(new OpenApiType() + { + Name = "settings", + Property = "Settings", + Type = "TeamSettingsResponseSettings", + Value = Settings, + }); + types.Add(new OpenApiType() + { + Name = "warnings", + Property = "Warnings", + Type = "List", + Value = Warnings, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponseSettings.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponseSettings.cs new file mode 100644 index 000000000..13657e29a --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsResponseSettings.cs @@ -0,0 +1,915 @@ +/* + * 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 +{ + /// + /// TeamSettingsResponseSettings + /// + [DataContract(Name = "TeamSettingsResponseSettings")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class TeamSettingsResponseSettings : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamSettingsResponseSettings() { } + /// + /// Initializes a new instance of the class. + /// + /// Company name associated with this account or team. (required). + /// Whether signers are redirected to a custom URL after completing a signature request. (required). + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. (required). + /// Custom tagline displayed with the account or team branding. (required). + /// Date format used to display dates. List the setting in `unset` to inherit the default. (required). + /// Whether automatic reminder emails are enabled for incomplete signature requests. (required). + /// Sender name shown on signature request emails. (required). + /// Signature appended to signature request emails. (required). + /// Signature creation methods signers may use. (required). + /// Whether completed documents include a digital tamper-proof seal. (required). + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. (required). + /// Whether senders can require an access code to verify a signer. (required). + /// Whether senders can require SMS authentication to verify a signer. (required). + /// Whether the Dropbox Sign document ID is hidden on sent documents. (required). + /// Storage region for team documents. (required). + /// Whether team members can delete a document for all participants. (required). + /// Whether team members can download CSV files. (required). + /// Whether team members are prevented from creating templates. (required). + /// Whether team members are prevented from using the template gallery. (required). + /// Default message enforced for team members when they create self-signed documents. (required). + /// Default title enforced for team members when they create self-signed documents. (required). + /// Default message enforced for team members when they create signature requests. (required). + /// Default title enforced for team members when they create signature requests. (required). + /// Whether authenticator-app multifactor authentication is enabled for the team. (required). + /// Whether SMS multifactor authentication is enabled for the team. (required). + public TeamSettingsResponseSettings(SettingResponse company = default(SettingResponse), SettingResponse customSigningRedirectEnabled = default(SettingResponse), SettingResponse customSigningRedirectUrl = default(SettingResponse), SettingResponse customTagline = default(SettingResponse), SettingResponse dateFormat = default(SettingResponse), SettingResponse isSignatureRemindersEnabled = default(SettingResponse), SettingResponse requestEmailFrom = default(SettingResponse), SettingResponse requestEmailSignature = default(SettingResponse), SettingResponse requiredSignatureTypes = default(SettingResponse), SettingResponse shouldEnableTamperProof = default(SettingResponse), SettingResponse shouldIncludeDistinctPdfs = default(SettingResponse), SettingResponse shouldOfferSignerAccessCode = default(SettingResponse), SettingResponse shouldOfferSignerSmsAuthentication = default(SettingResponse), SettingResponse shouldRemoveDocumentId = default(SettingResponse), SettingResponse dataResidency = default(SettingResponse), SettingResponse allowTeamDeleteDocumentForEveryone = default(SettingResponse), SettingResponse allowTeamDownloadCsv = default(SettingResponse), SettingResponse lockTeamTemplateCreation = default(SettingResponse), SettingResponse lockTeamTemplateGallery = default(SettingResponse), SettingResponse selfSignMessage = default(SettingResponse), SettingResponse selfSignTitle = default(SettingResponse), SettingResponse signatureRequestMessage = default(SettingResponse), SettingResponse signatureRequestTitle = default(SettingResponse), SettingResponse multifactorAuthApp = default(SettingResponse), SettingResponse multifactorAuthSms = default(SettingResponse)) + { + + // to ensure "company" is required (not null) + if (company == null) + { + throw new ArgumentNullException("company is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.Company = company; + // to ensure "customSigningRedirectEnabled" is required (not null) + if (customSigningRedirectEnabled == null) + { + throw new ArgumentNullException("customSigningRedirectEnabled is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.CustomSigningRedirectEnabled = customSigningRedirectEnabled; + // to ensure "customSigningRedirectUrl" is required (not null) + if (customSigningRedirectUrl == null) + { + throw new ArgumentNullException("customSigningRedirectUrl is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.CustomSigningRedirectUrl = customSigningRedirectUrl; + // to ensure "customTagline" is required (not null) + if (customTagline == null) + { + throw new ArgumentNullException("customTagline is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.CustomTagline = customTagline; + // to ensure "dateFormat" is required (not null) + if (dateFormat == null) + { + throw new ArgumentNullException("dateFormat is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.DateFormat = dateFormat; + // to ensure "isSignatureRemindersEnabled" is required (not null) + if (isSignatureRemindersEnabled == null) + { + throw new ArgumentNullException("isSignatureRemindersEnabled is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.IsSignatureRemindersEnabled = isSignatureRemindersEnabled; + // to ensure "requestEmailFrom" is required (not null) + if (requestEmailFrom == null) + { + throw new ArgumentNullException("requestEmailFrom is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.RequestEmailFrom = requestEmailFrom; + // to ensure "requestEmailSignature" is required (not null) + if (requestEmailSignature == null) + { + throw new ArgumentNullException("requestEmailSignature is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.RequestEmailSignature = requestEmailSignature; + // to ensure "requiredSignatureTypes" is required (not null) + if (requiredSignatureTypes == null) + { + throw new ArgumentNullException("requiredSignatureTypes is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.RequiredSignatureTypes = requiredSignatureTypes; + // to ensure "shouldEnableTamperProof" is required (not null) + if (shouldEnableTamperProof == null) + { + throw new ArgumentNullException("shouldEnableTamperProof is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.ShouldEnableTamperProof = shouldEnableTamperProof; + // to ensure "shouldIncludeDistinctPdfs" is required (not null) + if (shouldIncludeDistinctPdfs == null) + { + throw new ArgumentNullException("shouldIncludeDistinctPdfs is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.ShouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + // to ensure "shouldOfferSignerAccessCode" is required (not null) + if (shouldOfferSignerAccessCode == null) + { + throw new ArgumentNullException("shouldOfferSignerAccessCode is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.ShouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + // to ensure "shouldOfferSignerSmsAuthentication" is required (not null) + if (shouldOfferSignerSmsAuthentication == null) + { + throw new ArgumentNullException("shouldOfferSignerSmsAuthentication is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.ShouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + // to ensure "shouldRemoveDocumentId" is required (not null) + if (shouldRemoveDocumentId == null) + { + throw new ArgumentNullException("shouldRemoveDocumentId is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.ShouldRemoveDocumentId = shouldRemoveDocumentId; + // to ensure "dataResidency" is required (not null) + if (dataResidency == null) + { + throw new ArgumentNullException("dataResidency is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.DataResidency = dataResidency; + // to ensure "allowTeamDeleteDocumentForEveryone" is required (not null) + if (allowTeamDeleteDocumentForEveryone == null) + { + throw new ArgumentNullException("allowTeamDeleteDocumentForEveryone is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.AllowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + // to ensure "allowTeamDownloadCsv" is required (not null) + if (allowTeamDownloadCsv == null) + { + throw new ArgumentNullException("allowTeamDownloadCsv is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.AllowTeamDownloadCsv = allowTeamDownloadCsv; + // to ensure "lockTeamTemplateCreation" is required (not null) + if (lockTeamTemplateCreation == null) + { + throw new ArgumentNullException("lockTeamTemplateCreation is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.LockTeamTemplateCreation = lockTeamTemplateCreation; + // to ensure "lockTeamTemplateGallery" is required (not null) + if (lockTeamTemplateGallery == null) + { + throw new ArgumentNullException("lockTeamTemplateGallery is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.LockTeamTemplateGallery = lockTeamTemplateGallery; + // to ensure "selfSignMessage" is required (not null) + if (selfSignMessage == null) + { + throw new ArgumentNullException("selfSignMessage is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.SelfSignMessage = selfSignMessage; + // to ensure "selfSignTitle" is required (not null) + if (selfSignTitle == null) + { + throw new ArgumentNullException("selfSignTitle is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.SelfSignTitle = selfSignTitle; + // to ensure "signatureRequestMessage" is required (not null) + if (signatureRequestMessage == null) + { + throw new ArgumentNullException("signatureRequestMessage is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.SignatureRequestMessage = signatureRequestMessage; + // to ensure "signatureRequestTitle" is required (not null) + if (signatureRequestTitle == null) + { + throw new ArgumentNullException("signatureRequestTitle is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.SignatureRequestTitle = signatureRequestTitle; + // to ensure "multifactorAuthApp" is required (not null) + if (multifactorAuthApp == null) + { + throw new ArgumentNullException("multifactorAuthApp is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.MultifactorAuthApp = multifactorAuthApp; + // to ensure "multifactorAuthSms" is required (not null) + if (multifactorAuthSms == null) + { + throw new ArgumentNullException("multifactorAuthSms is a required property for TeamSettingsResponseSettings and cannot be null"); + } + this.MultifactorAuthSms = multifactorAuthSms; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static TeamSettingsResponseSettings Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of TeamSettingsResponseSettings"); + } + + return obj; + } + + /// + /// Company name associated with this account or team. + /// + /// Company name associated with this account or team. + [DataMember(Name = "company", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse Company { get; set; } + + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + [DataMember(Name = "custom_signing_redirect_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomSigningRedirectEnabled { get; set; } + + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + [DataMember(Name = "custom_signing_redirect_url", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomSigningRedirectUrl { get; set; } + + /// + /// Custom tagline displayed with the account or team branding. + /// + /// Custom tagline displayed with the account or team branding. + [DataMember(Name = "custom_tagline", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse CustomTagline { get; set; } + + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + [DataMember(Name = "date_format", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse DateFormat { get; set; } + + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + [DataMember(Name = "is_signature_reminders_enabled", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse IsSignatureRemindersEnabled { get; set; } + + /// + /// Sender name shown on signature request emails. + /// + /// Sender name shown on signature request emails. + [DataMember(Name = "request_email_from", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequestEmailFrom { get; set; } + + /// + /// Signature appended to signature request emails. + /// + /// Signature appended to signature request emails. + [DataMember(Name = "request_email_signature", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequestEmailSignature { get; set; } + + /// + /// Signature creation methods signers may use. + /// + /// Signature creation methods signers may use. + [DataMember(Name = "required_signature_types", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse RequiredSignatureTypes { get; set; } + + /// + /// Whether completed documents include a digital tamper-proof seal. + /// + /// Whether completed documents include a digital tamper-proof seal. + [DataMember(Name = "should_enable_tamper_proof", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldEnableTamperProof { get; set; } + + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + [DataMember(Name = "should_include_distinct_pdfs", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldIncludeDistinctPdfs { get; set; } + + /// + /// Whether senders can require an access code to verify a signer. + /// + /// Whether senders can require an access code to verify a signer. + [DataMember(Name = "should_offer_signer_access_code", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldOfferSignerAccessCode { get; set; } + + /// + /// Whether senders can require SMS authentication to verify a signer. + /// + /// Whether senders can require SMS authentication to verify a signer. + [DataMember(Name = "should_offer_signer_sms_authentication", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldOfferSignerSmsAuthentication { get; set; } + + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + [DataMember(Name = "should_remove_document_id", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse ShouldRemoveDocumentId { get; set; } + + /// + /// Storage region for team documents. + /// + /// Storage region for team documents. + [DataMember(Name = "data_residency", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse DataResidency { get; set; } + + /// + /// Whether team members can delete a document for all participants. + /// + /// Whether team members can delete a document for all participants. + [DataMember(Name = "allow_team_delete_document_for_everyone", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse AllowTeamDeleteDocumentForEveryone { get; set; } + + /// + /// Whether team members can download CSV files. + /// + /// Whether team members can download CSV files. + [DataMember(Name = "allow_team_download_csv", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse AllowTeamDownloadCsv { get; set; } + + /// + /// Whether team members are prevented from creating templates. + /// + /// Whether team members are prevented from creating templates. + [DataMember(Name = "lock_team_template_creation", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse LockTeamTemplateCreation { get; set; } + + /// + /// Whether team members are prevented from using the template gallery. + /// + /// Whether team members are prevented from using the template gallery. + [DataMember(Name = "lock_team_template_gallery", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse LockTeamTemplateGallery { get; set; } + + /// + /// Default message enforced for team members when they create self-signed documents. + /// + /// Default message enforced for team members when they create self-signed documents. + [DataMember(Name = "self_sign_message", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse SelfSignMessage { get; set; } + + /// + /// Default title enforced for team members when they create self-signed documents. + /// + /// Default title enforced for team members when they create self-signed documents. + [DataMember(Name = "self_sign_title", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse SelfSignTitle { get; set; } + + /// + /// Default message enforced for team members when they create signature requests. + /// + /// Default message enforced for team members when they create signature requests. + [DataMember(Name = "signature_request_message", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse SignatureRequestMessage { get; set; } + + /// + /// Default title enforced for team members when they create signature requests. + /// + /// Default title enforced for team members when they create signature requests. + [DataMember(Name = "signature_request_title", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse SignatureRequestTitle { get; set; } + + /// + /// Whether authenticator-app multifactor authentication is enabled for the team. + /// + /// Whether authenticator-app multifactor authentication is enabled for the team. + [DataMember(Name = "multifactor_auth_app", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse MultifactorAuthApp { get; set; } + + /// + /// Whether SMS multifactor authentication is enabled for the team. + /// + /// Whether SMS multifactor authentication is enabled for the team. + [DataMember(Name = "multifactor_auth_sms", IsRequired = true, EmitDefaultValue = true)] + public SettingResponse MultifactorAuthSms { 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 TeamSettingsResponseSettings {\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" CustomSigningRedirectEnabled: ").Append(CustomSigningRedirectEnabled).Append("\n"); + sb.Append(" CustomSigningRedirectUrl: ").Append(CustomSigningRedirectUrl).Append("\n"); + sb.Append(" CustomTagline: ").Append(CustomTagline).Append("\n"); + sb.Append(" DateFormat: ").Append(DateFormat).Append("\n"); + sb.Append(" IsSignatureRemindersEnabled: ").Append(IsSignatureRemindersEnabled).Append("\n"); + sb.Append(" RequestEmailFrom: ").Append(RequestEmailFrom).Append("\n"); + sb.Append(" RequestEmailSignature: ").Append(RequestEmailSignature).Append("\n"); + sb.Append(" RequiredSignatureTypes: ").Append(RequiredSignatureTypes).Append("\n"); + sb.Append(" ShouldEnableTamperProof: ").Append(ShouldEnableTamperProof).Append("\n"); + sb.Append(" ShouldIncludeDistinctPdfs: ").Append(ShouldIncludeDistinctPdfs).Append("\n"); + sb.Append(" ShouldOfferSignerAccessCode: ").Append(ShouldOfferSignerAccessCode).Append("\n"); + sb.Append(" ShouldOfferSignerSmsAuthentication: ").Append(ShouldOfferSignerSmsAuthentication).Append("\n"); + sb.Append(" ShouldRemoveDocumentId: ").Append(ShouldRemoveDocumentId).Append("\n"); + sb.Append(" DataResidency: ").Append(DataResidency).Append("\n"); + sb.Append(" AllowTeamDeleteDocumentForEveryone: ").Append(AllowTeamDeleteDocumentForEveryone).Append("\n"); + sb.Append(" AllowTeamDownloadCsv: ").Append(AllowTeamDownloadCsv).Append("\n"); + sb.Append(" LockTeamTemplateCreation: ").Append(LockTeamTemplateCreation).Append("\n"); + sb.Append(" LockTeamTemplateGallery: ").Append(LockTeamTemplateGallery).Append("\n"); + sb.Append(" SelfSignMessage: ").Append(SelfSignMessage).Append("\n"); + sb.Append(" SelfSignTitle: ").Append(SelfSignTitle).Append("\n"); + sb.Append(" SignatureRequestMessage: ").Append(SignatureRequestMessage).Append("\n"); + sb.Append(" SignatureRequestTitle: ").Append(SignatureRequestTitle).Append("\n"); + sb.Append(" MultifactorAuthApp: ").Append(MultifactorAuthApp).Append("\n"); + sb.Append(" MultifactorAuthSms: ").Append(MultifactorAuthSms).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 TeamSettingsResponseSettings); + } + + /// + /// Returns true if TeamSettingsResponseSettings instances are equal + /// + /// Instance of TeamSettingsResponseSettings to be compared + /// Boolean + public bool Equals(TeamSettingsResponseSettings input) + { + if (input == null) + { + return false; + } + return + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.CustomSigningRedirectEnabled == input.CustomSigningRedirectEnabled || + (this.CustomSigningRedirectEnabled != null && + this.CustomSigningRedirectEnabled.Equals(input.CustomSigningRedirectEnabled)) + ) && + ( + this.CustomSigningRedirectUrl == input.CustomSigningRedirectUrl || + (this.CustomSigningRedirectUrl != null && + this.CustomSigningRedirectUrl.Equals(input.CustomSigningRedirectUrl)) + ) && + ( + this.CustomTagline == input.CustomTagline || + (this.CustomTagline != null && + this.CustomTagline.Equals(input.CustomTagline)) + ) && + ( + this.DateFormat == input.DateFormat || + (this.DateFormat != null && + this.DateFormat.Equals(input.DateFormat)) + ) && + ( + this.IsSignatureRemindersEnabled == input.IsSignatureRemindersEnabled || + (this.IsSignatureRemindersEnabled != null && + this.IsSignatureRemindersEnabled.Equals(input.IsSignatureRemindersEnabled)) + ) && + ( + this.RequestEmailFrom == input.RequestEmailFrom || + (this.RequestEmailFrom != null && + this.RequestEmailFrom.Equals(input.RequestEmailFrom)) + ) && + ( + this.RequestEmailSignature == input.RequestEmailSignature || + (this.RequestEmailSignature != null && + this.RequestEmailSignature.Equals(input.RequestEmailSignature)) + ) && + ( + this.RequiredSignatureTypes == input.RequiredSignatureTypes || + (this.RequiredSignatureTypes != null && + this.RequiredSignatureTypes.Equals(input.RequiredSignatureTypes)) + ) && + ( + this.ShouldEnableTamperProof == input.ShouldEnableTamperProof || + (this.ShouldEnableTamperProof != null && + this.ShouldEnableTamperProof.Equals(input.ShouldEnableTamperProof)) + ) && + ( + this.ShouldIncludeDistinctPdfs == input.ShouldIncludeDistinctPdfs || + (this.ShouldIncludeDistinctPdfs != null && + this.ShouldIncludeDistinctPdfs.Equals(input.ShouldIncludeDistinctPdfs)) + ) && + ( + this.ShouldOfferSignerAccessCode == input.ShouldOfferSignerAccessCode || + (this.ShouldOfferSignerAccessCode != null && + this.ShouldOfferSignerAccessCode.Equals(input.ShouldOfferSignerAccessCode)) + ) && + ( + this.ShouldOfferSignerSmsAuthentication == input.ShouldOfferSignerSmsAuthentication || + (this.ShouldOfferSignerSmsAuthentication != null && + this.ShouldOfferSignerSmsAuthentication.Equals(input.ShouldOfferSignerSmsAuthentication)) + ) && + ( + this.ShouldRemoveDocumentId == input.ShouldRemoveDocumentId || + (this.ShouldRemoveDocumentId != null && + this.ShouldRemoveDocumentId.Equals(input.ShouldRemoveDocumentId)) + ) && + ( + this.DataResidency == input.DataResidency || + (this.DataResidency != null && + this.DataResidency.Equals(input.DataResidency)) + ) && + ( + this.AllowTeamDeleteDocumentForEveryone == input.AllowTeamDeleteDocumentForEveryone || + (this.AllowTeamDeleteDocumentForEveryone != null && + this.AllowTeamDeleteDocumentForEveryone.Equals(input.AllowTeamDeleteDocumentForEveryone)) + ) && + ( + this.AllowTeamDownloadCsv == input.AllowTeamDownloadCsv || + (this.AllowTeamDownloadCsv != null && + this.AllowTeamDownloadCsv.Equals(input.AllowTeamDownloadCsv)) + ) && + ( + this.LockTeamTemplateCreation == input.LockTeamTemplateCreation || + (this.LockTeamTemplateCreation != null && + this.LockTeamTemplateCreation.Equals(input.LockTeamTemplateCreation)) + ) && + ( + this.LockTeamTemplateGallery == input.LockTeamTemplateGallery || + (this.LockTeamTemplateGallery != null && + this.LockTeamTemplateGallery.Equals(input.LockTeamTemplateGallery)) + ) && + ( + this.SelfSignMessage == input.SelfSignMessage || + (this.SelfSignMessage != null && + this.SelfSignMessage.Equals(input.SelfSignMessage)) + ) && + ( + this.SelfSignTitle == input.SelfSignTitle || + (this.SelfSignTitle != null && + this.SelfSignTitle.Equals(input.SelfSignTitle)) + ) && + ( + this.SignatureRequestMessage == input.SignatureRequestMessage || + (this.SignatureRequestMessage != null && + this.SignatureRequestMessage.Equals(input.SignatureRequestMessage)) + ) && + ( + this.SignatureRequestTitle == input.SignatureRequestTitle || + (this.SignatureRequestTitle != null && + this.SignatureRequestTitle.Equals(input.SignatureRequestTitle)) + ) && + ( + this.MultifactorAuthApp == input.MultifactorAuthApp || + (this.MultifactorAuthApp != null && + this.MultifactorAuthApp.Equals(input.MultifactorAuthApp)) + ) && + ( + this.MultifactorAuthSms == input.MultifactorAuthSms || + (this.MultifactorAuthSms != null && + this.MultifactorAuthSms.Equals(input.MultifactorAuthSms)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.CustomSigningRedirectEnabled != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectEnabled.GetHashCode(); + } + if (this.CustomSigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectUrl.GetHashCode(); + } + if (this.CustomTagline != null) + { + hashCode = (hashCode * 59) + this.CustomTagline.GetHashCode(); + } + if (this.DateFormat != null) + { + hashCode = (hashCode * 59) + this.DateFormat.GetHashCode(); + } + if (this.IsSignatureRemindersEnabled != null) + { + hashCode = (hashCode * 59) + this.IsSignatureRemindersEnabled.GetHashCode(); + } + if (this.RequestEmailFrom != null) + { + hashCode = (hashCode * 59) + this.RequestEmailFrom.GetHashCode(); + } + if (this.RequestEmailSignature != null) + { + hashCode = (hashCode * 59) + this.RequestEmailSignature.GetHashCode(); + } + if (this.RequiredSignatureTypes != null) + { + hashCode = (hashCode * 59) + this.RequiredSignatureTypes.GetHashCode(); + } + if (this.ShouldEnableTamperProof != null) + { + hashCode = (hashCode * 59) + this.ShouldEnableTamperProof.GetHashCode(); + } + if (this.ShouldIncludeDistinctPdfs != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeDistinctPdfs.GetHashCode(); + } + if (this.ShouldOfferSignerAccessCode != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerAccessCode.GetHashCode(); + } + if (this.ShouldOfferSignerSmsAuthentication != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerSmsAuthentication.GetHashCode(); + } + if (this.ShouldRemoveDocumentId != null) + { + hashCode = (hashCode * 59) + this.ShouldRemoveDocumentId.GetHashCode(); + } + if (this.DataResidency != null) + { + hashCode = (hashCode * 59) + this.DataResidency.GetHashCode(); + } + if (this.AllowTeamDeleteDocumentForEveryone != null) + { + hashCode = (hashCode * 59) + this.AllowTeamDeleteDocumentForEveryone.GetHashCode(); + } + if (this.AllowTeamDownloadCsv != null) + { + hashCode = (hashCode * 59) + this.AllowTeamDownloadCsv.GetHashCode(); + } + if (this.LockTeamTemplateCreation != null) + { + hashCode = (hashCode * 59) + this.LockTeamTemplateCreation.GetHashCode(); + } + if (this.LockTeamTemplateGallery != null) + { + hashCode = (hashCode * 59) + this.LockTeamTemplateGallery.GetHashCode(); + } + if (this.SelfSignMessage != null) + { + hashCode = (hashCode * 59) + this.SelfSignMessage.GetHashCode(); + } + if (this.SelfSignTitle != null) + { + hashCode = (hashCode * 59) + this.SelfSignTitle.GetHashCode(); + } + if (this.SignatureRequestMessage != null) + { + hashCode = (hashCode * 59) + this.SignatureRequestMessage.GetHashCode(); + } + if (this.SignatureRequestTitle != null) + { + hashCode = (hashCode * 59) + this.SignatureRequestTitle.GetHashCode(); + } + if (this.MultifactorAuthApp != null) + { + hashCode = (hashCode * 59) + this.MultifactorAuthApp.GetHashCode(); + } + if (this.MultifactorAuthSms != null) + { + hashCode = (hashCode * 59) + this.MultifactorAuthSms.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 = "company", + Property = "Company", + Type = "SettingResponse", + Value = Company, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_enabled", + Property = "CustomSigningRedirectEnabled", + Type = "SettingResponse", + Value = CustomSigningRedirectEnabled, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_url", + Property = "CustomSigningRedirectUrl", + Type = "SettingResponse", + Value = CustomSigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "custom_tagline", + Property = "CustomTagline", + Type = "SettingResponse", + Value = CustomTagline, + }); + types.Add(new OpenApiType() + { + Name = "date_format", + Property = "DateFormat", + Type = "SettingResponse", + Value = DateFormat, + }); + types.Add(new OpenApiType() + { + Name = "is_signature_reminders_enabled", + Property = "IsSignatureRemindersEnabled", + Type = "SettingResponse", + Value = IsSignatureRemindersEnabled, + }); + types.Add(new OpenApiType() + { + Name = "request_email_from", + Property = "RequestEmailFrom", + Type = "SettingResponse", + Value = RequestEmailFrom, + }); + types.Add(new OpenApiType() + { + Name = "request_email_signature", + Property = "RequestEmailSignature", + Type = "SettingResponse", + Value = RequestEmailSignature, + }); + types.Add(new OpenApiType() + { + Name = "required_signature_types", + Property = "RequiredSignatureTypes", + Type = "SettingResponse", + Value = RequiredSignatureTypes, + }); + types.Add(new OpenApiType() + { + Name = "should_enable_tamper_proof", + Property = "ShouldEnableTamperProof", + Type = "SettingResponse", + Value = ShouldEnableTamperProof, + }); + types.Add(new OpenApiType() + { + Name = "should_include_distinct_pdfs", + Property = "ShouldIncludeDistinctPdfs", + Type = "SettingResponse", + Value = ShouldIncludeDistinctPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_access_code", + Property = "ShouldOfferSignerAccessCode", + Type = "SettingResponse", + Value = ShouldOfferSignerAccessCode, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_sms_authentication", + Property = "ShouldOfferSignerSmsAuthentication", + Type = "SettingResponse", + Value = ShouldOfferSignerSmsAuthentication, + }); + types.Add(new OpenApiType() + { + Name = "should_remove_document_id", + Property = "ShouldRemoveDocumentId", + Type = "SettingResponse", + Value = ShouldRemoveDocumentId, + }); + types.Add(new OpenApiType() + { + Name = "data_residency", + Property = "DataResidency", + Type = "SettingResponse", + Value = DataResidency, + }); + types.Add(new OpenApiType() + { + Name = "allow_team_delete_document_for_everyone", + Property = "AllowTeamDeleteDocumentForEveryone", + Type = "SettingResponse", + Value = AllowTeamDeleteDocumentForEveryone, + }); + types.Add(new OpenApiType() + { + Name = "allow_team_download_csv", + Property = "AllowTeamDownloadCsv", + Type = "SettingResponse", + Value = AllowTeamDownloadCsv, + }); + types.Add(new OpenApiType() + { + Name = "lock_team_template_creation", + Property = "LockTeamTemplateCreation", + Type = "SettingResponse", + Value = LockTeamTemplateCreation, + }); + types.Add(new OpenApiType() + { + Name = "lock_team_template_gallery", + Property = "LockTeamTemplateGallery", + Type = "SettingResponse", + Value = LockTeamTemplateGallery, + }); + types.Add(new OpenApiType() + { + Name = "self_sign_message", + Property = "SelfSignMessage", + Type = "SettingResponse", + Value = SelfSignMessage, + }); + types.Add(new OpenApiType() + { + Name = "self_sign_title", + Property = "SelfSignTitle", + Type = "SettingResponse", + Value = SelfSignTitle, + }); + types.Add(new OpenApiType() + { + Name = "signature_request_message", + Property = "SignatureRequestMessage", + Type = "SettingResponse", + Value = SignatureRequestMessage, + }); + types.Add(new OpenApiType() + { + Name = "signature_request_title", + Property = "SignatureRequestTitle", + Type = "SettingResponse", + Value = SignatureRequestTitle, + }); + types.Add(new OpenApiType() + { + Name = "multifactor_auth_app", + Property = "MultifactorAuthApp", + Type = "SettingResponse", + Value = MultifactorAuthApp, + }); + types.Add(new OpenApiType() + { + Name = "multifactor_auth_sms", + Property = "MultifactorAuthSms", + Type = "SettingResponse", + Value = MultifactorAuthSms, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsUpdateRequest.cs new file mode 100644 index 000000000..d8c2ccb92 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TeamSettingsUpdateRequest.cs @@ -0,0 +1,974 @@ +/* + * 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 +{ + /// + /// TeamSettingsUpdateRequest + /// + [DataContract(Name = "TeamSettingsUpdateRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class TeamSettingsUpdateRequest : IEquatable, IValidatableObject + { + /// + /// Defines Unset + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum UnsetEnum + { + /// + /// Enum Company for value: company + /// + [EnumMember(Value = "company")] + Company = 1, + + /// + /// Enum CustomSigningRedirectEnabled for value: custom_signing_redirect_enabled + /// + [EnumMember(Value = "custom_signing_redirect_enabled")] + CustomSigningRedirectEnabled = 2, + + /// + /// Enum CustomSigningRedirectUrl for value: custom_signing_redirect_url + /// + [EnumMember(Value = "custom_signing_redirect_url")] + CustomSigningRedirectUrl = 3, + + /// + /// Enum CustomTagline for value: custom_tagline + /// + [EnumMember(Value = "custom_tagline")] + CustomTagline = 4, + + /// + /// Enum DateFormat for value: date_format + /// + [EnumMember(Value = "date_format")] + DateFormat = 5, + + /// + /// Enum IsSignatureRemindersEnabled for value: is_signature_reminders_enabled + /// + [EnumMember(Value = "is_signature_reminders_enabled")] + IsSignatureRemindersEnabled = 6, + + /// + /// Enum RequestEmailFrom for value: request_email_from + /// + [EnumMember(Value = "request_email_from")] + RequestEmailFrom = 7, + + /// + /// Enum RequestEmailSignature for value: request_email_signature + /// + [EnumMember(Value = "request_email_signature")] + RequestEmailSignature = 8, + + /// + /// Enum RequiredSignatureTypes for value: required_signature_types + /// + [EnumMember(Value = "required_signature_types")] + RequiredSignatureTypes = 9, + + /// + /// Enum ShouldEnableTamperProof for value: should_enable_tamper_proof + /// + [EnumMember(Value = "should_enable_tamper_proof")] + ShouldEnableTamperProof = 10, + + /// + /// Enum ShouldIncludeDistinctPdfs for value: should_include_distinct_pdfs + /// + [EnumMember(Value = "should_include_distinct_pdfs")] + ShouldIncludeDistinctPdfs = 11, + + /// + /// Enum ShouldOfferSignerAccessCode for value: should_offer_signer_access_code + /// + [EnumMember(Value = "should_offer_signer_access_code")] + ShouldOfferSignerAccessCode = 12, + + /// + /// Enum ShouldOfferSignerSmsAuthentication for value: should_offer_signer_sms_authentication + /// + [EnumMember(Value = "should_offer_signer_sms_authentication")] + ShouldOfferSignerSmsAuthentication = 13, + + /// + /// Enum ShouldRemoveDocumentId for value: should_remove_document_id + /// + [EnumMember(Value = "should_remove_document_id")] + ShouldRemoveDocumentId = 14, + + /// + /// Enum DataResidency for value: data_residency + /// + [EnumMember(Value = "data_residency")] + DataResidency = 15, + + /// + /// Enum AllowTeamDeleteDocumentForEveryone for value: allow_team_delete_document_for_everyone + /// + [EnumMember(Value = "allow_team_delete_document_for_everyone")] + AllowTeamDeleteDocumentForEveryone = 16, + + /// + /// Enum AllowTeamDownloadCsv for value: allow_team_download_csv + /// + [EnumMember(Value = "allow_team_download_csv")] + AllowTeamDownloadCsv = 17, + + /// + /// Enum LockTeamTemplateCreation for value: lock_team_template_creation + /// + [EnumMember(Value = "lock_team_template_creation")] + LockTeamTemplateCreation = 18, + + /// + /// Enum LockTeamTemplateGallery for value: lock_team_template_gallery + /// + [EnumMember(Value = "lock_team_template_gallery")] + LockTeamTemplateGallery = 19, + + /// + /// Enum SelfSignMessage for value: self_sign_message + /// + [EnumMember(Value = "self_sign_message")] + SelfSignMessage = 20, + + /// + /// Enum SelfSignTitle for value: self_sign_title + /// + [EnumMember(Value = "self_sign_title")] + SelfSignTitle = 21, + + /// + /// Enum SignatureRequestMessage for value: signature_request_message + /// + [EnumMember(Value = "signature_request_message")] + SignatureRequestMessage = 22, + + /// + /// Enum SignatureRequestTitle for value: signature_request_title + /// + [EnumMember(Value = "signature_request_title")] + SignatureRequestTitle = 23, + + /// + /// Enum MultifactorAuthApp for value: multifactor_auth_app + /// + [EnumMember(Value = "multifactor_auth_app")] + MultifactorAuthApp = 24, + + /// + /// Enum MultifactorAuthSms for value: multifactor_auth_sms + /// + [EnumMember(Value = "multifactor_auth_sms")] + MultifactorAuthSms = 25 + } + + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TeamSettingsUpdateRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Company name associated with this account or team.. + /// Whether signers are redirected to a custom URL after completing a signature request.. + /// URL where signers are redirected after completing a signature request when custom redirects are enabled.. + /// Custom tagline displayed with the account or team branding.. + /// Date format used to display dates. List the setting in `unset` to inherit the default.. + /// Whether automatic reminder emails are enabled for incomplete signature requests.. + /// Sender name shown on signature request emails.. + /// Signature appended to signature request emails.. + /// Signature creation methods signers may use.. + /// Whether completed documents include a digital tamper-proof seal.. + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF.. + /// Whether senders can require an access code to verify a signer.. + /// Whether senders can require SMS authentication to verify a signer.. + /// Whether the Dropbox Sign document ID is hidden on sent documents.. + /// Storage region for team documents.. + /// Whether team members can delete a document for all participants.. + /// Whether team members can download CSV files.. + /// Whether team members are prevented from creating templates.. + /// Whether team members are prevented from using the template gallery.. + /// Default message enforced for team members when they create self-signed documents.. + /// Default title enforced for team members when they create self-signed documents.. + /// Default message enforced for team members when they create signature requests.. + /// Default title enforced for team members when they create signature requests.. + /// Whether authenticator-app multifactor authentication is enabled for the team.. + /// Whether SMS multifactor authentication is enabled for the team.. + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.. + public TeamSettingsUpdateRequest(StringSettingUpdate company = default(StringSettingUpdate), BooleanSettingUpdate customSigningRedirectEnabled = default(BooleanSettingUpdate), StringSettingUpdate customSigningRedirectUrl = default(StringSettingUpdate), StringSettingUpdate customTagline = default(StringSettingUpdate), DateFormatSettingUpdate dateFormat = default(DateFormatSettingUpdate), BooleanSettingUpdate isSignatureRemindersEnabled = default(BooleanSettingUpdate), StringSettingUpdate requestEmailFrom = default(StringSettingUpdate), StringSettingUpdate requestEmailSignature = default(StringSettingUpdate), RequiredSignatureTypesSettingUpdate requiredSignatureTypes = default(RequiredSignatureTypesSettingUpdate), BooleanSettingUpdate shouldEnableTamperProof = default(BooleanSettingUpdate), BooleanSettingUpdate shouldIncludeDistinctPdfs = default(BooleanSettingUpdate), BooleanSettingUpdate shouldOfferSignerAccessCode = default(BooleanSettingUpdate), BooleanSettingUpdate shouldOfferSignerSmsAuthentication = default(BooleanSettingUpdate), BooleanSettingUpdate shouldRemoveDocumentId = default(BooleanSettingUpdate), DataResidencySettingUpdate dataResidency = default(DataResidencySettingUpdate), BooleanSettingUpdate allowTeamDeleteDocumentForEveryone = default(BooleanSettingUpdate), BooleanSettingUpdate allowTeamDownloadCsv = default(BooleanSettingUpdate), BooleanSettingUpdate lockTeamTemplateCreation = default(BooleanSettingUpdate), BooleanSettingUpdate lockTeamTemplateGallery = default(BooleanSettingUpdate), StringSettingUpdate selfSignMessage = default(StringSettingUpdate), StringSettingUpdate selfSignTitle = default(StringSettingUpdate), StringSettingUpdate signatureRequestMessage = default(StringSettingUpdate), StringSettingUpdate signatureRequestTitle = default(StringSettingUpdate), BooleanSettingUpdate multifactorAuthApp = default(BooleanSettingUpdate), BooleanSettingUpdate multifactorAuthSms = default(BooleanSettingUpdate), List unset = default(List)) + { + + this.Company = company; + this.CustomSigningRedirectEnabled = customSigningRedirectEnabled; + this.CustomSigningRedirectUrl = customSigningRedirectUrl; + this.CustomTagline = customTagline; + this.DateFormat = dateFormat; + this.IsSignatureRemindersEnabled = isSignatureRemindersEnabled; + this.RequestEmailFrom = requestEmailFrom; + this.RequestEmailSignature = requestEmailSignature; + this.RequiredSignatureTypes = requiredSignatureTypes; + this.ShouldEnableTamperProof = shouldEnableTamperProof; + this.ShouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + this.ShouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + this.ShouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + this.ShouldRemoveDocumentId = shouldRemoveDocumentId; + this.DataResidency = dataResidency; + this.AllowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + this.AllowTeamDownloadCsv = allowTeamDownloadCsv; + this.LockTeamTemplateCreation = lockTeamTemplateCreation; + this.LockTeamTemplateGallery = lockTeamTemplateGallery; + this.SelfSignMessage = selfSignMessage; + this.SelfSignTitle = selfSignTitle; + this.SignatureRequestMessage = signatureRequestMessage; + this.SignatureRequestTitle = signatureRequestTitle; + this.MultifactorAuthApp = multifactorAuthApp; + this.MultifactorAuthSms = multifactorAuthSms; + this.Unset = unset; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static TeamSettingsUpdateRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of TeamSettingsUpdateRequest"); + } + + return obj; + } + + /// + /// Company name associated with this account or team. + /// + /// Company name associated with this account or team. + [DataMember(Name = "company", EmitDefaultValue = true)] + public StringSettingUpdate Company { get; set; } + + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + /// + /// Whether signers are redirected to a custom URL after completing a signature request. + [DataMember(Name = "custom_signing_redirect_enabled", EmitDefaultValue = true)] + public BooleanSettingUpdate CustomSigningRedirectEnabled { get; set; } + + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + /// + /// URL where signers are redirected after completing a signature request when custom redirects are enabled. + [DataMember(Name = "custom_signing_redirect_url", EmitDefaultValue = true)] + public StringSettingUpdate CustomSigningRedirectUrl { get; set; } + + /// + /// Custom tagline displayed with the account or team branding. + /// + /// Custom tagline displayed with the account or team branding. + [DataMember(Name = "custom_tagline", EmitDefaultValue = true)] + public StringSettingUpdate CustomTagline { get; set; } + + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + /// + /// Date format used to display dates. List the setting in `unset` to inherit the default. + [DataMember(Name = "date_format", EmitDefaultValue = true)] + public DateFormatSettingUpdate DateFormat { get; set; } + + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + /// + /// Whether automatic reminder emails are enabled for incomplete signature requests. + [DataMember(Name = "is_signature_reminders_enabled", EmitDefaultValue = true)] + public BooleanSettingUpdate IsSignatureRemindersEnabled { get; set; } + + /// + /// Sender name shown on signature request emails. + /// + /// Sender name shown on signature request emails. + [DataMember(Name = "request_email_from", EmitDefaultValue = true)] + public StringSettingUpdate RequestEmailFrom { get; set; } + + /// + /// Signature appended to signature request emails. + /// + /// Signature appended to signature request emails. + [DataMember(Name = "request_email_signature", EmitDefaultValue = true)] + public StringSettingUpdate RequestEmailSignature { get; set; } + + /// + /// Signature creation methods signers may use. + /// + /// Signature creation methods signers may use. + [DataMember(Name = "required_signature_types", EmitDefaultValue = true)] + public RequiredSignatureTypesSettingUpdate RequiredSignatureTypes { get; set; } + + /// + /// Whether completed documents include a digital tamper-proof seal. + /// + /// Whether completed documents include a digital tamper-proof seal. + [DataMember(Name = "should_enable_tamper_proof", EmitDefaultValue = true)] + public BooleanSettingUpdate ShouldEnableTamperProof { get; set; } + + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + /// + /// Whether completed documents remain as separate PDF files instead of being merged into one PDF. + [DataMember(Name = "should_include_distinct_pdfs", EmitDefaultValue = true)] + public BooleanSettingUpdate ShouldIncludeDistinctPdfs { get; set; } + + /// + /// Whether senders can require an access code to verify a signer. + /// + /// Whether senders can require an access code to verify a signer. + [DataMember(Name = "should_offer_signer_access_code", EmitDefaultValue = true)] + public BooleanSettingUpdate ShouldOfferSignerAccessCode { get; set; } + + /// + /// Whether senders can require SMS authentication to verify a signer. + /// + /// Whether senders can require SMS authentication to verify a signer. + [DataMember(Name = "should_offer_signer_sms_authentication", EmitDefaultValue = true)] + public BooleanSettingUpdate ShouldOfferSignerSmsAuthentication { get; set; } + + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + /// + /// Whether the Dropbox Sign document ID is hidden on sent documents. + [DataMember(Name = "should_remove_document_id", EmitDefaultValue = true)] + public BooleanSettingUpdate ShouldRemoveDocumentId { get; set; } + + /// + /// Storage region for team documents. + /// + /// Storage region for team documents. + [DataMember(Name = "data_residency", EmitDefaultValue = true)] + public DataResidencySettingUpdate DataResidency { get; set; } + + /// + /// Whether team members can delete a document for all participants. + /// + /// Whether team members can delete a document for all participants. + [DataMember(Name = "allow_team_delete_document_for_everyone", EmitDefaultValue = true)] + public BooleanSettingUpdate AllowTeamDeleteDocumentForEveryone { get; set; } + + /// + /// Whether team members can download CSV files. + /// + /// Whether team members can download CSV files. + [DataMember(Name = "allow_team_download_csv", EmitDefaultValue = true)] + public BooleanSettingUpdate AllowTeamDownloadCsv { get; set; } + + /// + /// Whether team members are prevented from creating templates. + /// + /// Whether team members are prevented from creating templates. + [DataMember(Name = "lock_team_template_creation", EmitDefaultValue = true)] + public BooleanSettingUpdate LockTeamTemplateCreation { get; set; } + + /// + /// Whether team members are prevented from using the template gallery. + /// + /// Whether team members are prevented from using the template gallery. + [DataMember(Name = "lock_team_template_gallery", EmitDefaultValue = true)] + public BooleanSettingUpdate LockTeamTemplateGallery { get; set; } + + /// + /// Default message enforced for team members when they create self-signed documents. + /// + /// Default message enforced for team members when they create self-signed documents. + [DataMember(Name = "self_sign_message", EmitDefaultValue = true)] + public StringSettingUpdate SelfSignMessage { get; set; } + + /// + /// Default title enforced for team members when they create self-signed documents. + /// + /// Default title enforced for team members when they create self-signed documents. + [DataMember(Name = "self_sign_title", EmitDefaultValue = true)] + public StringSettingUpdate SelfSignTitle { get; set; } + + /// + /// Default message enforced for team members when they create signature requests. + /// + /// Default message enforced for team members when they create signature requests. + [DataMember(Name = "signature_request_message", EmitDefaultValue = true)] + public StringSettingUpdate SignatureRequestMessage { get; set; } + + /// + /// Default title enforced for team members when they create signature requests. + /// + /// Default title enforced for team members when they create signature requests. + [DataMember(Name = "signature_request_title", EmitDefaultValue = true)] + public StringSettingUpdate SignatureRequestTitle { get; set; } + + /// + /// Whether authenticator-app multifactor authentication is enabled for the team. + /// + /// Whether authenticator-app multifactor authentication is enabled for the team. + [DataMember(Name = "multifactor_auth_app", EmitDefaultValue = true)] + public BooleanSettingUpdate MultifactorAuthApp { get; set; } + + /// + /// Whether SMS multifactor authentication is enabled for the team. + /// + /// Whether SMS multifactor authentication is enabled for the team. + [DataMember(Name = "multifactor_auth_sms", EmitDefaultValue = true)] + public BooleanSettingUpdate MultifactorAuthSms { get; set; } + + /// + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + /// + /// Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + [DataMember(Name = "unset", EmitDefaultValue = true)] + public List Unset { 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 TeamSettingsUpdateRequest {\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" CustomSigningRedirectEnabled: ").Append(CustomSigningRedirectEnabled).Append("\n"); + sb.Append(" CustomSigningRedirectUrl: ").Append(CustomSigningRedirectUrl).Append("\n"); + sb.Append(" CustomTagline: ").Append(CustomTagline).Append("\n"); + sb.Append(" DateFormat: ").Append(DateFormat).Append("\n"); + sb.Append(" IsSignatureRemindersEnabled: ").Append(IsSignatureRemindersEnabled).Append("\n"); + sb.Append(" RequestEmailFrom: ").Append(RequestEmailFrom).Append("\n"); + sb.Append(" RequestEmailSignature: ").Append(RequestEmailSignature).Append("\n"); + sb.Append(" RequiredSignatureTypes: ").Append(RequiredSignatureTypes).Append("\n"); + sb.Append(" ShouldEnableTamperProof: ").Append(ShouldEnableTamperProof).Append("\n"); + sb.Append(" ShouldIncludeDistinctPdfs: ").Append(ShouldIncludeDistinctPdfs).Append("\n"); + sb.Append(" ShouldOfferSignerAccessCode: ").Append(ShouldOfferSignerAccessCode).Append("\n"); + sb.Append(" ShouldOfferSignerSmsAuthentication: ").Append(ShouldOfferSignerSmsAuthentication).Append("\n"); + sb.Append(" ShouldRemoveDocumentId: ").Append(ShouldRemoveDocumentId).Append("\n"); + sb.Append(" DataResidency: ").Append(DataResidency).Append("\n"); + sb.Append(" AllowTeamDeleteDocumentForEveryone: ").Append(AllowTeamDeleteDocumentForEveryone).Append("\n"); + sb.Append(" AllowTeamDownloadCsv: ").Append(AllowTeamDownloadCsv).Append("\n"); + sb.Append(" LockTeamTemplateCreation: ").Append(LockTeamTemplateCreation).Append("\n"); + sb.Append(" LockTeamTemplateGallery: ").Append(LockTeamTemplateGallery).Append("\n"); + sb.Append(" SelfSignMessage: ").Append(SelfSignMessage).Append("\n"); + sb.Append(" SelfSignTitle: ").Append(SelfSignTitle).Append("\n"); + sb.Append(" SignatureRequestMessage: ").Append(SignatureRequestMessage).Append("\n"); + sb.Append(" SignatureRequestTitle: ").Append(SignatureRequestTitle).Append("\n"); + sb.Append(" MultifactorAuthApp: ").Append(MultifactorAuthApp).Append("\n"); + sb.Append(" MultifactorAuthSms: ").Append(MultifactorAuthSms).Append("\n"); + sb.Append(" Unset: ").Append(Unset).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 TeamSettingsUpdateRequest); + } + + /// + /// Returns true if TeamSettingsUpdateRequest instances are equal + /// + /// Instance of TeamSettingsUpdateRequest to be compared + /// Boolean + public bool Equals(TeamSettingsUpdateRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.CustomSigningRedirectEnabled == input.CustomSigningRedirectEnabled || + (this.CustomSigningRedirectEnabled != null && + this.CustomSigningRedirectEnabled.Equals(input.CustomSigningRedirectEnabled)) + ) && + ( + this.CustomSigningRedirectUrl == input.CustomSigningRedirectUrl || + (this.CustomSigningRedirectUrl != null && + this.CustomSigningRedirectUrl.Equals(input.CustomSigningRedirectUrl)) + ) && + ( + this.CustomTagline == input.CustomTagline || + (this.CustomTagline != null && + this.CustomTagline.Equals(input.CustomTagline)) + ) && + ( + this.DateFormat == input.DateFormat || + (this.DateFormat != null && + this.DateFormat.Equals(input.DateFormat)) + ) && + ( + this.IsSignatureRemindersEnabled == input.IsSignatureRemindersEnabled || + (this.IsSignatureRemindersEnabled != null && + this.IsSignatureRemindersEnabled.Equals(input.IsSignatureRemindersEnabled)) + ) && + ( + this.RequestEmailFrom == input.RequestEmailFrom || + (this.RequestEmailFrom != null && + this.RequestEmailFrom.Equals(input.RequestEmailFrom)) + ) && + ( + this.RequestEmailSignature == input.RequestEmailSignature || + (this.RequestEmailSignature != null && + this.RequestEmailSignature.Equals(input.RequestEmailSignature)) + ) && + ( + this.RequiredSignatureTypes == input.RequiredSignatureTypes || + (this.RequiredSignatureTypes != null && + this.RequiredSignatureTypes.Equals(input.RequiredSignatureTypes)) + ) && + ( + this.ShouldEnableTamperProof == input.ShouldEnableTamperProof || + (this.ShouldEnableTamperProof != null && + this.ShouldEnableTamperProof.Equals(input.ShouldEnableTamperProof)) + ) && + ( + this.ShouldIncludeDistinctPdfs == input.ShouldIncludeDistinctPdfs || + (this.ShouldIncludeDistinctPdfs != null && + this.ShouldIncludeDistinctPdfs.Equals(input.ShouldIncludeDistinctPdfs)) + ) && + ( + this.ShouldOfferSignerAccessCode == input.ShouldOfferSignerAccessCode || + (this.ShouldOfferSignerAccessCode != null && + this.ShouldOfferSignerAccessCode.Equals(input.ShouldOfferSignerAccessCode)) + ) && + ( + this.ShouldOfferSignerSmsAuthentication == input.ShouldOfferSignerSmsAuthentication || + (this.ShouldOfferSignerSmsAuthentication != null && + this.ShouldOfferSignerSmsAuthentication.Equals(input.ShouldOfferSignerSmsAuthentication)) + ) && + ( + this.ShouldRemoveDocumentId == input.ShouldRemoveDocumentId || + (this.ShouldRemoveDocumentId != null && + this.ShouldRemoveDocumentId.Equals(input.ShouldRemoveDocumentId)) + ) && + ( + this.DataResidency == input.DataResidency || + (this.DataResidency != null && + this.DataResidency.Equals(input.DataResidency)) + ) && + ( + this.AllowTeamDeleteDocumentForEveryone == input.AllowTeamDeleteDocumentForEveryone || + (this.AllowTeamDeleteDocumentForEveryone != null && + this.AllowTeamDeleteDocumentForEveryone.Equals(input.AllowTeamDeleteDocumentForEveryone)) + ) && + ( + this.AllowTeamDownloadCsv == input.AllowTeamDownloadCsv || + (this.AllowTeamDownloadCsv != null && + this.AllowTeamDownloadCsv.Equals(input.AllowTeamDownloadCsv)) + ) && + ( + this.LockTeamTemplateCreation == input.LockTeamTemplateCreation || + (this.LockTeamTemplateCreation != null && + this.LockTeamTemplateCreation.Equals(input.LockTeamTemplateCreation)) + ) && + ( + this.LockTeamTemplateGallery == input.LockTeamTemplateGallery || + (this.LockTeamTemplateGallery != null && + this.LockTeamTemplateGallery.Equals(input.LockTeamTemplateGallery)) + ) && + ( + this.SelfSignMessage == input.SelfSignMessage || + (this.SelfSignMessage != null && + this.SelfSignMessage.Equals(input.SelfSignMessage)) + ) && + ( + this.SelfSignTitle == input.SelfSignTitle || + (this.SelfSignTitle != null && + this.SelfSignTitle.Equals(input.SelfSignTitle)) + ) && + ( + this.SignatureRequestMessage == input.SignatureRequestMessage || + (this.SignatureRequestMessage != null && + this.SignatureRequestMessage.Equals(input.SignatureRequestMessage)) + ) && + ( + this.SignatureRequestTitle == input.SignatureRequestTitle || + (this.SignatureRequestTitle != null && + this.SignatureRequestTitle.Equals(input.SignatureRequestTitle)) + ) && + ( + this.MultifactorAuthApp == input.MultifactorAuthApp || + (this.MultifactorAuthApp != null && + this.MultifactorAuthApp.Equals(input.MultifactorAuthApp)) + ) && + ( + this.MultifactorAuthSms == input.MultifactorAuthSms || + (this.MultifactorAuthSms != null && + this.MultifactorAuthSms.Equals(input.MultifactorAuthSms)) + ) && + ( + this.Unset == input.Unset || + this.Unset != null && + input.Unset != null && + this.Unset.SequenceEqual(input.Unset) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Company != null) + { + hashCode = (hashCode * 59) + this.Company.GetHashCode(); + } + if (this.CustomSigningRedirectEnabled != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectEnabled.GetHashCode(); + } + if (this.CustomSigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.CustomSigningRedirectUrl.GetHashCode(); + } + if (this.CustomTagline != null) + { + hashCode = (hashCode * 59) + this.CustomTagline.GetHashCode(); + } + if (this.DateFormat != null) + { + hashCode = (hashCode * 59) + this.DateFormat.GetHashCode(); + } + if (this.IsSignatureRemindersEnabled != null) + { + hashCode = (hashCode * 59) + this.IsSignatureRemindersEnabled.GetHashCode(); + } + if (this.RequestEmailFrom != null) + { + hashCode = (hashCode * 59) + this.RequestEmailFrom.GetHashCode(); + } + if (this.RequestEmailSignature != null) + { + hashCode = (hashCode * 59) + this.RequestEmailSignature.GetHashCode(); + } + if (this.RequiredSignatureTypes != null) + { + hashCode = (hashCode * 59) + this.RequiredSignatureTypes.GetHashCode(); + } + if (this.ShouldEnableTamperProof != null) + { + hashCode = (hashCode * 59) + this.ShouldEnableTamperProof.GetHashCode(); + } + if (this.ShouldIncludeDistinctPdfs != null) + { + hashCode = (hashCode * 59) + this.ShouldIncludeDistinctPdfs.GetHashCode(); + } + if (this.ShouldOfferSignerAccessCode != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerAccessCode.GetHashCode(); + } + if (this.ShouldOfferSignerSmsAuthentication != null) + { + hashCode = (hashCode * 59) + this.ShouldOfferSignerSmsAuthentication.GetHashCode(); + } + if (this.ShouldRemoveDocumentId != null) + { + hashCode = (hashCode * 59) + this.ShouldRemoveDocumentId.GetHashCode(); + } + if (this.DataResidency != null) + { + hashCode = (hashCode * 59) + this.DataResidency.GetHashCode(); + } + if (this.AllowTeamDeleteDocumentForEveryone != null) + { + hashCode = (hashCode * 59) + this.AllowTeamDeleteDocumentForEveryone.GetHashCode(); + } + if (this.AllowTeamDownloadCsv != null) + { + hashCode = (hashCode * 59) + this.AllowTeamDownloadCsv.GetHashCode(); + } + if (this.LockTeamTemplateCreation != null) + { + hashCode = (hashCode * 59) + this.LockTeamTemplateCreation.GetHashCode(); + } + if (this.LockTeamTemplateGallery != null) + { + hashCode = (hashCode * 59) + this.LockTeamTemplateGallery.GetHashCode(); + } + if (this.SelfSignMessage != null) + { + hashCode = (hashCode * 59) + this.SelfSignMessage.GetHashCode(); + } + if (this.SelfSignTitle != null) + { + hashCode = (hashCode * 59) + this.SelfSignTitle.GetHashCode(); + } + if (this.SignatureRequestMessage != null) + { + hashCode = (hashCode * 59) + this.SignatureRequestMessage.GetHashCode(); + } + if (this.SignatureRequestTitle != null) + { + hashCode = (hashCode * 59) + this.SignatureRequestTitle.GetHashCode(); + } + if (this.MultifactorAuthApp != null) + { + hashCode = (hashCode * 59) + this.MultifactorAuthApp.GetHashCode(); + } + if (this.MultifactorAuthSms != null) + { + hashCode = (hashCode * 59) + this.MultifactorAuthSms.GetHashCode(); + } + if (this.Unset != null) + { + hashCode = (hashCode * 59) + this.Unset.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 = "company", + Property = "Company", + Type = "StringSettingUpdate", + Value = Company, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_enabled", + Property = "CustomSigningRedirectEnabled", + Type = "BooleanSettingUpdate", + Value = CustomSigningRedirectEnabled, + }); + types.Add(new OpenApiType() + { + Name = "custom_signing_redirect_url", + Property = "CustomSigningRedirectUrl", + Type = "StringSettingUpdate", + Value = CustomSigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "custom_tagline", + Property = "CustomTagline", + Type = "StringSettingUpdate", + Value = CustomTagline, + }); + types.Add(new OpenApiType() + { + Name = "date_format", + Property = "DateFormat", + Type = "DateFormatSettingUpdate", + Value = DateFormat, + }); + types.Add(new OpenApiType() + { + Name = "is_signature_reminders_enabled", + Property = "IsSignatureRemindersEnabled", + Type = "BooleanSettingUpdate", + Value = IsSignatureRemindersEnabled, + }); + types.Add(new OpenApiType() + { + Name = "request_email_from", + Property = "RequestEmailFrom", + Type = "StringSettingUpdate", + Value = RequestEmailFrom, + }); + types.Add(new OpenApiType() + { + Name = "request_email_signature", + Property = "RequestEmailSignature", + Type = "StringSettingUpdate", + Value = RequestEmailSignature, + }); + types.Add(new OpenApiType() + { + Name = "required_signature_types", + Property = "RequiredSignatureTypes", + Type = "RequiredSignatureTypesSettingUpdate", + Value = RequiredSignatureTypes, + }); + types.Add(new OpenApiType() + { + Name = "should_enable_tamper_proof", + Property = "ShouldEnableTamperProof", + Type = "BooleanSettingUpdate", + Value = ShouldEnableTamperProof, + }); + types.Add(new OpenApiType() + { + Name = "should_include_distinct_pdfs", + Property = "ShouldIncludeDistinctPdfs", + Type = "BooleanSettingUpdate", + Value = ShouldIncludeDistinctPdfs, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_access_code", + Property = "ShouldOfferSignerAccessCode", + Type = "BooleanSettingUpdate", + Value = ShouldOfferSignerAccessCode, + }); + types.Add(new OpenApiType() + { + Name = "should_offer_signer_sms_authentication", + Property = "ShouldOfferSignerSmsAuthentication", + Type = "BooleanSettingUpdate", + Value = ShouldOfferSignerSmsAuthentication, + }); + types.Add(new OpenApiType() + { + Name = "should_remove_document_id", + Property = "ShouldRemoveDocumentId", + Type = "BooleanSettingUpdate", + Value = ShouldRemoveDocumentId, + }); + types.Add(new OpenApiType() + { + Name = "data_residency", + Property = "DataResidency", + Type = "DataResidencySettingUpdate", + Value = DataResidency, + }); + types.Add(new OpenApiType() + { + Name = "allow_team_delete_document_for_everyone", + Property = "AllowTeamDeleteDocumentForEveryone", + Type = "BooleanSettingUpdate", + Value = AllowTeamDeleteDocumentForEveryone, + }); + types.Add(new OpenApiType() + { + Name = "allow_team_download_csv", + Property = "AllowTeamDownloadCsv", + Type = "BooleanSettingUpdate", + Value = AllowTeamDownloadCsv, + }); + types.Add(new OpenApiType() + { + Name = "lock_team_template_creation", + Property = "LockTeamTemplateCreation", + Type = "BooleanSettingUpdate", + Value = LockTeamTemplateCreation, + }); + types.Add(new OpenApiType() + { + Name = "lock_team_template_gallery", + Property = "LockTeamTemplateGallery", + Type = "BooleanSettingUpdate", + Value = LockTeamTemplateGallery, + }); + types.Add(new OpenApiType() + { + Name = "self_sign_message", + Property = "SelfSignMessage", + Type = "StringSettingUpdate", + Value = SelfSignMessage, + }); + types.Add(new OpenApiType() + { + Name = "self_sign_title", + Property = "SelfSignTitle", + Type = "StringSettingUpdate", + Value = SelfSignTitle, + }); + types.Add(new OpenApiType() + { + Name = "signature_request_message", + Property = "SignatureRequestMessage", + Type = "StringSettingUpdate", + Value = SignatureRequestMessage, + }); + types.Add(new OpenApiType() + { + Name = "signature_request_title", + Property = "SignatureRequestTitle", + Type = "StringSettingUpdate", + Value = SignatureRequestTitle, + }); + types.Add(new OpenApiType() + { + Name = "multifactor_auth_app", + Property = "MultifactorAuthApp", + Type = "BooleanSettingUpdate", + Value = MultifactorAuthApp, + }); + types.Add(new OpenApiType() + { + Name = "multifactor_auth_sms", + Property = "MultifactorAuthSms", + Type = "BooleanSettingUpdate", + Value = MultifactorAuthSms, + }); + types.Add(new OpenApiType() + { + Name = "unset", + Property = "Unset", + Type = "List", + Value = Unset, + }); + + return types; + } + } + +} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 0b0431cf7..72de432b5 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -176,6 +176,8 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountApi* | [**accountCreate**](docs/AccountApi.md#accountCreate) | **POST** /account/create | Create Account *AccountApi* | [**accountGet**](docs/AccountApi.md#accountGet) | **GET** /account | Get Account +*AccountApi* | [**accountSettingsGet**](docs/AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings +*AccountApi* | [**accountSettingsUpdate**](docs/AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings *AccountApi* | [**accountUpdate**](docs/AccountApi.md#accountUpdate) | **PUT** /account | Update Account *AccountApi* | [**accountVerify**](docs/AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account *ApiAppApi* | [**apiAppCreate**](docs/ApiAppApi.md#apiAppCreate) | **POST** /api_app | Create API App @@ -231,6 +233,8 @@ Class | Method | HTTP request | Description *TeamApi* | [**teamInvites**](docs/TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites *TeamApi* | [**teamMembers**](docs/TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members *TeamApi* | [**teamRemoveMember**](docs/TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team +*TeamApi* | [**teamSettingsGet**](docs/TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings +*TeamApi* | [**teamSettingsUpdate**](docs/TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings *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 @@ -259,6 +263,9 @@ Class | Method | HTTP request | Description - [AccountResponseQuotas](docs/AccountResponseQuotas.md) - [AccountResponseSettings](docs/AccountResponseSettings.md) - [AccountResponseUsage](docs/AccountResponseUsage.md) + - [AccountSettingsResponse](docs/AccountSettingsResponse.md) + - [AccountSettingsResponseSettings](docs/AccountSettingsResponseSettings.md) + - [AccountSettingsUpdateRequest](docs/AccountSettingsUpdateRequest.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -272,11 +279,16 @@ Class | Method | HTTP request | Description - [ApiAppResponseOwnerAccount](docs/ApiAppResponseOwnerAccount.md) - [ApiAppResponseWhiteLabelingOptions](docs/ApiAppResponseWhiteLabelingOptions.md) - [ApiAppUpdateRequest](docs/ApiAppUpdateRequest.md) + - [BooleanSettingUpdate](docs/BooleanSettingUpdate.md) - [BulkSendJobGetResponse](docs/BulkSendJobGetResponse.md) - [BulkSendJobGetResponseSignatureRequests](docs/BulkSendJobGetResponseSignatureRequests.md) - [BulkSendJobListResponse](docs/BulkSendJobListResponse.md) - [BulkSendJobResponse](docs/BulkSendJobResponse.md) - [BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md) + - [DataResidency](docs/DataResidency.md) + - [DataResidencySettingUpdate](docs/DataResidencySettingUpdate.md) + - [DateFormat](docs/DateFormat.md) + - [DateFormatSettingUpdate](docs/DateFormatSettingUpdate.md) - [DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md) - [DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md) - [DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md) @@ -315,6 +327,10 @@ Class | Method | HTTP request | Description - [ReportCreateRequest](docs/ReportCreateRequest.md) - [ReportCreateResponse](docs/ReportCreateResponse.md) - [ReportResponse](docs/ReportResponse.md) + - [RequiredSignatureType](docs/RequiredSignatureType.md) + - [RequiredSignatureTypesSettingUpdate](docs/RequiredSignatureTypesSettingUpdate.md) + - [SettingLockResponse](docs/SettingLockResponse.md) + - [SettingResponse](docs/SettingResponse.md) - [SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) @@ -347,6 +363,7 @@ Class | Method | HTTP request | Description - [SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) + - [StringSettingUpdate](docs/StringSettingUpdate.md) - [SubAttachment](docs/SubAttachment.md) - [SubBulkSignerList](docs/SubBulkSignerList.md) - [SubBulkSignerListCustomField](docs/SubBulkSignerListCustomField.md) @@ -395,6 +412,10 @@ Class | Method | HTTP request | Description - [TeamParentResponse](docs/TeamParentResponse.md) - [TeamRemoveMemberRequest](docs/TeamRemoveMemberRequest.md) - [TeamResponse](docs/TeamResponse.md) + - [TeamSettingLock](docs/TeamSettingLock.md) + - [TeamSettingsResponse](docs/TeamSettingsResponse.md) + - [TeamSettingsResponseSettings](docs/TeamSettingsResponseSettings.md) + - [TeamSettingsUpdateRequest](docs/TeamSettingsUpdateRequest.md) - [TeamSubTeamsResponse](docs/TeamSubTeamsResponse.md) - [TeamUpdateRequest](docs/TeamUpdateRequest.md) - [TemplateAddUserRequest](docs/TemplateAddUserRequest.md) diff --git a/sdks/java-v1/docs/AccountApi.md b/sdks/java-v1/docs/AccountApi.md index e638f559d..ab737020d 100644 --- a/sdks/java-v1/docs/AccountApi.md +++ b/sdks/java-v1/docs/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to *https://api.hellosign.com/v3* |------------- | ------------- | -------------| [**accountCreate**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account [**accountGet**](AccountApi.md#accountGet) | **GET** /account | Get Account +[**accountSettingsGet**](AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings +[**accountSettingsUpdate**](AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings [**accountUpdate**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account [**accountVerify**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account @@ -180,6 +182,173 @@ public class AccountGetExample | **4XX** | failed_operation | - | +## accountSettingsGet + +> AccountSettingsResponse accountSettingsGet(accountId) + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class AccountSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + + System.out.println(response); + System.out.println(response.getAccountId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountId** | **String**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## accountSettingsUpdate + +> AccountSettingsResponse accountSettingsUpdate(accountSettingsUpdateRequest, accountId) + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; +import com.dropbox.sign.model.DateFormat; +import com.dropbox.sign.model.RequiredSignatureType; +import java.util.List; + +public class AccountSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest() + .dateFormat(DateFormat.MM_DD_YYYY) + .requiredSignatureTypes(List.of( + RequiredSignatureType.DRAW, + RequiredSignatureType.TYPE + )) + .shouldEnableTamperProof(false) + .unset(List.of("company")); + + try + { + var response = new AccountApi(config).accountSettingsUpdate( + accountSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountSettingsUpdateRequest** | [**AccountSettingsUpdateRequest**](AccountSettingsUpdateRequest.md)| | + **accountId** | **String**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **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 | - | + + ## accountUpdate > AccountGetResponse accountUpdate(accountUpdateRequest) diff --git a/sdks/java-v1/docs/AccountSettingsResponse.md b/sdks/java-v1/docs/AccountSettingsResponse.md new file mode 100644 index 000000000..8bdcdfaf2 --- /dev/null +++ b/sdks/java-v1/docs/AccountSettingsResponse.md @@ -0,0 +1,16 @@ + + +# AccountSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId`*_required_ | ```String``` | | | +| `settings`*_required_ | [```AccountSettingsResponseSettings```](AccountSettingsResponseSettings.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/AccountSettingsResponseSettings.md b/sdks/java-v1/docs/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..d6ae9bbe2 --- /dev/null +++ b/sdks/java-v1/docs/AccountSettingsResponseSettings.md @@ -0,0 +1,39 @@ + + +# AccountSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + + + diff --git a/sdks/java-v1/docs/AccountSettingsUpdateRequest.md b/sdks/java-v1/docs/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..d49eda4f8 --- /dev/null +++ b/sdks/java-v1/docs/AccountSettingsUpdateRequest.md @@ -0,0 +1,73 @@ + + +# AccountSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company` | ```String``` | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | ```Boolean``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | ```String``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | ```String``` | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | ```DateFormat``` | | | +| `isSignatureRemindersEnabled` | ```Boolean``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | ```String``` | Sender name shown on signature request emails. | | +| `requestEmailSignature` | ```String``` | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | ```Set``` | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | ```Boolean``` | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | ```Boolean``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | ```Boolean``` | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | ```Boolean``` | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | ```Boolean``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled` | ```Boolean``` | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled` | ```Boolean``` | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete` | ```Boolean``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs` | ```Boolean``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers` | ```Boolean``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary` | ```Boolean``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails` | ```Boolean``` | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail` | ```Boolean``` | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails` | ```Boolean``` | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled` | ```Boolean``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | [```Set<UnsetEnum>```](#Set<UnsetEnum>) | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + + + +## Enum: Set<UnsetEnum> + +| Name | Value | +---- | ----- +| COMPANY | "company" | +| CUSTOM_SIGNING_REDIRECT_ENABLED | "custom_signing_redirect_enabled" | +| CUSTOM_SIGNING_REDIRECT_URL | "custom_signing_redirect_url" | +| CUSTOM_TAGLINE | "custom_tagline" | +| DATE_FORMAT | "date_format" | +| IS_SIGNATURE_REMINDERS_ENABLED | "is_signature_reminders_enabled" | +| REQUEST_EMAIL_FROM | "request_email_from" | +| REQUEST_EMAIL_SIGNATURE | "request_email_signature" | +| REQUIRED_SIGNATURE_TYPES | "required_signature_types" | +| SHOULD_ENABLE_TAMPER_PROOF | "should_enable_tamper_proof" | +| SHOULD_INCLUDE_DISTINCT_PDFS | "should_include_distinct_pdfs" | +| SHOULD_OFFER_SIGNER_ACCESS_CODE | "should_offer_signer_access_code" | +| SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION | "should_offer_signer_sms_authentication" | +| SHOULD_REMOVE_DOCUMENT_ID | "should_remove_document_id" | +| IS_NOTIFY_ON_SIGN_ENABLED | "is_notify_on_sign_enabled" | +| IS_NOTIFY_ON_VIEW_ENABLED | "is_notify_on_view_enabled" | +| SHOULD_AUTOCOMPLETE | "should_autocomplete" | +| SHOULD_INCLUDE_REQUESTED_PDFS | "should_include_requested_pdfs" | +| SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS | "should_include_requested_pdfs_for_others" | +| SHOULD_INCLUDE_SENT_DOC_PDFS | "should_include_sent_doc_pdfs" | +| SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS | "should_include_sent_doc_pdfs_for_others" | +| SHOULD_SEND_DAILY_SUMMARY | "should_send_daily_summary" | +| SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS | "should_send_embedded_signature_conf_emails" | +| SHOULD_SEND_ORDERED_SR_EMAIL | "should_send_ordered_sr_email" | +| SHOULD_SEND_OUTBOUND_CONF_EMAILS | "should_send_outbound_conf_emails" | +| TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED | "template_link_signature_emails_enabled" | + + + diff --git a/sdks/java-v1/docs/BooleanSettingUpdate.md b/sdks/java-v1/docs/BooleanSettingUpdate.md new file mode 100644 index 000000000..04b6a353b --- /dev/null +++ b/sdks/java-v1/docs/BooleanSettingUpdate.md @@ -0,0 +1,15 @@ + + +# BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```Boolean``` | Boolean value to store. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v1/docs/DataResidency.md b/sdks/java-v1/docs/DataResidency.md new file mode 100644 index 000000000..c8813a37b --- /dev/null +++ b/sdks/java-v1/docs/DataResidency.md @@ -0,0 +1,21 @@ + + +# DataResidency + +## Enum + + +* `US` (value: `"us"`) + +* `EU` (value: `"eu"`) + +* `AU` (value: `"au"`) + +* `JP` (value: `"jp"`) + +* `UK` (value: `"uk"`) + +* `CA` (value: `"ca"`) + + + diff --git a/sdks/java-v1/docs/DataResidencySettingUpdate.md b/sdks/java-v1/docs/DataResidencySettingUpdate.md new file mode 100644 index 000000000..4bb64aab1 --- /dev/null +++ b/sdks/java-v1/docs/DataResidencySettingUpdate.md @@ -0,0 +1,15 @@ + + +# DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```DataResidency``` | | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v1/docs/DateFormat.md b/sdks/java-v1/docs/DateFormat.md new file mode 100644 index 000000000..7d5fd7adf --- /dev/null +++ b/sdks/java-v1/docs/DateFormat.md @@ -0,0 +1,15 @@ + + +# DateFormat + +## Enum + + +* `MM_DD_YYYY` (value: `"MM/DD/YYYY"`) + +* `DD_MM_YYYY` (value: `"DD/MM/YYYY"`) + +* `YYYY_MM_DD` (value: `"YYYY/MM/DD"`) + + + diff --git a/sdks/java-v1/docs/DateFormatSettingUpdate.md b/sdks/java-v1/docs/DateFormatSettingUpdate.md new file mode 100644 index 000000000..9fa5ebc9e --- /dev/null +++ b/sdks/java-v1/docs/DateFormatSettingUpdate.md @@ -0,0 +1,15 @@ + + +# DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```DateFormat``` | | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v1/docs/RequiredSignatureType.md b/sdks/java-v1/docs/RequiredSignatureType.md new file mode 100644 index 000000000..f12a49853 --- /dev/null +++ b/sdks/java-v1/docs/RequiredSignatureType.md @@ -0,0 +1,17 @@ + + +# RequiredSignatureType + +## Enum + + +* `DRAW` (value: `"draw"`) + +* `PHONE` (value: `"phone"`) + +* `TYPE` (value: `"type"`) + +* `UPLOAD` (value: `"upload"`) + + + diff --git a/sdks/java-v1/docs/RequiredSignatureTypesSettingUpdate.md b/sdks/java-v1/docs/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..7e99c85b0 --- /dev/null +++ b/sdks/java-v1/docs/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,15 @@ + + +# RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```Set``` | Signature creation methods signers may use. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v1/docs/SettingLockResponse.md b/sdks/java-v1/docs/SettingLockResponse.md new file mode 100644 index 000000000..295ebb2c0 --- /dev/null +++ b/sdks/java-v1/docs/SettingLockResponse.md @@ -0,0 +1,25 @@ + + +# SettingLockResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `mode`*_required_ | ```TeamSettingLock``` | | | +| `source`*_required_ | [```SourceEnum```](#SourceEnum) | | | + + + +## Enum: SourceEnum + +| Name | Value | +---- | ----- +| TEAM | "team" | +| PARENT_TEAM | "parent_team" | +| DEFAULT | "default" | + + + diff --git a/sdks/java-v1/docs/SettingResponse.md b/sdks/java-v1/docs/SettingResponse.md new file mode 100644 index 000000000..1611544f7 --- /dev/null +++ b/sdks/java-v1/docs/SettingResponse.md @@ -0,0 +1,41 @@ + + +# SettingResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value`*_required_ | ```Object``` | Current value of the setting. Null when the setting has no value. | | +| `isInherited`*_required_ | ```Boolean``` | | | +| `source`*_required_ | [```SourceEnum```](#SourceEnum) | | | +| `type`*_required_ | [```TypeEnum```](#TypeEnum) | | | +| `writable`*_required_ | ```Boolean``` | | | +| `lock`*_required_ | [```SettingLockResponse```](SettingLockResponse.md) | | | + + + +## Enum: SourceEnum + +| Name | Value | +---- | ----- +| ACCOUNT | "account" | +| TEAM | "team" | +| PARENT_TEAM | "parent_team" | +| DEFAULT | "default" | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| BOOLEAN | "boolean" | +| INTEGER | "integer" | +| STRING | "string" | +| ARRAY | "array" | + + + diff --git a/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index ef7454fc2..99f7f8649 100644 --- a/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -16,7 +16,7 @@ | `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Map``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | diff --git a/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md index 34a3281c8..cf007d669 100644 --- a/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -16,7 +16,7 @@ | `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Map``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | diff --git a/sdks/java-v1/docs/StringSettingUpdate.md b/sdks/java-v1/docs/StringSettingUpdate.md new file mode 100644 index 000000000..2361efc1a --- /dev/null +++ b/sdks/java-v1/docs/StringSettingUpdate.md @@ -0,0 +1,15 @@ + + +# StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```String``` | String value to store. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v1/docs/SubBulkSignerList.md b/sdks/java-v1/docs/SubBulkSignerList.md index 918c935b1..653b11b9a 100644 --- a/sdks/java-v1/docs/SubBulkSignerList.md +++ b/sdks/java-v1/docs/SubBulkSignerList.md @@ -10,6 +10,7 @@ |------------ | ------------- | ------------- | -------------| | `customFields` | [```List```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```Map``` | _t__Sub::BulkSigner::METADATA | | diff --git a/sdks/java-v1/docs/TeamApi.md b/sdks/java-v1/docs/TeamApi.md index abb3f1ee0..47bb22045 100644 --- a/sdks/java-v1/docs/TeamApi.md +++ b/sdks/java-v1/docs/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.hellosign.com/v3* [**teamInvites**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites [**teamMembers**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members [**teamRemoveMember**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team +[**teamSettingsGet**](TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings +[**teamSettingsUpdate**](TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings [**teamSubTeams**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams [**teamUpdate**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team @@ -677,6 +679,176 @@ public class TeamRemoveMemberExample | **4XX** | failed_operation | - | +## teamSettingsGet + +> TeamSettingsResponse teamSettingsGet(teamId) + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class TeamSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + SettingResponse dataResidency = response.getSettings().getDataResidency(); + + System.out.println(response); + System.out.println(response.getTeamId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(dataResidency.getValue()); + System.out.println(dataResidency.getType()); + System.out.println(dataResidency.getLock().getMode()); + System.out.println(dataResidency.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamId** | **String**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamSettingsUpdate + +> TeamSettingsResponse teamSettingsUpdate(teamSettingsUpdateRequest, teamId) + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.DataResidency; +import com.dropbox.sign.model.DataResidencySettingUpdate; +import com.dropbox.sign.model.StringSettingUpdate; +import com.dropbox.sign.model.TeamSettingLock; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; + +public class TeamSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest() + .dataResidency(new DataResidencySettingUpdate().value(DataResidency.EU)) + .company(new StringSettingUpdate() + .value("Northwind") + .lockMode(TeamSettingLock.ORGANIZATION_ADMINS)); + + try + { + var response = new TeamApi(config).teamSettingsUpdate( + teamSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamSettingsUpdateRequest** | [**TeamSettingsUpdateRequest**](TeamSettingsUpdateRequest.md)| | + **teamId** | **String**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **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 | - | + + ## teamSubTeams > TeamSubTeamsResponse teamSubTeams(teamId, page, pageSize) diff --git a/sdks/java-v1/docs/TeamCreateRequest.md b/sdks/java-v1/docs/TeamCreateRequest.md index 1a4861618..be4d8e143 100644 --- a/sdks/java-v1/docs/TeamCreateRequest.md +++ b/sdks/java-v1/docs/TeamCreateRequest.md @@ -9,6 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `name` | ```String``` | The name of your Team. | | +| `parentTeamId` | ```String``` | _t__TeamCreate::PARENT_TEAM_ID | | diff --git a/sdks/java-v1/docs/TeamResponse.md b/sdks/java-v1/docs/TeamResponse.md index ca6344cfc..1ae2f8b03 100644 --- a/sdks/java-v1/docs/TeamResponse.md +++ b/sdks/java-v1/docs/TeamResponse.md @@ -8,6 +8,8 @@ Contains information about your team and its members | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| `teamId` | ```String``` | The id of a team | | +| `parentTeamId` | ```String``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```String``` | The name of your Team | | | `accounts` | [```List```](AccountResponse.md) | | | | `invitedAccounts` | [```List```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/java-v1/docs/TeamSettingLock.md b/sdks/java-v1/docs/TeamSettingLock.md new file mode 100644 index 000000000..bec706691 --- /dev/null +++ b/sdks/java-v1/docs/TeamSettingLock.md @@ -0,0 +1,15 @@ + + +# TeamSettingLock + +## Enum + + +* `ORGANIZATION_ADMINS` (value: `"organization_admins"`) + +* `TEAM_ADMINS` (value: `"team_admins"`) + +* `MEMBERS` (value: `"members"`) + + + diff --git a/sdks/java-v1/docs/TeamSettingsResponse.md b/sdks/java-v1/docs/TeamSettingsResponse.md new file mode 100644 index 000000000..58c27c736 --- /dev/null +++ b/sdks/java-v1/docs/TeamSettingsResponse.md @@ -0,0 +1,16 @@ + + +# TeamSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamId`*_required_ | ```String``` | | | +| `settings`*_required_ | [```TeamSettingsResponseSettings```](TeamSettingsResponseSettings.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TeamSettingsResponseSettings.md b/sdks/java-v1/docs/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..70718c202 --- /dev/null +++ b/sdks/java-v1/docs/TeamSettingsResponseSettings.md @@ -0,0 +1,38 @@ + + +# TeamSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency`*_required_ | [```SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + + + diff --git a/sdks/java-v1/docs/TeamSettingsUpdateRequest.md b/sdks/java-v1/docs/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..7a3b68476 --- /dev/null +++ b/sdks/java-v1/docs/TeamSettingsUpdateRequest.md @@ -0,0 +1,71 @@ + + +# TeamSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company` | [```StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | [```StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | [```StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | [```DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | [```StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature` | [```StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | [```RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency` | [```DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | [```Set<UnsetEnum>```](#Set<UnsetEnum>) | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + + + +## Enum: Set<UnsetEnum> + +| Name | Value | +---- | ----- +| COMPANY | "company" | +| CUSTOM_SIGNING_REDIRECT_ENABLED | "custom_signing_redirect_enabled" | +| CUSTOM_SIGNING_REDIRECT_URL | "custom_signing_redirect_url" | +| CUSTOM_TAGLINE | "custom_tagline" | +| DATE_FORMAT | "date_format" | +| IS_SIGNATURE_REMINDERS_ENABLED | "is_signature_reminders_enabled" | +| REQUEST_EMAIL_FROM | "request_email_from" | +| REQUEST_EMAIL_SIGNATURE | "request_email_signature" | +| REQUIRED_SIGNATURE_TYPES | "required_signature_types" | +| SHOULD_ENABLE_TAMPER_PROOF | "should_enable_tamper_proof" | +| SHOULD_INCLUDE_DISTINCT_PDFS | "should_include_distinct_pdfs" | +| SHOULD_OFFER_SIGNER_ACCESS_CODE | "should_offer_signer_access_code" | +| SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION | "should_offer_signer_sms_authentication" | +| SHOULD_REMOVE_DOCUMENT_ID | "should_remove_document_id" | +| DATA_RESIDENCY | "data_residency" | +| ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE | "allow_team_delete_document_for_everyone" | +| ALLOW_TEAM_DOWNLOAD_CSV | "allow_team_download_csv" | +| LOCK_TEAM_TEMPLATE_CREATION | "lock_team_template_creation" | +| LOCK_TEAM_TEMPLATE_GALLERY | "lock_team_template_gallery" | +| SELF_SIGN_MESSAGE | "self_sign_message" | +| SELF_SIGN_TITLE | "self_sign_title" | +| SIGNATURE_REQUEST_MESSAGE | "signature_request_message" | +| SIGNATURE_REQUEST_TITLE | "signature_request_title" | +| MULTIFACTOR_AUTH_APP | "multifactor_auth_app" | +| MULTIFACTOR_AUTH_SMS | "multifactor_auth_sms" | + + + diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java index 836bd4bf4..e725c1e52 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -8,6 +8,8 @@ import com.dropbox.sign.model.AccountCreateRequest; import com.dropbox.sign.model.AccountCreateResponse; import com.dropbox.sign.model.AccountGetResponse; +import com.dropbox.sign.model.AccountSettingsResponse; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; import com.dropbox.sign.model.AccountUpdateRequest; import com.dropbox.sign.model.AccountVerifyRequest; import com.dropbox.sign.model.AccountVerifyResponse; @@ -234,6 +236,196 @@ public ApiResponse accountGetWithHttpInfo( false); } + /** + * Get account settings account_id is an optional query parameter and defaults to the + * authenticated account. A team admin can specify another account on a team they administer. + * + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can + * specify another account on a team they administer. (optional) + * @return AccountSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public AccountSettingsResponse accountSettingsGet(String accountId) throws ApiException { + return accountSettingsGetWithHttpInfo(accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsGet(String) + */ + public AccountSettingsResponse accountSettingsGet() throws ApiException { + String accountId = null; + + return accountSettingsGetWithHttpInfo(accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsGetWithHttpInfo(String) + */ + public ApiResponse accountSettingsGetWithHttpInfo() + throws ApiException { + String accountId = null; + + return accountSettingsGetWithHttpInfo(accountId); + } + + /** + * Get account settings account_id is an optional query parameter and defaults to the + * authenticated account. A team admin can specify another account on a team they administer. + * + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can + * specify another account on a team they administer. (optional) + * @return ApiResponse<AccountSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse accountSettingsGetWithHttpInfo(String accountId) + throws ApiException { + + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); + + 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", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "AccountApi.accountSettingsGet", + "/account/settings", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Modify account settings account_id is an optional query parameter and defaults to the + * authenticated account. A team admin can specify another account on a team they administer. + * + * @param accountSettingsUpdateRequest (required) + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can + * specify another account on a team they administer. (optional) + * @return AccountSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public AccountSettingsResponse accountSettingsUpdate( + AccountSettingsUpdateRequest accountSettingsUpdateRequest, String accountId) + throws ApiException { + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsUpdate(AccountSettingsUpdateRequest, String) + */ + public AccountSettingsResponse accountSettingsUpdate( + AccountSettingsUpdateRequest accountSettingsUpdateRequest) throws ApiException { + String accountId = null; + + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest, String) + */ + public ApiResponse accountSettingsUpdateWithHttpInfo( + AccountSettingsUpdateRequest accountSettingsUpdateRequest) throws ApiException { + String accountId = null; + + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId); + } + + /** + * Modify account settings account_id is an optional query parameter and defaults to the + * authenticated account. A team admin can specify another account on a team they administer. + * + * @param accountSettingsUpdateRequest (required) + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can + * specify another account on a team they administer. (optional) + * @return ApiResponse<AccountSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse accountSettingsUpdateWithHttpInfo( + AccountSettingsUpdateRequest accountSettingsUpdateRequest, String accountId) + throws ApiException { + + // Check required parameters + if (accountSettingsUpdateRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountSettingsUpdateRequest' when calling" + + " accountSettingsUpdate"); + } + + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = accountSettingsUpdateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "AccountApi.accountSettingsUpdate", + "/account/settings", + "POST", + localVarQueryParams, + isFileTypeFound ? null : accountSettingsUpdateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + /** * Update Account Updates the properties and settings of your Account. Currently only allows for * updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java index 7ccffdb6d..583752d84 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -12,6 +12,8 @@ import com.dropbox.sign.model.TeamInvitesResponse; import com.dropbox.sign.model.TeamMembersResponse; import com.dropbox.sign.model.TeamRemoveMemberRequest; +import com.dropbox.sign.model.TeamSettingsResponse; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; import com.dropbox.sign.model.TeamSubTeamsResponse; import com.dropbox.sign.model.TeamUpdateRequest; import java.util.ArrayList; @@ -716,6 +718,195 @@ public ApiResponse teamRemoveMemberWithHttpInfo( false); } + /** + * Get team settings team_id is an optional query parameter and defaults to the authenticated + * account's team. An organization admin can specify a subteam. + * + * @param teamId Optional team ID. Defaults to the authenticated account's team. An + * organization admin can specify a subteam. (optional) + * @return TeamSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public TeamSettingsResponse teamSettingsGet(String teamId) throws ApiException { + return teamSettingsGetWithHttpInfo(teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsGet(String) + */ + public TeamSettingsResponse teamSettingsGet() throws ApiException { + String teamId = null; + + return teamSettingsGetWithHttpInfo(teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsGetWithHttpInfo(String) + */ + public ApiResponse teamSettingsGetWithHttpInfo() throws ApiException { + String teamId = null; + + return teamSettingsGetWithHttpInfo(teamId); + } + + /** + * Get team settings team_id is an optional query parameter and defaults to the authenticated + * account's team. An organization admin can specify a subteam. + * + * @param teamId Optional team ID. Defaults to the authenticated account's team. An + * organization admin can specify a subteam. (optional) + * @return ApiResponse<TeamSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse teamSettingsGetWithHttpInfo(String teamId) + throws ApiException { + + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "team_id", teamId)); + + 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", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "TeamApi.teamSettingsGet", + "/team/settings", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Modify team settings team_id is an optional query parameter and defaults to the authenticated + * account's team. An organization admin can specify a subteam. + * + * @param teamSettingsUpdateRequest (required) + * @param teamId Optional team ID. Defaults to the authenticated account's team. An + * organization admin can specify a subteam. (optional) + * @return TeamSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public TeamSettingsResponse teamSettingsUpdate( + TeamSettingsUpdateRequest teamSettingsUpdateRequest, String teamId) + throws ApiException { + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsUpdate(TeamSettingsUpdateRequest, String) + */ + public TeamSettingsResponse teamSettingsUpdate( + TeamSettingsUpdateRequest teamSettingsUpdateRequest) throws ApiException { + String teamId = null; + + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest, String) + */ + public ApiResponse teamSettingsUpdateWithHttpInfo( + TeamSettingsUpdateRequest teamSettingsUpdateRequest) throws ApiException { + String teamId = null; + + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId); + } + + /** + * Modify team settings team_id is an optional query parameter and defaults to the authenticated + * account's team. An organization admin can specify a subteam. + * + * @param teamSettingsUpdateRequest (required) + * @param teamId Optional team ID. Defaults to the authenticated account's team. An + * organization admin can specify a subteam. (optional) + * @return ApiResponse<TeamSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse teamSettingsUpdateWithHttpInfo( + TeamSettingsUpdateRequest teamSettingsUpdateRequest, String teamId) + throws ApiException { + + // Check required parameters + if (teamSettingsUpdateRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'teamSettingsUpdateRequest' when calling" + + " teamSettingsUpdate"); + } + + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "team_id", teamId)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = teamSettingsUpdateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "TeamApi.teamSettingsUpdate", + "/team/settings", + "POST", + localVarQueryParams, + isFileTypeFound ? null : teamSettingsUpdateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + /** * List Sub Teams Provides a paginated list of sub teams that belong to a given team. * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java new file mode 100644 index 000000000..a0b83648a --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java @@ -0,0 +1,276 @@ +/* + * 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; + +/** AccountSettingsResponse */ +@JsonPropertyOrder({ + AccountSettingsResponse.JSON_PROPERTY_ACCOUNT_ID, + AccountSettingsResponse.JSON_PROPERTY_SETTINGS, + AccountSettingsResponse.JSON_PROPERTY_WARNINGS +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class AccountSettingsResponse { + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @javax.annotation.Nonnull private String accountId; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nonnull private AccountSettingsResponseSettings settings; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @javax.annotation.Nullable private List warnings = null; + + public AccountSettingsResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static AccountSettingsResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsResponse.class); + } + + public static AccountSettingsResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), AccountSettingsResponse.class); + } + + public AccountSettingsResponse accountId(@javax.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * + * @return accountId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountId(@javax.annotation.Nonnull String accountId) { + this.accountId = accountId; + } + + public AccountSettingsResponse settings( + @javax.annotation.Nonnull AccountSettingsResponseSettings settings) { + this.settings = settings; + return this; + } + + /** + * Get settings + * + * @return settings + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountSettingsResponseSettings getSettings() { + return settings; + } + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettings(@javax.annotation.Nonnull AccountSettingsResponseSettings settings) { + this.settings = settings; + } + + public AccountSettingsResponse warnings( + @javax.annotation.Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public AccountSettingsResponse 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(@javax.annotation.Nullable List warnings) { + this.warnings = warnings; + } + + /** Return true if this AccountSettingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsResponse accountSettingsResponse = (AccountSettingsResponse) o; + return Objects.equals(this.accountId, accountSettingsResponse.accountId) + && Objects.equals(this.settings, accountSettingsResponse.settings) + && Objects.equals(this.warnings, accountSettingsResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, settings, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsResponse {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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 (accountId != null) { + if (isFileTypeOrListOfFiles(accountId)) { + fileTypeFound = true; + } + + if (accountId.getClass().equals(java.io.File.class) + || accountId.getClass().equals(Integer.class) + || accountId.getClass().equals(String.class) + || accountId.getClass().isEnum()) { + map.put("account_id", accountId); + } else if (isListOfFile(accountId)) { + for (int i = 0; i < getListSize(accountId); i++) { + map.put("account_id[" + i + "]", getFromList(accountId, i)); + } + } else { + map.put( + "account_id", + JSON.getDefault().getMapper().writeValueAsString(accountId)); + } + } + if (settings != null) { + if (isFileTypeOrListOfFiles(settings)) { + fileTypeFound = true; + } + + if (settings.getClass().equals(java.io.File.class) + || settings.getClass().equals(Integer.class) + || settings.getClass().equals(String.class) + || settings.getClass().isEnum()) { + map.put("settings", settings); + } else if (isListOfFile(settings)) { + for (int i = 0; i < getListSize(settings); i++) { + map.put("settings[" + i + "]", getFromList(settings, i)); + } + } else { + map.put("settings", JSON.getDefault().getMapper().writeValueAsString(settings)); + } + } + 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/AccountSettingsResponseSettings.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsResponseSettings.java new file mode 100644 index 000000000..4790da594 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsResponseSettings.java @@ -0,0 +1,1678 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** AccountSettingsResponseSettings */ +@JsonPropertyOrder({ + AccountSettingsResponseSettings.JSON_PROPERTY_COMPANY, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_TAGLINE, + AccountSettingsResponseSettings.JSON_PROPERTY_DATE_FORMAT, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_FROM, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_AUTOCOMPLETE, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS, + AccountSettingsResponseSettings.JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class AccountSettingsResponseSettings { + public static final String JSON_PROPERTY_COMPANY = "company"; + @javax.annotation.Nonnull private SettingResponse company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = + "custom_signing_redirect_enabled"; + @javax.annotation.Nonnull private SettingResponse customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = + "custom_signing_redirect_url"; + @javax.annotation.Nonnull private SettingResponse customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @javax.annotation.Nonnull private SettingResponse customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @javax.annotation.Nonnull private SettingResponse dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = + "is_signature_reminders_enabled"; + @javax.annotation.Nonnull private SettingResponse isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @javax.annotation.Nonnull private SettingResponse requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @javax.annotation.Nonnull private SettingResponse requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @javax.annotation.Nonnull private SettingResponse requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = + "should_enable_tamper_proof"; + @javax.annotation.Nonnull private SettingResponse shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = + "should_include_distinct_pdfs"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = + "should_offer_signer_access_code"; + @javax.annotation.Nonnull private SettingResponse shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = + "should_offer_signer_sms_authentication"; + @javax.annotation.Nonnull private SettingResponse shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = + "should_remove_document_id"; + @javax.annotation.Nonnull private SettingResponse shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED = + "is_notify_on_sign_enabled"; + @javax.annotation.Nonnull private SettingResponse isNotifyOnSignEnabled; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED = + "is_notify_on_view_enabled"; + @javax.annotation.Nonnull private SettingResponse isNotifyOnViewEnabled; + + public static final String JSON_PROPERTY_SHOULD_AUTOCOMPLETE = "should_autocomplete"; + @javax.annotation.Nonnull private SettingResponse shouldAutocomplete; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS = + "should_include_requested_pdfs"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeRequestedPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS = + "should_include_requested_pdfs_for_others"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeRequestedPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS = + "should_include_sent_doc_pdfs"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeSentDocPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS = + "should_include_sent_doc_pdfs_for_others"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeSentDocPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY = + "should_send_daily_summary"; + @javax.annotation.Nonnull private SettingResponse shouldSendDailySummary; + + public static final String JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS = + "should_send_embedded_signature_conf_emails"; + @javax.annotation.Nonnull private SettingResponse shouldSendEmbeddedSignatureConfEmails; + + public static final String JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL = + "should_send_ordered_sr_email"; + @javax.annotation.Nonnull private SettingResponse shouldSendOrderedSrEmail; + + public static final String JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS = + "should_send_outbound_conf_emails"; + @javax.annotation.Nonnull private SettingResponse shouldSendOutboundConfEmails; + + public static final String JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED = + "template_link_signature_emails_enabled"; + @javax.annotation.Nonnull private SettingResponse templateLinkSignatureEmailsEnabled; + + public AccountSettingsResponseSettings() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static AccountSettingsResponseSettings init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsResponseSettings.class); + } + + public static AccountSettingsResponseSettings init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + AccountSettingsResponseSettings.class); + } + + public AccountSettingsResponseSettings company( + @javax.annotation.Nonnull SettingResponse company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * + * @return company + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCompany() { + return company; + } + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompany(@javax.annotation.Nonnull SettingResponse company) { + this.company = company; + } + + public AccountSettingsResponseSettings customSigningRedirectEnabled( + @javax.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * + * @return customSigningRedirectEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectEnabled( + @javax.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + public AccountSettingsResponseSettings customSigningRedirectUrl( + @javax.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects + * are enabled. + * + * @return customSigningRedirectUrl + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectUrl( + @javax.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + public AccountSettingsResponseSettings customTagline( + @javax.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * + * @return customTagline + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomTagline() { + return customTagline; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomTagline(@javax.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + } + + public AccountSettingsResponseSettings dateFormat( + @javax.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the + * default. + * + * @return dateFormat + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getDateFormat() { + return dateFormat; + } + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateFormat(@javax.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + } + + public AccountSettingsResponseSettings isSignatureRemindersEnabled( + @javax.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * + * @return isSignatureRemindersEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSignatureRemindersEnabled( + @javax.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + public AccountSettingsResponseSettings requestEmailFrom( + @javax.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * + * @return requestEmailFrom + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequestEmailFrom() { + return requestEmailFrom; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailFrom(@javax.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + public AccountSettingsResponseSettings requestEmailSignature( + @javax.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * + * @return requestEmailSignature + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequestEmailSignature() { + return requestEmailSignature; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailSignature( + @javax.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + public AccountSettingsResponseSettings requiredSignatureTypes( + @javax.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * + * @return requiredSignatureTypes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredSignatureTypes( + @javax.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + public AccountSettingsResponseSettings shouldEnableTamperProof( + @javax.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * + * @return shouldEnableTamperProof + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldEnableTamperProof( + @javax.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + public AccountSettingsResponseSettings shouldIncludeDistinctPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one + * PDF. + * + * @return shouldIncludeDistinctPdfs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeDistinctPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + public AccountSettingsResponseSettings shouldOfferSignerAccessCode( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * + * @return shouldOfferSignerAccessCode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerAccessCode( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + public AccountSettingsResponseSettings shouldOfferSignerSmsAuthentication( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * + * @return shouldOfferSignerSmsAuthentication + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerSmsAuthentication( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + public AccountSettingsResponseSettings shouldRemoveDocumentId( + @javax.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * + * @return shouldRemoveDocumentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldRemoveDocumentId( + @javax.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + public AccountSettingsResponseSettings isNotifyOnSignEnabled( + @javax.annotation.Nonnull SettingResponse isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document it sent. + * + * @return isNotifyOnSignEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getIsNotifyOnSignEnabled() { + return isNotifyOnSignEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsNotifyOnSignEnabled( + @javax.annotation.Nonnull SettingResponse isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + } + + public AccountSettingsResponseSettings isNotifyOnViewEnabled( + @javax.annotation.Nonnull SettingResponse isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + return this; + } + + /** + * Whether to notify the account when someone opens a document it sent. + * + * @return isNotifyOnViewEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getIsNotifyOnViewEnabled() { + return isNotifyOnViewEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsNotifyOnViewEnabled( + @javax.annotation.Nonnull SettingResponse isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + } + + public AccountSettingsResponseSettings shouldAutocomplete( + @javax.annotation.Nonnull SettingResponse shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + return this; + } + + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + * + * @return shouldAutocomplete + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldAutocomplete() { + return shouldAutocomplete; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldAutocomplete( + @javax.annotation.Nonnull SettingResponse shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + } + + public AccountSettingsResponseSettings shouldIncludeRequestedPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + * + * @return shouldIncludeRequestedPdfs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeRequestedPdfs() { + return shouldIncludeRequestedPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeRequestedPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + } + + public AccountSettingsResponseSettings shouldIncludeRequestedPdfsForOthers( + @javax.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC + * recipients. + * + * @return shouldIncludeRequestedPdfsForOthers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeRequestedPdfsForOthers() { + return shouldIncludeRequestedPdfsForOthers; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeRequestedPdfsForOthers( + @javax.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + } + + public AccountSettingsResponseSettings shouldIncludeSentDocPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + return this; + } + + /** + * Whether emails sent to the account include PDF copies of documents it sends. + * + * @return shouldIncludeSentDocPdfs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeSentDocPdfs() { + return shouldIncludeSentDocPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeSentDocPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + } + + public AccountSettingsResponseSettings shouldIncludeSentDocPdfsForOthers( + @javax.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + return this; + } + + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + * + * @return shouldIncludeSentDocPdfsForOthers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeSentDocPdfsForOthers() { + return shouldIncludeSentDocPdfsForOthers; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeSentDocPdfsForOthers( + @javax.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + } + + public AccountSettingsResponseSettings shouldSendDailySummary( + @javax.annotation.Nonnull SettingResponse shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + return this; + } + + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + * + * @return shouldSendDailySummary + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldSendDailySummary() { + return shouldSendDailySummary; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendDailySummary( + @javax.annotation.Nonnull SettingResponse shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + } + + public AccountSettingsResponseSettings shouldSendEmbeddedSignatureConfEmails( + @javax.annotation.Nonnull SettingResponse shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs a document on a third-party site. + * + * @return shouldSendEmbeddedSignatureConfEmails + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldSendEmbeddedSignatureConfEmails() { + return shouldSendEmbeddedSignatureConfEmails; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendEmbeddedSignatureConfEmails( + @javax.annotation.Nonnull SettingResponse shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + } + + public AccountSettingsResponseSettings shouldSendOrderedSrEmail( + @javax.annotation.Nonnull SettingResponse shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + return this; + } + + /** + * Whether to notify all parties when an ordered signature request starts. + * + * @return shouldSendOrderedSrEmail + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldSendOrderedSrEmail() { + return shouldSendOrderedSrEmail; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendOrderedSrEmail( + @javax.annotation.Nonnull SettingResponse shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + } + + public AccountSettingsResponseSettings shouldSendOutboundConfEmails( + @javax.annotation.Nonnull SettingResponse shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs and sends a document. + * + * @return shouldSendOutboundConfEmails + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldSendOutboundConfEmails() { + return shouldSendOutboundConfEmails; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendOutboundConfEmails( + @javax.annotation.Nonnull SettingResponse shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + } + + public AccountSettingsResponseSettings templateLinkSignatureEmailsEnabled( + @javax.annotation.Nonnull SettingResponse templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document sent by its team through a + * template link. + * + * @return templateLinkSignatureEmailsEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getTemplateLinkSignatureEmailsEnabled() { + return templateLinkSignatureEmailsEnabled; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateLinkSignatureEmailsEnabled( + @javax.annotation.Nonnull SettingResponse templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + } + + /** Return true if this AccountSettingsResponseSettings object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsResponseSettings accountSettingsResponseSettings = + (AccountSettingsResponseSettings) o; + return Objects.equals(this.company, accountSettingsResponseSettings.company) + && Objects.equals( + this.customSigningRedirectEnabled, + accountSettingsResponseSettings.customSigningRedirectEnabled) + && Objects.equals( + this.customSigningRedirectUrl, + accountSettingsResponseSettings.customSigningRedirectUrl) + && Objects.equals(this.customTagline, accountSettingsResponseSettings.customTagline) + && Objects.equals(this.dateFormat, accountSettingsResponseSettings.dateFormat) + && Objects.equals( + this.isSignatureRemindersEnabled, + accountSettingsResponseSettings.isSignatureRemindersEnabled) + && Objects.equals( + this.requestEmailFrom, accountSettingsResponseSettings.requestEmailFrom) + && Objects.equals( + this.requestEmailSignature, + accountSettingsResponseSettings.requestEmailSignature) + && Objects.equals( + this.requiredSignatureTypes, + accountSettingsResponseSettings.requiredSignatureTypes) + && Objects.equals( + this.shouldEnableTamperProof, + accountSettingsResponseSettings.shouldEnableTamperProof) + && Objects.equals( + this.shouldIncludeDistinctPdfs, + accountSettingsResponseSettings.shouldIncludeDistinctPdfs) + && Objects.equals( + this.shouldOfferSignerAccessCode, + accountSettingsResponseSettings.shouldOfferSignerAccessCode) + && Objects.equals( + this.shouldOfferSignerSmsAuthentication, + accountSettingsResponseSettings.shouldOfferSignerSmsAuthentication) + && Objects.equals( + this.shouldRemoveDocumentId, + accountSettingsResponseSettings.shouldRemoveDocumentId) + && Objects.equals( + this.isNotifyOnSignEnabled, + accountSettingsResponseSettings.isNotifyOnSignEnabled) + && Objects.equals( + this.isNotifyOnViewEnabled, + accountSettingsResponseSettings.isNotifyOnViewEnabled) + && Objects.equals( + this.shouldAutocomplete, accountSettingsResponseSettings.shouldAutocomplete) + && Objects.equals( + this.shouldIncludeRequestedPdfs, + accountSettingsResponseSettings.shouldIncludeRequestedPdfs) + && Objects.equals( + this.shouldIncludeRequestedPdfsForOthers, + accountSettingsResponseSettings.shouldIncludeRequestedPdfsForOthers) + && Objects.equals( + this.shouldIncludeSentDocPdfs, + accountSettingsResponseSettings.shouldIncludeSentDocPdfs) + && Objects.equals( + this.shouldIncludeSentDocPdfsForOthers, + accountSettingsResponseSettings.shouldIncludeSentDocPdfsForOthers) + && Objects.equals( + this.shouldSendDailySummary, + accountSettingsResponseSettings.shouldSendDailySummary) + && Objects.equals( + this.shouldSendEmbeddedSignatureConfEmails, + accountSettingsResponseSettings.shouldSendEmbeddedSignatureConfEmails) + && Objects.equals( + this.shouldSendOrderedSrEmail, + accountSettingsResponseSettings.shouldSendOrderedSrEmail) + && Objects.equals( + this.shouldSendOutboundConfEmails, + accountSettingsResponseSettings.shouldSendOutboundConfEmails) + && Objects.equals( + this.templateLinkSignatureEmailsEnabled, + accountSettingsResponseSettings.templateLinkSignatureEmailsEnabled); + } + + @Override + public int hashCode() { + return Objects.hash( + company, + customSigningRedirectEnabled, + customSigningRedirectUrl, + customTagline, + dateFormat, + isSignatureRemindersEnabled, + requestEmailFrom, + requestEmailSignature, + requiredSignatureTypes, + shouldEnableTamperProof, + shouldIncludeDistinctPdfs, + shouldOfferSignerAccessCode, + shouldOfferSignerSmsAuthentication, + shouldRemoveDocumentId, + isNotifyOnSignEnabled, + isNotifyOnViewEnabled, + shouldAutocomplete, + shouldIncludeRequestedPdfs, + shouldIncludeRequestedPdfsForOthers, + shouldIncludeSentDocPdfs, + shouldIncludeSentDocPdfsForOthers, + shouldSendDailySummary, + shouldSendEmbeddedSignatureConfEmails, + shouldSendOrderedSrEmail, + shouldSendOutboundConfEmails, + templateLinkSignatureEmailsEnabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsResponseSettings {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ") + .append(toIndentedString(customSigningRedirectEnabled)) + .append("\n"); + sb.append(" customSigningRedirectUrl: ") + .append(toIndentedString(customSigningRedirectUrl)) + .append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ") + .append(toIndentedString(isSignatureRemindersEnabled)) + .append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ") + .append(toIndentedString(requestEmailSignature)) + .append("\n"); + sb.append(" requiredSignatureTypes: ") + .append(toIndentedString(requiredSignatureTypes)) + .append("\n"); + sb.append(" shouldEnableTamperProof: ") + .append(toIndentedString(shouldEnableTamperProof)) + .append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ") + .append(toIndentedString(shouldIncludeDistinctPdfs)) + .append("\n"); + sb.append(" shouldOfferSignerAccessCode: ") + .append(toIndentedString(shouldOfferSignerAccessCode)) + .append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ") + .append(toIndentedString(shouldOfferSignerSmsAuthentication)) + .append("\n"); + sb.append(" shouldRemoveDocumentId: ") + .append(toIndentedString(shouldRemoveDocumentId)) + .append("\n"); + sb.append(" isNotifyOnSignEnabled: ") + .append(toIndentedString(isNotifyOnSignEnabled)) + .append("\n"); + sb.append(" isNotifyOnViewEnabled: ") + .append(toIndentedString(isNotifyOnViewEnabled)) + .append("\n"); + sb.append(" shouldAutocomplete: ") + .append(toIndentedString(shouldAutocomplete)) + .append("\n"); + sb.append(" shouldIncludeRequestedPdfs: ") + .append(toIndentedString(shouldIncludeRequestedPdfs)) + .append("\n"); + sb.append(" shouldIncludeRequestedPdfsForOthers: ") + .append(toIndentedString(shouldIncludeRequestedPdfsForOthers)) + .append("\n"); + sb.append(" shouldIncludeSentDocPdfs: ") + .append(toIndentedString(shouldIncludeSentDocPdfs)) + .append("\n"); + sb.append(" shouldIncludeSentDocPdfsForOthers: ") + .append(toIndentedString(shouldIncludeSentDocPdfsForOthers)) + .append("\n"); + sb.append(" shouldSendDailySummary: ") + .append(toIndentedString(shouldSendDailySummary)) + .append("\n"); + sb.append(" shouldSendEmbeddedSignatureConfEmails: ") + .append(toIndentedString(shouldSendEmbeddedSignatureConfEmails)) + .append("\n"); + sb.append(" shouldSendOrderedSrEmail: ") + .append(toIndentedString(shouldSendOrderedSrEmail)) + .append("\n"); + sb.append(" shouldSendOutboundConfEmails: ") + .append(toIndentedString(shouldSendOutboundConfEmails)) + .append("\n"); + sb.append(" templateLinkSignatureEmailsEnabled: ") + .append(toIndentedString(templateLinkSignatureEmailsEnabled)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) + || company.getClass().equals(Integer.class) + || company.getClass().equals(String.class) + || company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for (int i = 0; i < getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) + || customSigningRedirectEnabled.getClass().equals(Integer.class) + || customSigningRedirectEnabled.getClass().equals(String.class) + || customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for (int i = 0; i < getListSize(customSigningRedirectEnabled); i++) { + map.put( + "custom_signing_redirect_enabled[" + i + "]", + getFromList(customSigningRedirectEnabled, i)); + } + } else { + map.put( + "custom_signing_redirect_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) + || customSigningRedirectUrl.getClass().equals(Integer.class) + || customSigningRedirectUrl.getClass().equals(String.class) + || customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for (int i = 0; i < getListSize(customSigningRedirectUrl); i++) { + map.put( + "custom_signing_redirect_url[" + i + "]", + getFromList(customSigningRedirectUrl, i)); + } + } else { + map.put( + "custom_signing_redirect_url", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) + || customTagline.getClass().equals(Integer.class) + || customTagline.getClass().equals(String.class) + || customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for (int i = 0; i < getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } else { + map.put( + "custom_tagline", + JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) + || dateFormat.getClass().equals(Integer.class) + || dateFormat.getClass().equals(String.class) + || dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for (int i = 0; i < getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } else { + map.put( + "date_format", + JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) + || isSignatureRemindersEnabled.getClass().equals(Integer.class) + || isSignatureRemindersEnabled.getClass().equals(String.class) + || isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for (int i = 0; i < getListSize(isSignatureRemindersEnabled); i++) { + map.put( + "is_signature_reminders_enabled[" + i + "]", + getFromList(isSignatureRemindersEnabled, i)); + } + } else { + map.put( + "is_signature_reminders_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) + || requestEmailFrom.getClass().equals(Integer.class) + || requestEmailFrom.getClass().equals(String.class) + || requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for (int i = 0; i < getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } else { + map.put( + "request_email_from", + JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) + || requestEmailSignature.getClass().equals(Integer.class) + || requestEmailSignature.getClass().equals(String.class) + || requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for (int i = 0; i < getListSize(requestEmailSignature); i++) { + map.put( + "request_email_signature[" + i + "]", + getFromList(requestEmailSignature, i)); + } + } else { + map.put( + "request_email_signature", + JSON.getDefault() + .getMapper() + .writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) + || requiredSignatureTypes.getClass().equals(Integer.class) + || requiredSignatureTypes.getClass().equals(String.class) + || requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for (int i = 0; i < getListSize(requiredSignatureTypes); i++) { + map.put( + "required_signature_types[" + i + "]", + getFromList(requiredSignatureTypes, i)); + } + } else { + map.put( + "required_signature_types", + JSON.getDefault() + .getMapper() + .writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) + || shouldEnableTamperProof.getClass().equals(Integer.class) + || shouldEnableTamperProof.getClass().equals(String.class) + || shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for (int i = 0; i < getListSize(shouldEnableTamperProof); i++) { + map.put( + "should_enable_tamper_proof[" + i + "]", + getFromList(shouldEnableTamperProof, i)); + } + } else { + map.put( + "should_enable_tamper_proof", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) + || shouldIncludeDistinctPdfs.getClass().equals(Integer.class) + || shouldIncludeDistinctPdfs.getClass().equals(String.class) + || shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeDistinctPdfs); i++) { + map.put( + "should_include_distinct_pdfs[" + i + "]", + getFromList(shouldIncludeDistinctPdfs, i)); + } + } else { + map.put( + "should_include_distinct_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) + || shouldOfferSignerAccessCode.getClass().equals(Integer.class) + || shouldOfferSignerAccessCode.getClass().equals(String.class) + || shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for (int i = 0; i < getListSize(shouldOfferSignerAccessCode); i++) { + map.put( + "should_offer_signer_access_code[" + i + "]", + getFromList(shouldOfferSignerAccessCode, i)); + } + } else { + map.put( + "should_offer_signer_access_code", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(String.class) + || shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put( + "should_offer_signer_sms_authentication", + shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for (int i = 0; i < getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put( + "should_offer_signer_sms_authentication[" + i + "]", + getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } else { + map.put( + "should_offer_signer_sms_authentication", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) + || shouldRemoveDocumentId.getClass().equals(Integer.class) + || shouldRemoveDocumentId.getClass().equals(String.class) + || shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for (int i = 0; i < getListSize(shouldRemoveDocumentId); i++) { + map.put( + "should_remove_document_id[" + i + "]", + getFromList(shouldRemoveDocumentId, i)); + } + } else { + map.put( + "should_remove_document_id", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldRemoveDocumentId)); + } + } + if (isNotifyOnSignEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnSignEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnSignEnabled.getClass().equals(java.io.File.class) + || isNotifyOnSignEnabled.getClass().equals(Integer.class) + || isNotifyOnSignEnabled.getClass().equals(String.class) + || isNotifyOnSignEnabled.getClass().isEnum()) { + map.put("is_notify_on_sign_enabled", isNotifyOnSignEnabled); + } else if (isListOfFile(isNotifyOnSignEnabled)) { + for (int i = 0; i < getListSize(isNotifyOnSignEnabled); i++) { + map.put( + "is_notify_on_sign_enabled[" + i + "]", + getFromList(isNotifyOnSignEnabled, i)); + } + } else { + map.put( + "is_notify_on_sign_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isNotifyOnSignEnabled)); + } + } + if (isNotifyOnViewEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnViewEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnViewEnabled.getClass().equals(java.io.File.class) + || isNotifyOnViewEnabled.getClass().equals(Integer.class) + || isNotifyOnViewEnabled.getClass().equals(String.class) + || isNotifyOnViewEnabled.getClass().isEnum()) { + map.put("is_notify_on_view_enabled", isNotifyOnViewEnabled); + } else if (isListOfFile(isNotifyOnViewEnabled)) { + for (int i = 0; i < getListSize(isNotifyOnViewEnabled); i++) { + map.put( + "is_notify_on_view_enabled[" + i + "]", + getFromList(isNotifyOnViewEnabled, i)); + } + } else { + map.put( + "is_notify_on_view_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isNotifyOnViewEnabled)); + } + } + if (shouldAutocomplete != null) { + if (isFileTypeOrListOfFiles(shouldAutocomplete)) { + fileTypeFound = true; + } + + if (shouldAutocomplete.getClass().equals(java.io.File.class) + || shouldAutocomplete.getClass().equals(Integer.class) + || shouldAutocomplete.getClass().equals(String.class) + || shouldAutocomplete.getClass().isEnum()) { + map.put("should_autocomplete", shouldAutocomplete); + } else if (isListOfFile(shouldAutocomplete)) { + for (int i = 0; i < getListSize(shouldAutocomplete); i++) { + map.put( + "should_autocomplete[" + i + "]", + getFromList(shouldAutocomplete, i)); + } + } else { + map.put( + "should_autocomplete", + JSON.getDefault().getMapper().writeValueAsString(shouldAutocomplete)); + } + } + if (shouldIncludeRequestedPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfs.getClass().equals(java.io.File.class) + || shouldIncludeRequestedPdfs.getClass().equals(Integer.class) + || shouldIncludeRequestedPdfs.getClass().equals(String.class) + || shouldIncludeRequestedPdfs.getClass().isEnum()) { + map.put("should_include_requested_pdfs", shouldIncludeRequestedPdfs); + } else if (isListOfFile(shouldIncludeRequestedPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeRequestedPdfs); i++) { + map.put( + "should_include_requested_pdfs[" + i + "]", + getFromList(shouldIncludeRequestedPdfs, i)); + } + } else { + map.put( + "should_include_requested_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeRequestedPdfs)); + } + } + if (shouldIncludeRequestedPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfsForOthers.getClass().equals(java.io.File.class) + || shouldIncludeRequestedPdfsForOthers.getClass().equals(Integer.class) + || shouldIncludeRequestedPdfsForOthers.getClass().equals(String.class) + || shouldIncludeRequestedPdfsForOthers.getClass().isEnum()) { + map.put( + "should_include_requested_pdfs_for_others", + shouldIncludeRequestedPdfsForOthers); + } else if (isListOfFile(shouldIncludeRequestedPdfsForOthers)) { + for (int i = 0; i < getListSize(shouldIncludeRequestedPdfsForOthers); i++) { + map.put( + "should_include_requested_pdfs_for_others[" + i + "]", + getFromList(shouldIncludeRequestedPdfsForOthers, i)); + } + } else { + map.put( + "should_include_requested_pdfs_for_others", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeRequestedPdfsForOthers)); + } + } + if (shouldIncludeSentDocPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfs.getClass().equals(java.io.File.class) + || shouldIncludeSentDocPdfs.getClass().equals(Integer.class) + || shouldIncludeSentDocPdfs.getClass().equals(String.class) + || shouldIncludeSentDocPdfs.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs", shouldIncludeSentDocPdfs); + } else if (isListOfFile(shouldIncludeSentDocPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeSentDocPdfs); i++) { + map.put( + "should_include_sent_doc_pdfs[" + i + "]", + getFromList(shouldIncludeSentDocPdfs, i)); + } + } else { + map.put( + "should_include_sent_doc_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeSentDocPdfs)); + } + } + if (shouldIncludeSentDocPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfsForOthers.getClass().equals(java.io.File.class) + || shouldIncludeSentDocPdfsForOthers.getClass().equals(Integer.class) + || shouldIncludeSentDocPdfsForOthers.getClass().equals(String.class) + || shouldIncludeSentDocPdfsForOthers.getClass().isEnum()) { + map.put( + "should_include_sent_doc_pdfs_for_others", + shouldIncludeSentDocPdfsForOthers); + } else if (isListOfFile(shouldIncludeSentDocPdfsForOthers)) { + for (int i = 0; i < getListSize(shouldIncludeSentDocPdfsForOthers); i++) { + map.put( + "should_include_sent_doc_pdfs_for_others[" + i + "]", + getFromList(shouldIncludeSentDocPdfsForOthers, i)); + } + } else { + map.put( + "should_include_sent_doc_pdfs_for_others", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeSentDocPdfsForOthers)); + } + } + if (shouldSendDailySummary != null) { + if (isFileTypeOrListOfFiles(shouldSendDailySummary)) { + fileTypeFound = true; + } + + if (shouldSendDailySummary.getClass().equals(java.io.File.class) + || shouldSendDailySummary.getClass().equals(Integer.class) + || shouldSendDailySummary.getClass().equals(String.class) + || shouldSendDailySummary.getClass().isEnum()) { + map.put("should_send_daily_summary", shouldSendDailySummary); + } else if (isListOfFile(shouldSendDailySummary)) { + for (int i = 0; i < getListSize(shouldSendDailySummary); i++) { + map.put( + "should_send_daily_summary[" + i + "]", + getFromList(shouldSendDailySummary, i)); + } + } else { + map.put( + "should_send_daily_summary", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendDailySummary)); + } + } + if (shouldSendEmbeddedSignatureConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendEmbeddedSignatureConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendEmbeddedSignatureConfEmails.getClass().equals(java.io.File.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().equals(Integer.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().equals(String.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().isEnum()) { + map.put( + "should_send_embedded_signature_conf_emails", + shouldSendEmbeddedSignatureConfEmails); + } else if (isListOfFile(shouldSendEmbeddedSignatureConfEmails)) { + for (int i = 0; i < getListSize(shouldSendEmbeddedSignatureConfEmails); i++) { + map.put( + "should_send_embedded_signature_conf_emails[" + i + "]", + getFromList(shouldSendEmbeddedSignatureConfEmails, i)); + } + } else { + map.put( + "should_send_embedded_signature_conf_emails", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendEmbeddedSignatureConfEmails)); + } + } + if (shouldSendOrderedSrEmail != null) { + if (isFileTypeOrListOfFiles(shouldSendOrderedSrEmail)) { + fileTypeFound = true; + } + + if (shouldSendOrderedSrEmail.getClass().equals(java.io.File.class) + || shouldSendOrderedSrEmail.getClass().equals(Integer.class) + || shouldSendOrderedSrEmail.getClass().equals(String.class) + || shouldSendOrderedSrEmail.getClass().isEnum()) { + map.put("should_send_ordered_sr_email", shouldSendOrderedSrEmail); + } else if (isListOfFile(shouldSendOrderedSrEmail)) { + for (int i = 0; i < getListSize(shouldSendOrderedSrEmail); i++) { + map.put( + "should_send_ordered_sr_email[" + i + "]", + getFromList(shouldSendOrderedSrEmail, i)); + } + } else { + map.put( + "should_send_ordered_sr_email", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendOrderedSrEmail)); + } + } + if (shouldSendOutboundConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendOutboundConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendOutboundConfEmails.getClass().equals(java.io.File.class) + || shouldSendOutboundConfEmails.getClass().equals(Integer.class) + || shouldSendOutboundConfEmails.getClass().equals(String.class) + || shouldSendOutboundConfEmails.getClass().isEnum()) { + map.put("should_send_outbound_conf_emails", shouldSendOutboundConfEmails); + } else if (isListOfFile(shouldSendOutboundConfEmails)) { + for (int i = 0; i < getListSize(shouldSendOutboundConfEmails); i++) { + map.put( + "should_send_outbound_conf_emails[" + i + "]", + getFromList(shouldSendOutboundConfEmails, i)); + } + } else { + map.put( + "should_send_outbound_conf_emails", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendOutboundConfEmails)); + } + } + if (templateLinkSignatureEmailsEnabled != null) { + if (isFileTypeOrListOfFiles(templateLinkSignatureEmailsEnabled)) { + fileTypeFound = true; + } + + if (templateLinkSignatureEmailsEnabled.getClass().equals(java.io.File.class) + || templateLinkSignatureEmailsEnabled.getClass().equals(Integer.class) + || templateLinkSignatureEmailsEnabled.getClass().equals(String.class) + || templateLinkSignatureEmailsEnabled.getClass().isEnum()) { + map.put( + "template_link_signature_emails_enabled", + templateLinkSignatureEmailsEnabled); + } else if (isListOfFile(templateLinkSignatureEmailsEnabled)) { + for (int i = 0; i < getListSize(templateLinkSignatureEmailsEnabled); i++) { + map.put( + "template_link_signature_emails_enabled[" + i + "]", + getFromList(templateLinkSignatureEmailsEnabled, i)); + } + } else { + map.put( + "template_link_signature_emails_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(templateLinkSignatureEmailsEnabled)); + } + } + } 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/AccountSettingsUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsUpdateRequest.java new file mode 100644 index 000000000..6b5294a8b --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountSettingsUpdateRequest.java @@ -0,0 +1,1804 @@ +/* + * 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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** AccountSettingsUpdateRequest */ +@JsonPropertyOrder({ + AccountSettingsUpdateRequest.JSON_PROPERTY_COMPANY, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_TAGLINE, + AccountSettingsUpdateRequest.JSON_PROPERTY_DATE_FORMAT, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_FROM, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_AUTOCOMPLETE, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS, + AccountSettingsUpdateRequest.JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_UNSET +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class AccountSettingsUpdateRequest { + public static final String JSON_PROPERTY_COMPANY = "company"; + @javax.annotation.Nullable private String company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = + "custom_signing_redirect_enabled"; + @javax.annotation.Nullable private Boolean customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = + "custom_signing_redirect_url"; + @javax.annotation.Nullable private String customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @javax.annotation.Nullable private String customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @javax.annotation.Nullable private DateFormat dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = + "is_signature_reminders_enabled"; + @javax.annotation.Nullable private Boolean isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @javax.annotation.Nullable private String requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @javax.annotation.Nullable private String requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @javax.annotation.Nullable private Set requiredSignatureTypes = null; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = + "should_enable_tamper_proof"; + @javax.annotation.Nullable private Boolean shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = + "should_include_distinct_pdfs"; + @javax.annotation.Nullable private Boolean shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = + "should_offer_signer_access_code"; + @javax.annotation.Nullable private Boolean shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = + "should_offer_signer_sms_authentication"; + @javax.annotation.Nullable private Boolean shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = + "should_remove_document_id"; + @javax.annotation.Nullable private Boolean shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED = + "is_notify_on_sign_enabled"; + @javax.annotation.Nullable private Boolean isNotifyOnSignEnabled; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED = + "is_notify_on_view_enabled"; + @javax.annotation.Nullable private Boolean isNotifyOnViewEnabled; + + public static final String JSON_PROPERTY_SHOULD_AUTOCOMPLETE = "should_autocomplete"; + @javax.annotation.Nullable private Boolean shouldAutocomplete; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS = + "should_include_requested_pdfs"; + @javax.annotation.Nullable private Boolean shouldIncludeRequestedPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS = + "should_include_requested_pdfs_for_others"; + @javax.annotation.Nullable private Boolean shouldIncludeRequestedPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS = + "should_include_sent_doc_pdfs"; + @javax.annotation.Nullable private Boolean shouldIncludeSentDocPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS = + "should_include_sent_doc_pdfs_for_others"; + @javax.annotation.Nullable private Boolean shouldIncludeSentDocPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY = + "should_send_daily_summary"; + @javax.annotation.Nullable private Boolean shouldSendDailySummary; + + public static final String JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS = + "should_send_embedded_signature_conf_emails"; + @javax.annotation.Nullable private Boolean shouldSendEmbeddedSignatureConfEmails; + + public static final String JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL = + "should_send_ordered_sr_email"; + @javax.annotation.Nullable private Boolean shouldSendOrderedSrEmail; + + public static final String JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS = + "should_send_outbound_conf_emails"; + @javax.annotation.Nullable private Boolean shouldSendOutboundConfEmails; + + public static final String JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED = + "template_link_signature_emails_enabled"; + @javax.annotation.Nullable private Boolean templateLinkSignatureEmailsEnabled; + + /** Gets or Sets unset */ + public enum UnsetEnum { + COMPANY(String.valueOf("company")), + + CUSTOM_SIGNING_REDIRECT_ENABLED(String.valueOf("custom_signing_redirect_enabled")), + + CUSTOM_SIGNING_REDIRECT_URL(String.valueOf("custom_signing_redirect_url")), + + CUSTOM_TAGLINE(String.valueOf("custom_tagline")), + + DATE_FORMAT(String.valueOf("date_format")), + + IS_SIGNATURE_REMINDERS_ENABLED(String.valueOf("is_signature_reminders_enabled")), + + REQUEST_EMAIL_FROM(String.valueOf("request_email_from")), + + REQUEST_EMAIL_SIGNATURE(String.valueOf("request_email_signature")), + + REQUIRED_SIGNATURE_TYPES(String.valueOf("required_signature_types")), + + SHOULD_ENABLE_TAMPER_PROOF(String.valueOf("should_enable_tamper_proof")), + + SHOULD_INCLUDE_DISTINCT_PDFS(String.valueOf("should_include_distinct_pdfs")), + + SHOULD_OFFER_SIGNER_ACCESS_CODE(String.valueOf("should_offer_signer_access_code")), + + SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION( + String.valueOf("should_offer_signer_sms_authentication")), + + SHOULD_REMOVE_DOCUMENT_ID(String.valueOf("should_remove_document_id")), + + IS_NOTIFY_ON_SIGN_ENABLED(String.valueOf("is_notify_on_sign_enabled")), + + IS_NOTIFY_ON_VIEW_ENABLED(String.valueOf("is_notify_on_view_enabled")), + + SHOULD_AUTOCOMPLETE(String.valueOf("should_autocomplete")), + + SHOULD_INCLUDE_REQUESTED_PDFS(String.valueOf("should_include_requested_pdfs")), + + SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS( + String.valueOf("should_include_requested_pdfs_for_others")), + + SHOULD_INCLUDE_SENT_DOC_PDFS(String.valueOf("should_include_sent_doc_pdfs")), + + SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS( + String.valueOf("should_include_sent_doc_pdfs_for_others")), + + SHOULD_SEND_DAILY_SUMMARY(String.valueOf("should_send_daily_summary")), + + SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS( + String.valueOf("should_send_embedded_signature_conf_emails")), + + SHOULD_SEND_ORDERED_SR_EMAIL(String.valueOf("should_send_ordered_sr_email")), + + SHOULD_SEND_OUTBOUND_CONF_EMAILS(String.valueOf("should_send_outbound_conf_emails")), + + TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED( + String.valueOf("template_link_signature_emails_enabled")); + + private String value; + + UnsetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UnsetEnum fromValue(String value) { + for (UnsetEnum b : UnsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_UNSET = "unset"; + @javax.annotation.Nullable private Set unset = null; + + public AccountSettingsUpdateRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static AccountSettingsUpdateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsUpdateRequest.class); + } + + public static AccountSettingsUpdateRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + AccountSettingsUpdateRequest.class); + } + + public AccountSettingsUpdateRequest company(@javax.annotation.Nullable String company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * + * @return company + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompany() { + return company; + } + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompany(@javax.annotation.Nullable String company) { + this.company = company; + } + + public AccountSettingsUpdateRequest customSigningRedirectEnabled( + @javax.annotation.Nullable Boolean customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * + * @return customSigningRedirectEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectEnabled( + @javax.annotation.Nullable Boolean customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + public AccountSettingsUpdateRequest customSigningRedirectUrl( + @javax.annotation.Nullable String customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects + * are enabled. + * + * @return customSigningRedirectUrl + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectUrl( + @javax.annotation.Nullable String customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + public AccountSettingsUpdateRequest customTagline( + @javax.annotation.Nullable String customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * + * @return customTagline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomTagline() { + return customTagline; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomTagline(@javax.annotation.Nullable String customTagline) { + this.customTagline = customTagline; + } + + public AccountSettingsUpdateRequest dateFormat( + @javax.annotation.Nullable DateFormat dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Get dateFormat + * + * @return dateFormat + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DateFormat getDateFormat() { + return dateFormat; + } + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateFormat(@javax.annotation.Nullable DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public AccountSettingsUpdateRequest isSignatureRemindersEnabled( + @javax.annotation.Nullable Boolean isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * + * @return isSignatureRemindersEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsSignatureRemindersEnabled( + @javax.annotation.Nullable Boolean isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + public AccountSettingsUpdateRequest requestEmailFrom( + @javax.annotation.Nullable String requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * + * @return requestEmailFrom + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestEmailFrom() { + return requestEmailFrom; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailFrom(@javax.annotation.Nullable String requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + public AccountSettingsUpdateRequest requestEmailSignature( + @javax.annotation.Nullable String requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * + * @return requestEmailSignature + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestEmailSignature() { + return requestEmailSignature; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailSignature(@javax.annotation.Nullable String requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + public AccountSettingsUpdateRequest requiredSignatureTypes( + @javax.annotation.Nullable Set requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + public AccountSettingsUpdateRequest addRequiredSignatureTypesItem( + RequiredSignatureType requiredSignatureTypesItem) { + if (this.requiredSignatureTypes == null) { + this.requiredSignatureTypes = new LinkedHashSet<>(); + } + this.requiredSignatureTypes.add(requiredSignatureTypesItem); + return this; + } + + /** + * Signature creation methods signers may use. + * + * @return requiredSignatureTypes + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredSignatureTypes( + @javax.annotation.Nullable Set requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + public AccountSettingsUpdateRequest shouldEnableTamperProof( + @javax.annotation.Nullable Boolean shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * + * @return shouldEnableTamperProof + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldEnableTamperProof( + @javax.annotation.Nullable Boolean shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + public AccountSettingsUpdateRequest shouldIncludeDistinctPdfs( + @javax.annotation.Nullable Boolean shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one + * PDF. + * + * @return shouldIncludeDistinctPdfs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeDistinctPdfs( + @javax.annotation.Nullable Boolean shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + public AccountSettingsUpdateRequest shouldOfferSignerAccessCode( + @javax.annotation.Nullable Boolean shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * + * @return shouldOfferSignerAccessCode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerAccessCode( + @javax.annotation.Nullable Boolean shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + public AccountSettingsUpdateRequest shouldOfferSignerSmsAuthentication( + @javax.annotation.Nullable Boolean shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * + * @return shouldOfferSignerSmsAuthentication + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerSmsAuthentication( + @javax.annotation.Nullable Boolean shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + public AccountSettingsUpdateRequest shouldRemoveDocumentId( + @javax.annotation.Nullable Boolean shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * + * @return shouldRemoveDocumentId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldRemoveDocumentId( + @javax.annotation.Nullable Boolean shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + public AccountSettingsUpdateRequest isNotifyOnSignEnabled( + @javax.annotation.Nullable Boolean isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document it sent. + * + * @return isNotifyOnSignEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNotifyOnSignEnabled() { + return isNotifyOnSignEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNotifyOnSignEnabled(@javax.annotation.Nullable Boolean isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + } + + public AccountSettingsUpdateRequest isNotifyOnViewEnabled( + @javax.annotation.Nullable Boolean isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + return this; + } + + /** + * Whether to notify the account when someone opens a document it sent. + * + * @return isNotifyOnViewEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsNotifyOnViewEnabled() { + return isNotifyOnViewEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNotifyOnViewEnabled(@javax.annotation.Nullable Boolean isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + } + + public AccountSettingsUpdateRequest shouldAutocomplete( + @javax.annotation.Nullable Boolean shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + return this; + } + + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + * + * @return shouldAutocomplete + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldAutocomplete() { + return shouldAutocomplete; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldAutocomplete(@javax.annotation.Nullable Boolean shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + } + + public AccountSettingsUpdateRequest shouldIncludeRequestedPdfs( + @javax.annotation.Nullable Boolean shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + * + * @return shouldIncludeRequestedPdfs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldIncludeRequestedPdfs() { + return shouldIncludeRequestedPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeRequestedPdfs( + @javax.annotation.Nullable Boolean shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + } + + public AccountSettingsUpdateRequest shouldIncludeRequestedPdfsForOthers( + @javax.annotation.Nullable Boolean shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC + * recipients. + * + * @return shouldIncludeRequestedPdfsForOthers + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldIncludeRequestedPdfsForOthers() { + return shouldIncludeRequestedPdfsForOthers; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeRequestedPdfsForOthers( + @javax.annotation.Nullable Boolean shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + } + + public AccountSettingsUpdateRequest shouldIncludeSentDocPdfs( + @javax.annotation.Nullable Boolean shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + return this; + } + + /** + * Whether emails sent to the account include PDF copies of documents it sends. + * + * @return shouldIncludeSentDocPdfs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldIncludeSentDocPdfs() { + return shouldIncludeSentDocPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeSentDocPdfs( + @javax.annotation.Nullable Boolean shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + } + + public AccountSettingsUpdateRequest shouldIncludeSentDocPdfsForOthers( + @javax.annotation.Nullable Boolean shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + return this; + } + + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + * + * @return shouldIncludeSentDocPdfsForOthers + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldIncludeSentDocPdfsForOthers() { + return shouldIncludeSentDocPdfsForOthers; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeSentDocPdfsForOthers( + @javax.annotation.Nullable Boolean shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + } + + public AccountSettingsUpdateRequest shouldSendDailySummary( + @javax.annotation.Nullable Boolean shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + return this; + } + + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + * + * @return shouldSendDailySummary + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldSendDailySummary() { + return shouldSendDailySummary; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendDailySummary( + @javax.annotation.Nullable Boolean shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + } + + public AccountSettingsUpdateRequest shouldSendEmbeddedSignatureConfEmails( + @javax.annotation.Nullable Boolean shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs a document on a third-party site. + * + * @return shouldSendEmbeddedSignatureConfEmails + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldSendEmbeddedSignatureConfEmails() { + return shouldSendEmbeddedSignatureConfEmails; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendEmbeddedSignatureConfEmails( + @javax.annotation.Nullable Boolean shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + } + + public AccountSettingsUpdateRequest shouldSendOrderedSrEmail( + @javax.annotation.Nullable Boolean shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + return this; + } + + /** + * Whether to notify all parties when an ordered signature request starts. + * + * @return shouldSendOrderedSrEmail + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldSendOrderedSrEmail() { + return shouldSendOrderedSrEmail; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendOrderedSrEmail( + @javax.annotation.Nullable Boolean shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + } + + public AccountSettingsUpdateRequest shouldSendOutboundConfEmails( + @javax.annotation.Nullable Boolean shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs and sends a document. + * + * @return shouldSendOutboundConfEmails + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldSendOutboundConfEmails() { + return shouldSendOutboundConfEmails; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendOutboundConfEmails( + @javax.annotation.Nullable Boolean shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + } + + public AccountSettingsUpdateRequest templateLinkSignatureEmailsEnabled( + @javax.annotation.Nullable Boolean templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document sent by its team through a + * template link. + * + * @return templateLinkSignatureEmailsEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTemplateLinkSignatureEmailsEnabled() { + return templateLinkSignatureEmailsEnabled; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateLinkSignatureEmailsEnabled( + @javax.annotation.Nullable Boolean templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + } + + public AccountSettingsUpdateRequest unset(@javax.annotation.Nullable Set unset) { + this.unset = unset; + return this; + } + + public AccountSettingsUpdateRequest addUnsetItem(UnsetEnum unsetItem) { + if (this.unset == null) { + this.unset = new LinkedHashSet<>(); + } + this.unset.add(unsetItem); + return this; + } + + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or + * locked in the same request. + * + * @return unset + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getUnset() { + return unset; + } + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnset(@javax.annotation.Nullable Set unset) { + this.unset = unset; + } + + /** Return true if this AccountSettingsUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsUpdateRequest accountSettingsUpdateRequest = + (AccountSettingsUpdateRequest) o; + return Objects.equals(this.company, accountSettingsUpdateRequest.company) + && Objects.equals( + this.customSigningRedirectEnabled, + accountSettingsUpdateRequest.customSigningRedirectEnabled) + && Objects.equals( + this.customSigningRedirectUrl, + accountSettingsUpdateRequest.customSigningRedirectUrl) + && Objects.equals(this.customTagline, accountSettingsUpdateRequest.customTagline) + && Objects.equals(this.dateFormat, accountSettingsUpdateRequest.dateFormat) + && Objects.equals( + this.isSignatureRemindersEnabled, + accountSettingsUpdateRequest.isSignatureRemindersEnabled) + && Objects.equals( + this.requestEmailFrom, accountSettingsUpdateRequest.requestEmailFrom) + && Objects.equals( + this.requestEmailSignature, + accountSettingsUpdateRequest.requestEmailSignature) + && Objects.equals( + this.requiredSignatureTypes, + accountSettingsUpdateRequest.requiredSignatureTypes) + && Objects.equals( + this.shouldEnableTamperProof, + accountSettingsUpdateRequest.shouldEnableTamperProof) + && Objects.equals( + this.shouldIncludeDistinctPdfs, + accountSettingsUpdateRequest.shouldIncludeDistinctPdfs) + && Objects.equals( + this.shouldOfferSignerAccessCode, + accountSettingsUpdateRequest.shouldOfferSignerAccessCode) + && Objects.equals( + this.shouldOfferSignerSmsAuthentication, + accountSettingsUpdateRequest.shouldOfferSignerSmsAuthentication) + && Objects.equals( + this.shouldRemoveDocumentId, + accountSettingsUpdateRequest.shouldRemoveDocumentId) + && Objects.equals( + this.isNotifyOnSignEnabled, + accountSettingsUpdateRequest.isNotifyOnSignEnabled) + && Objects.equals( + this.isNotifyOnViewEnabled, + accountSettingsUpdateRequest.isNotifyOnViewEnabled) + && Objects.equals( + this.shouldAutocomplete, accountSettingsUpdateRequest.shouldAutocomplete) + && Objects.equals( + this.shouldIncludeRequestedPdfs, + accountSettingsUpdateRequest.shouldIncludeRequestedPdfs) + && Objects.equals( + this.shouldIncludeRequestedPdfsForOthers, + accountSettingsUpdateRequest.shouldIncludeRequestedPdfsForOthers) + && Objects.equals( + this.shouldIncludeSentDocPdfs, + accountSettingsUpdateRequest.shouldIncludeSentDocPdfs) + && Objects.equals( + this.shouldIncludeSentDocPdfsForOthers, + accountSettingsUpdateRequest.shouldIncludeSentDocPdfsForOthers) + && Objects.equals( + this.shouldSendDailySummary, + accountSettingsUpdateRequest.shouldSendDailySummary) + && Objects.equals( + this.shouldSendEmbeddedSignatureConfEmails, + accountSettingsUpdateRequest.shouldSendEmbeddedSignatureConfEmails) + && Objects.equals( + this.shouldSendOrderedSrEmail, + accountSettingsUpdateRequest.shouldSendOrderedSrEmail) + && Objects.equals( + this.shouldSendOutboundConfEmails, + accountSettingsUpdateRequest.shouldSendOutboundConfEmails) + && Objects.equals( + this.templateLinkSignatureEmailsEnabled, + accountSettingsUpdateRequest.templateLinkSignatureEmailsEnabled) + && Objects.equals(this.unset, accountSettingsUpdateRequest.unset); + } + + @Override + public int hashCode() { + return Objects.hash( + company, + customSigningRedirectEnabled, + customSigningRedirectUrl, + customTagline, + dateFormat, + isSignatureRemindersEnabled, + requestEmailFrom, + requestEmailSignature, + requiredSignatureTypes, + shouldEnableTamperProof, + shouldIncludeDistinctPdfs, + shouldOfferSignerAccessCode, + shouldOfferSignerSmsAuthentication, + shouldRemoveDocumentId, + isNotifyOnSignEnabled, + isNotifyOnViewEnabled, + shouldAutocomplete, + shouldIncludeRequestedPdfs, + shouldIncludeRequestedPdfsForOthers, + shouldIncludeSentDocPdfs, + shouldIncludeSentDocPdfsForOthers, + shouldSendDailySummary, + shouldSendEmbeddedSignatureConfEmails, + shouldSendOrderedSrEmail, + shouldSendOutboundConfEmails, + templateLinkSignatureEmailsEnabled, + unset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsUpdateRequest {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ") + .append(toIndentedString(customSigningRedirectEnabled)) + .append("\n"); + sb.append(" customSigningRedirectUrl: ") + .append(toIndentedString(customSigningRedirectUrl)) + .append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ") + .append(toIndentedString(isSignatureRemindersEnabled)) + .append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ") + .append(toIndentedString(requestEmailSignature)) + .append("\n"); + sb.append(" requiredSignatureTypes: ") + .append(toIndentedString(requiredSignatureTypes)) + .append("\n"); + sb.append(" shouldEnableTamperProof: ") + .append(toIndentedString(shouldEnableTamperProof)) + .append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ") + .append(toIndentedString(shouldIncludeDistinctPdfs)) + .append("\n"); + sb.append(" shouldOfferSignerAccessCode: ") + .append(toIndentedString(shouldOfferSignerAccessCode)) + .append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ") + .append(toIndentedString(shouldOfferSignerSmsAuthentication)) + .append("\n"); + sb.append(" shouldRemoveDocumentId: ") + .append(toIndentedString(shouldRemoveDocumentId)) + .append("\n"); + sb.append(" isNotifyOnSignEnabled: ") + .append(toIndentedString(isNotifyOnSignEnabled)) + .append("\n"); + sb.append(" isNotifyOnViewEnabled: ") + .append(toIndentedString(isNotifyOnViewEnabled)) + .append("\n"); + sb.append(" shouldAutocomplete: ") + .append(toIndentedString(shouldAutocomplete)) + .append("\n"); + sb.append(" shouldIncludeRequestedPdfs: ") + .append(toIndentedString(shouldIncludeRequestedPdfs)) + .append("\n"); + sb.append(" shouldIncludeRequestedPdfsForOthers: ") + .append(toIndentedString(shouldIncludeRequestedPdfsForOthers)) + .append("\n"); + sb.append(" shouldIncludeSentDocPdfs: ") + .append(toIndentedString(shouldIncludeSentDocPdfs)) + .append("\n"); + sb.append(" shouldIncludeSentDocPdfsForOthers: ") + .append(toIndentedString(shouldIncludeSentDocPdfsForOthers)) + .append("\n"); + sb.append(" shouldSendDailySummary: ") + .append(toIndentedString(shouldSendDailySummary)) + .append("\n"); + sb.append(" shouldSendEmbeddedSignatureConfEmails: ") + .append(toIndentedString(shouldSendEmbeddedSignatureConfEmails)) + .append("\n"); + sb.append(" shouldSendOrderedSrEmail: ") + .append(toIndentedString(shouldSendOrderedSrEmail)) + .append("\n"); + sb.append(" shouldSendOutboundConfEmails: ") + .append(toIndentedString(shouldSendOutboundConfEmails)) + .append("\n"); + sb.append(" templateLinkSignatureEmailsEnabled: ") + .append(toIndentedString(templateLinkSignatureEmailsEnabled)) + .append("\n"); + sb.append(" unset: ").append(toIndentedString(unset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) + || company.getClass().equals(Integer.class) + || company.getClass().equals(String.class) + || company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for (int i = 0; i < getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) + || customSigningRedirectEnabled.getClass().equals(Integer.class) + || customSigningRedirectEnabled.getClass().equals(String.class) + || customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for (int i = 0; i < getListSize(customSigningRedirectEnabled); i++) { + map.put( + "custom_signing_redirect_enabled[" + i + "]", + getFromList(customSigningRedirectEnabled, i)); + } + } else { + map.put( + "custom_signing_redirect_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) + || customSigningRedirectUrl.getClass().equals(Integer.class) + || customSigningRedirectUrl.getClass().equals(String.class) + || customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for (int i = 0; i < getListSize(customSigningRedirectUrl); i++) { + map.put( + "custom_signing_redirect_url[" + i + "]", + getFromList(customSigningRedirectUrl, i)); + } + } else { + map.put( + "custom_signing_redirect_url", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) + || customTagline.getClass().equals(Integer.class) + || customTagline.getClass().equals(String.class) + || customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for (int i = 0; i < getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } else { + map.put( + "custom_tagline", + JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) + || dateFormat.getClass().equals(Integer.class) + || dateFormat.getClass().equals(String.class) + || dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for (int i = 0; i < getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } else { + map.put( + "date_format", + JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) + || isSignatureRemindersEnabled.getClass().equals(Integer.class) + || isSignatureRemindersEnabled.getClass().equals(String.class) + || isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for (int i = 0; i < getListSize(isSignatureRemindersEnabled); i++) { + map.put( + "is_signature_reminders_enabled[" + i + "]", + getFromList(isSignatureRemindersEnabled, i)); + } + } else { + map.put( + "is_signature_reminders_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) + || requestEmailFrom.getClass().equals(Integer.class) + || requestEmailFrom.getClass().equals(String.class) + || requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for (int i = 0; i < getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } else { + map.put( + "request_email_from", + JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) + || requestEmailSignature.getClass().equals(Integer.class) + || requestEmailSignature.getClass().equals(String.class) + || requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for (int i = 0; i < getListSize(requestEmailSignature); i++) { + map.put( + "request_email_signature[" + i + "]", + getFromList(requestEmailSignature, i)); + } + } else { + map.put( + "request_email_signature", + JSON.getDefault() + .getMapper() + .writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) + || requiredSignatureTypes.getClass().equals(Integer.class) + || requiredSignatureTypes.getClass().equals(String.class) + || requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for (int i = 0; i < getListSize(requiredSignatureTypes); i++) { + map.put( + "required_signature_types[" + i + "]", + getFromList(requiredSignatureTypes, i)); + } + } else { + map.put( + "required_signature_types", + JSON.getDefault() + .getMapper() + .writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) + || shouldEnableTamperProof.getClass().equals(Integer.class) + || shouldEnableTamperProof.getClass().equals(String.class) + || shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for (int i = 0; i < getListSize(shouldEnableTamperProof); i++) { + map.put( + "should_enable_tamper_proof[" + i + "]", + getFromList(shouldEnableTamperProof, i)); + } + } else { + map.put( + "should_enable_tamper_proof", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) + || shouldIncludeDistinctPdfs.getClass().equals(Integer.class) + || shouldIncludeDistinctPdfs.getClass().equals(String.class) + || shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeDistinctPdfs); i++) { + map.put( + "should_include_distinct_pdfs[" + i + "]", + getFromList(shouldIncludeDistinctPdfs, i)); + } + } else { + map.put( + "should_include_distinct_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) + || shouldOfferSignerAccessCode.getClass().equals(Integer.class) + || shouldOfferSignerAccessCode.getClass().equals(String.class) + || shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for (int i = 0; i < getListSize(shouldOfferSignerAccessCode); i++) { + map.put( + "should_offer_signer_access_code[" + i + "]", + getFromList(shouldOfferSignerAccessCode, i)); + } + } else { + map.put( + "should_offer_signer_access_code", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(String.class) + || shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put( + "should_offer_signer_sms_authentication", + shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for (int i = 0; i < getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put( + "should_offer_signer_sms_authentication[" + i + "]", + getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } else { + map.put( + "should_offer_signer_sms_authentication", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) + || shouldRemoveDocumentId.getClass().equals(Integer.class) + || shouldRemoveDocumentId.getClass().equals(String.class) + || shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for (int i = 0; i < getListSize(shouldRemoveDocumentId); i++) { + map.put( + "should_remove_document_id[" + i + "]", + getFromList(shouldRemoveDocumentId, i)); + } + } else { + map.put( + "should_remove_document_id", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldRemoveDocumentId)); + } + } + if (isNotifyOnSignEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnSignEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnSignEnabled.getClass().equals(java.io.File.class) + || isNotifyOnSignEnabled.getClass().equals(Integer.class) + || isNotifyOnSignEnabled.getClass().equals(String.class) + || isNotifyOnSignEnabled.getClass().isEnum()) { + map.put("is_notify_on_sign_enabled", isNotifyOnSignEnabled); + } else if (isListOfFile(isNotifyOnSignEnabled)) { + for (int i = 0; i < getListSize(isNotifyOnSignEnabled); i++) { + map.put( + "is_notify_on_sign_enabled[" + i + "]", + getFromList(isNotifyOnSignEnabled, i)); + } + } else { + map.put( + "is_notify_on_sign_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isNotifyOnSignEnabled)); + } + } + if (isNotifyOnViewEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnViewEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnViewEnabled.getClass().equals(java.io.File.class) + || isNotifyOnViewEnabled.getClass().equals(Integer.class) + || isNotifyOnViewEnabled.getClass().equals(String.class) + || isNotifyOnViewEnabled.getClass().isEnum()) { + map.put("is_notify_on_view_enabled", isNotifyOnViewEnabled); + } else if (isListOfFile(isNotifyOnViewEnabled)) { + for (int i = 0; i < getListSize(isNotifyOnViewEnabled); i++) { + map.put( + "is_notify_on_view_enabled[" + i + "]", + getFromList(isNotifyOnViewEnabled, i)); + } + } else { + map.put( + "is_notify_on_view_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isNotifyOnViewEnabled)); + } + } + if (shouldAutocomplete != null) { + if (isFileTypeOrListOfFiles(shouldAutocomplete)) { + fileTypeFound = true; + } + + if (shouldAutocomplete.getClass().equals(java.io.File.class) + || shouldAutocomplete.getClass().equals(Integer.class) + || shouldAutocomplete.getClass().equals(String.class) + || shouldAutocomplete.getClass().isEnum()) { + map.put("should_autocomplete", shouldAutocomplete); + } else if (isListOfFile(shouldAutocomplete)) { + for (int i = 0; i < getListSize(shouldAutocomplete); i++) { + map.put( + "should_autocomplete[" + i + "]", + getFromList(shouldAutocomplete, i)); + } + } else { + map.put( + "should_autocomplete", + JSON.getDefault().getMapper().writeValueAsString(shouldAutocomplete)); + } + } + if (shouldIncludeRequestedPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfs.getClass().equals(java.io.File.class) + || shouldIncludeRequestedPdfs.getClass().equals(Integer.class) + || shouldIncludeRequestedPdfs.getClass().equals(String.class) + || shouldIncludeRequestedPdfs.getClass().isEnum()) { + map.put("should_include_requested_pdfs", shouldIncludeRequestedPdfs); + } else if (isListOfFile(shouldIncludeRequestedPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeRequestedPdfs); i++) { + map.put( + "should_include_requested_pdfs[" + i + "]", + getFromList(shouldIncludeRequestedPdfs, i)); + } + } else { + map.put( + "should_include_requested_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeRequestedPdfs)); + } + } + if (shouldIncludeRequestedPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfsForOthers.getClass().equals(java.io.File.class) + || shouldIncludeRequestedPdfsForOthers.getClass().equals(Integer.class) + || shouldIncludeRequestedPdfsForOthers.getClass().equals(String.class) + || shouldIncludeRequestedPdfsForOthers.getClass().isEnum()) { + map.put( + "should_include_requested_pdfs_for_others", + shouldIncludeRequestedPdfsForOthers); + } else if (isListOfFile(shouldIncludeRequestedPdfsForOthers)) { + for (int i = 0; i < getListSize(shouldIncludeRequestedPdfsForOthers); i++) { + map.put( + "should_include_requested_pdfs_for_others[" + i + "]", + getFromList(shouldIncludeRequestedPdfsForOthers, i)); + } + } else { + map.put( + "should_include_requested_pdfs_for_others", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeRequestedPdfsForOthers)); + } + } + if (shouldIncludeSentDocPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfs.getClass().equals(java.io.File.class) + || shouldIncludeSentDocPdfs.getClass().equals(Integer.class) + || shouldIncludeSentDocPdfs.getClass().equals(String.class) + || shouldIncludeSentDocPdfs.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs", shouldIncludeSentDocPdfs); + } else if (isListOfFile(shouldIncludeSentDocPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeSentDocPdfs); i++) { + map.put( + "should_include_sent_doc_pdfs[" + i + "]", + getFromList(shouldIncludeSentDocPdfs, i)); + } + } else { + map.put( + "should_include_sent_doc_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeSentDocPdfs)); + } + } + if (shouldIncludeSentDocPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfsForOthers.getClass().equals(java.io.File.class) + || shouldIncludeSentDocPdfsForOthers.getClass().equals(Integer.class) + || shouldIncludeSentDocPdfsForOthers.getClass().equals(String.class) + || shouldIncludeSentDocPdfsForOthers.getClass().isEnum()) { + map.put( + "should_include_sent_doc_pdfs_for_others", + shouldIncludeSentDocPdfsForOthers); + } else if (isListOfFile(shouldIncludeSentDocPdfsForOthers)) { + for (int i = 0; i < getListSize(shouldIncludeSentDocPdfsForOthers); i++) { + map.put( + "should_include_sent_doc_pdfs_for_others[" + i + "]", + getFromList(shouldIncludeSentDocPdfsForOthers, i)); + } + } else { + map.put( + "should_include_sent_doc_pdfs_for_others", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeSentDocPdfsForOthers)); + } + } + if (shouldSendDailySummary != null) { + if (isFileTypeOrListOfFiles(shouldSendDailySummary)) { + fileTypeFound = true; + } + + if (shouldSendDailySummary.getClass().equals(java.io.File.class) + || shouldSendDailySummary.getClass().equals(Integer.class) + || shouldSendDailySummary.getClass().equals(String.class) + || shouldSendDailySummary.getClass().isEnum()) { + map.put("should_send_daily_summary", shouldSendDailySummary); + } else if (isListOfFile(shouldSendDailySummary)) { + for (int i = 0; i < getListSize(shouldSendDailySummary); i++) { + map.put( + "should_send_daily_summary[" + i + "]", + getFromList(shouldSendDailySummary, i)); + } + } else { + map.put( + "should_send_daily_summary", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendDailySummary)); + } + } + if (shouldSendEmbeddedSignatureConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendEmbeddedSignatureConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendEmbeddedSignatureConfEmails.getClass().equals(java.io.File.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().equals(Integer.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().equals(String.class) + || shouldSendEmbeddedSignatureConfEmails.getClass().isEnum()) { + map.put( + "should_send_embedded_signature_conf_emails", + shouldSendEmbeddedSignatureConfEmails); + } else if (isListOfFile(shouldSendEmbeddedSignatureConfEmails)) { + for (int i = 0; i < getListSize(shouldSendEmbeddedSignatureConfEmails); i++) { + map.put( + "should_send_embedded_signature_conf_emails[" + i + "]", + getFromList(shouldSendEmbeddedSignatureConfEmails, i)); + } + } else { + map.put( + "should_send_embedded_signature_conf_emails", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendEmbeddedSignatureConfEmails)); + } + } + if (shouldSendOrderedSrEmail != null) { + if (isFileTypeOrListOfFiles(shouldSendOrderedSrEmail)) { + fileTypeFound = true; + } + + if (shouldSendOrderedSrEmail.getClass().equals(java.io.File.class) + || shouldSendOrderedSrEmail.getClass().equals(Integer.class) + || shouldSendOrderedSrEmail.getClass().equals(String.class) + || shouldSendOrderedSrEmail.getClass().isEnum()) { + map.put("should_send_ordered_sr_email", shouldSendOrderedSrEmail); + } else if (isListOfFile(shouldSendOrderedSrEmail)) { + for (int i = 0; i < getListSize(shouldSendOrderedSrEmail); i++) { + map.put( + "should_send_ordered_sr_email[" + i + "]", + getFromList(shouldSendOrderedSrEmail, i)); + } + } else { + map.put( + "should_send_ordered_sr_email", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendOrderedSrEmail)); + } + } + if (shouldSendOutboundConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendOutboundConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendOutboundConfEmails.getClass().equals(java.io.File.class) + || shouldSendOutboundConfEmails.getClass().equals(Integer.class) + || shouldSendOutboundConfEmails.getClass().equals(String.class) + || shouldSendOutboundConfEmails.getClass().isEnum()) { + map.put("should_send_outbound_conf_emails", shouldSendOutboundConfEmails); + } else if (isListOfFile(shouldSendOutboundConfEmails)) { + for (int i = 0; i < getListSize(shouldSendOutboundConfEmails); i++) { + map.put( + "should_send_outbound_conf_emails[" + i + "]", + getFromList(shouldSendOutboundConfEmails, i)); + } + } else { + map.put( + "should_send_outbound_conf_emails", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldSendOutboundConfEmails)); + } + } + if (templateLinkSignatureEmailsEnabled != null) { + if (isFileTypeOrListOfFiles(templateLinkSignatureEmailsEnabled)) { + fileTypeFound = true; + } + + if (templateLinkSignatureEmailsEnabled.getClass().equals(java.io.File.class) + || templateLinkSignatureEmailsEnabled.getClass().equals(Integer.class) + || templateLinkSignatureEmailsEnabled.getClass().equals(String.class) + || templateLinkSignatureEmailsEnabled.getClass().isEnum()) { + map.put( + "template_link_signature_emails_enabled", + templateLinkSignatureEmailsEnabled); + } else if (isListOfFile(templateLinkSignatureEmailsEnabled)) { + for (int i = 0; i < getListSize(templateLinkSignatureEmailsEnabled); i++) { + map.put( + "template_link_signature_emails_enabled[" + i + "]", + getFromList(templateLinkSignatureEmailsEnabled, i)); + } + } else { + map.put( + "template_link_signature_emails_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(templateLinkSignatureEmailsEnabled)); + } + } + if (unset != null) { + if (isFileTypeOrListOfFiles(unset)) { + fileTypeFound = true; + } + + if (unset.getClass().equals(java.io.File.class) + || unset.getClass().equals(Integer.class) + || unset.getClass().equals(String.class) + || unset.getClass().isEnum()) { + map.put("unset", unset); + } else if (isListOfFile(unset)) { + for (int i = 0; i < getListSize(unset); i++) { + map.put("unset[" + i + "]", getFromList(unset, i)); + } + } else { + map.put("unset", JSON.getDefault().getMapper().writeValueAsString(unset)); + } + } + } 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/BooleanSettingUpdate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BooleanSettingUpdate.java new file mode 100644 index 000000000..c2c2e47e6 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BooleanSettingUpdate.java @@ -0,0 +1,215 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Updates a boolean team setting. Provide `value`, `lock_mode`, or both. */ +@JsonPropertyOrder({ + BooleanSettingUpdate.JSON_PROPERTY_VALUE, + BooleanSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class BooleanSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private Boolean value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @javax.annotation.Nullable private TeamSettingLock lockMode; + + public BooleanSettingUpdate() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static BooleanSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, BooleanSettingUpdate.class); + } + + public static BooleanSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), BooleanSettingUpdate.class); + } + + public BooleanSettingUpdate value(@javax.annotation.Nullable Boolean value) { + this.value = value; + return this; + } + + /** + * Boolean value to store. + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable Boolean value) { + this.value = value; + } + + public BooleanSettingUpdate lockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * + * @return lockMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamSettingLock getLockMode() { + return lockMode; + } + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + /** Return true if this BooleanSettingUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BooleanSettingUpdate booleanSettingUpdate = (BooleanSettingUpdate) o; + return Objects.equals(this.value, booleanSettingUpdate.value) + && Objects.equals(this.lockMode, booleanSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BooleanSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) + || lockMode.getClass().equals(Integer.class) + || lockMode.getClass().equals(String.class) + || lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for (int i = 0; i < getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } else { + map.put( + "lock_mode", + JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/DataResidency.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DataResidency.java new file mode 100644 index 000000000..c2e2e777f --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DataResidency.java @@ -0,0 +1,57 @@ +/* + * 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Storage region for team documents. */ +public enum DataResidency { + US("us"), + + EU("eu"), + + AU("au"), + + JP("jp"), + + UK("uk"), + + CA("ca"); + + private String value; + + DataResidency(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DataResidency fromValue(String value) { + for (DataResidency b : DataResidency.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.java new file mode 100644 index 000000000..9c93008e2 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Updates the data residency team setting. Provide `value`, `lock_mode`, or + * both. + */ +@JsonPropertyOrder({ + DataResidencySettingUpdate.JSON_PROPERTY_VALUE, + DataResidencySettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataResidencySettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private DataResidency value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @javax.annotation.Nullable private TeamSettingLock lockMode; + + public DataResidencySettingUpdate() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static DataResidencySettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, DataResidencySettingUpdate.class); + } + + public static DataResidencySettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + DataResidencySettingUpdate.class); + } + + public DataResidencySettingUpdate value(@javax.annotation.Nullable DataResidency value) { + this.value = value; + return this; + } + + /** + * Get value + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataResidency getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable DataResidency value) { + this.value = value; + } + + public DataResidencySettingUpdate lockMode( + @javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * + * @return lockMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamSettingLock getLockMode() { + return lockMode; + } + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + /** Return true if this DataResidencySettingUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataResidencySettingUpdate dataResidencySettingUpdate = (DataResidencySettingUpdate) o; + return Objects.equals(this.value, dataResidencySettingUpdate.value) + && Objects.equals(this.lockMode, dataResidencySettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataResidencySettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) + || lockMode.getClass().equals(Integer.class) + || lockMode.getClass().equals(String.class) + || lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for (int i = 0; i < getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } else { + map.put( + "lock_mode", + JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/DateFormat.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DateFormat.java new file mode 100644 index 000000000..7358108da --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DateFormat.java @@ -0,0 +1,51 @@ +/* + * 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Date format used to display dates. */ +public enum DateFormat { + MM_DD_YYYY("MM/DD/YYYY"), + + DD_MM_YYYY("DD/MM/YYYY"), + + YYYY_MM_DD("YYYY/MM/DD"); + + private String value; + + DateFormat(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DateFormat fromValue(String value) { + for (DateFormat b : DateFormat.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java new file mode 100644 index 000000000..cd2ec8381 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java @@ -0,0 +1,218 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Updates a date format team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + DateFormatSettingUpdate.JSON_PROPERTY_VALUE, + DateFormatSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class DateFormatSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private DateFormat value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @javax.annotation.Nullable private TeamSettingLock lockMode; + + public DateFormatSettingUpdate() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static DateFormatSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, DateFormatSettingUpdate.class); + } + + public static DateFormatSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), DateFormatSettingUpdate.class); + } + + public DateFormatSettingUpdate value(@javax.annotation.Nullable DateFormat value) { + this.value = value; + return this; + } + + /** + * Get value + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DateFormat getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable DateFormat value) { + this.value = value; + } + + public DateFormatSettingUpdate lockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * + * @return lockMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamSettingLock getLockMode() { + return lockMode; + } + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + /** Return true if this DateFormatSettingUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DateFormatSettingUpdate dateFormatSettingUpdate = (DateFormatSettingUpdate) o; + return Objects.equals(this.value, dateFormatSettingUpdate.value) + && Objects.equals(this.lockMode, dateFormatSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DateFormatSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) + || lockMode.getClass().equals(Integer.class) + || lockMode.getClass().equals(String.class) + || lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for (int i = 0; i < getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } else { + map.put( + "lock_mode", + JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/RequiredSignatureType.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/RequiredSignatureType.java new file mode 100644 index 000000000..10c86fb52 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/RequiredSignatureType.java @@ -0,0 +1,53 @@ +/* + * 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** A signature creation method a signer may use. */ +public enum RequiredSignatureType { + DRAW("draw"), + + PHONE("phone"), + + TYPE("type"), + + UPLOAD("upload"); + + private String value; + + RequiredSignatureType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RequiredSignatureType fromValue(String value) { + for (RequiredSignatureType b : RequiredSignatureType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java new file mode 100644 index 000000000..633036785 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java @@ -0,0 +1,235 @@ +/* + * 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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * Updates the required signature types team setting. Provide `value`, + * `lock_mode`, or both. + */ +@JsonPropertyOrder({ + RequiredSignatureTypesSettingUpdate.JSON_PROPERTY_VALUE, + RequiredSignatureTypesSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class RequiredSignatureTypesSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private Set value = null; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @javax.annotation.Nullable private TeamSettingLock lockMode; + + public RequiredSignatureTypesSettingUpdate() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static RequiredSignatureTypesSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, RequiredSignatureTypesSettingUpdate.class); + } + + public static RequiredSignatureTypesSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + RequiredSignatureTypesSettingUpdate.class); + } + + public RequiredSignatureTypesSettingUpdate value( + @javax.annotation.Nullable Set value) { + this.value = value; + return this; + } + + public RequiredSignatureTypesSettingUpdate addValueItem(RequiredSignatureType valueItem) { + if (this.value == null) { + this.value = new LinkedHashSet<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * Signature creation methods signers may use. + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getValue() { + return value; + } + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable Set value) { + this.value = value; + } + + public RequiredSignatureTypesSettingUpdate lockMode( + @javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * + * @return lockMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamSettingLock getLockMode() { + return lockMode; + } + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + /** Return true if this RequiredSignatureTypesSettingUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequiredSignatureTypesSettingUpdate requiredSignatureTypesSettingUpdate = + (RequiredSignatureTypesSettingUpdate) o; + return Objects.equals(this.value, requiredSignatureTypesSettingUpdate.value) + && Objects.equals(this.lockMode, requiredSignatureTypesSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequiredSignatureTypesSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) + || lockMode.getClass().equals(Integer.class) + || lockMode.getClass().equals(String.class) + || lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for (int i = 0; i < getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } else { + map.put( + "lock_mode", + JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/SettingLockResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SettingLockResponse.java new file mode 100644 index 000000000..2c05daa03 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SettingLockResponse.java @@ -0,0 +1,252 @@ +/* + * 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; + +/** SettingLockResponse */ +@JsonPropertyOrder({ + SettingLockResponse.JSON_PROPERTY_MODE, + SettingLockResponse.JSON_PROPERTY_SOURCE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SettingLockResponse { + public static final String JSON_PROPERTY_MODE = "mode"; + @javax.annotation.Nonnull private TeamSettingLock mode; + + /** Gets or Sets source */ + public enum SourceEnum { + TEAM(String.valueOf("team")), + + PARENT_TEAM(String.valueOf("parent_team")), + + DEFAULT(String.valueOf("default")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull private SourceEnum source; + + public SettingLockResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SettingLockResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SettingLockResponse.class); + } + + public static SettingLockResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), SettingLockResponse.class); + } + + public SettingLockResponse mode(@javax.annotation.Nonnull TeamSettingLock mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * + * @return mode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TeamSettingLock getMode() { + return mode; + } + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMode(@javax.annotation.Nonnull TeamSettingLock mode) { + this.mode = mode; + } + + public SettingLockResponse source(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceEnum getSource() { + return source; + } + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + /** Return true if this SettingLockResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingLockResponse settingLockResponse = (SettingLockResponse) o; + return Objects.equals(this.mode, settingLockResponse.mode) + && Objects.equals(this.source, settingLockResponse.source); + } + + @Override + public int hashCode() { + return Objects.hash(mode, source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingLockResponse {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (mode != null) { + if (isFileTypeOrListOfFiles(mode)) { + fileTypeFound = true; + } + + if (mode.getClass().equals(java.io.File.class) + || mode.getClass().equals(Integer.class) + || mode.getClass().equals(String.class) + || mode.getClass().isEnum()) { + map.put("mode", mode); + } else if (isListOfFile(mode)) { + for (int i = 0; i < getListSize(mode); i++) { + map.put("mode[" + i + "]", getFromList(mode, i)); + } + } else { + map.put("mode", JSON.getDefault().getMapper().writeValueAsString(mode)); + } + } + if (source != null) { + if (isFileTypeOrListOfFiles(source)) { + fileTypeFound = true; + } + + if (source.getClass().equals(java.io.File.class) + || source.getClass().equals(Integer.class) + || source.getClass().equals(String.class) + || source.getClass().isEnum()) { + map.put("source", source); + } else if (isListOfFile(source)) { + for (int i = 0; i < getListSize(source); i++) { + map.put("source[" + i + "]", getFromList(source, i)); + } + } else { + map.put("source", JSON.getDefault().getMapper().writeValueAsString(source)); + } + } + } 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/SettingResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SettingResponse.java new file mode 100644 index 000000000..f66192140 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SettingResponse.java @@ -0,0 +1,480 @@ +/* + * 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; + +/** SettingResponse */ +@JsonPropertyOrder({ + SettingResponse.JSON_PROPERTY_VALUE, + SettingResponse.JSON_PROPERTY_IS_INHERITED, + SettingResponse.JSON_PROPERTY_SOURCE, + SettingResponse.JSON_PROPERTY_TYPE, + SettingResponse.JSON_PROPERTY_WRITABLE, + SettingResponse.JSON_PROPERTY_LOCK +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SettingResponse { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private Object value = null; + + public static final String JSON_PROPERTY_IS_INHERITED = "is_inherited"; + @javax.annotation.Nonnull private Boolean isInherited; + + /** Gets or Sets source */ + public enum SourceEnum { + ACCOUNT(String.valueOf("account")), + + TEAM(String.valueOf("team")), + + PARENT_TEAM(String.valueOf("parent_team")), + + DEFAULT(String.valueOf("default")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @javax.annotation.Nonnull private SourceEnum source; + + /** Gets or Sets type */ + public enum TypeEnum { + BOOLEAN(String.valueOf("boolean")), + + INTEGER(String.valueOf("integer")), + + STRING(String.valueOf("string")), + + ARRAY(String.valueOf("array")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @javax.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_WRITABLE = "writable"; + @javax.annotation.Nonnull private Boolean writable; + + public static final String JSON_PROPERTY_LOCK = "lock"; + @javax.annotation.Nonnull private SettingLockResponse lock; + + public SettingResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SettingResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SettingResponse.class); + } + + public static SettingResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), SettingResponse.class); + } + + public SettingResponse value(@javax.annotation.Nullable Object value) { + this.value = value; + return this; + } + + /** + * Current value of the setting. Null when the setting has no value. + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Object getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@javax.annotation.Nullable Object value) { + this.value = value; + } + + public SettingResponse isInherited(@javax.annotation.Nonnull Boolean isInherited) { + this.isInherited = isInherited; + return this; + } + + /** + * Get isInherited + * + * @return isInherited + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_INHERITED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsInherited() { + return isInherited; + } + + @JsonProperty(JSON_PROPERTY_IS_INHERITED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsInherited(@javax.annotation.Nonnull Boolean isInherited) { + this.isInherited = isInherited; + } + + public SettingResponse source(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourceEnum getSource() { + return source; + } + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@javax.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + public SettingResponse type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public SettingResponse writable(@javax.annotation.Nonnull Boolean writable) { + this.writable = writable; + return this; + } + + /** + * Get writable + * + * @return writable + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getWritable() { + return writable; + } + + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWritable(@javax.annotation.Nonnull Boolean writable) { + this.writable = writable; + } + + public SettingResponse lock(@javax.annotation.Nonnull SettingLockResponse lock) { + this.lock = lock; + return this; + } + + /** + * Get lock + * + * @return lock + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingLockResponse getLock() { + return lock; + } + + @JsonProperty(JSON_PROPERTY_LOCK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLock(@javax.annotation.Nonnull SettingLockResponse lock) { + this.lock = lock; + } + + /** Return true if this SettingResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingResponse settingResponse = (SettingResponse) o; + return Objects.equals(this.value, settingResponse.value) + && Objects.equals(this.isInherited, settingResponse.isInherited) + && Objects.equals(this.source, settingResponse.source) + && Objects.equals(this.type, settingResponse.type) + && Objects.equals(this.writable, settingResponse.writable) + && Objects.equals(this.lock, settingResponse.lock); + } + + @Override + public int hashCode() { + return Objects.hash(value, isInherited, source, type, writable, lock); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingResponse {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" isInherited: ").append(toIndentedString(isInherited)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" writable: ").append(toIndentedString(writable)).append("\n"); + sb.append(" lock: ").append(toIndentedString(lock)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (isInherited != null) { + if (isFileTypeOrListOfFiles(isInherited)) { + fileTypeFound = true; + } + + if (isInherited.getClass().equals(java.io.File.class) + || isInherited.getClass().equals(Integer.class) + || isInherited.getClass().equals(String.class) + || isInherited.getClass().isEnum()) { + map.put("is_inherited", isInherited); + } else if (isListOfFile(isInherited)) { + for (int i = 0; i < getListSize(isInherited); i++) { + map.put("is_inherited[" + i + "]", getFromList(isInherited, i)); + } + } else { + map.put( + "is_inherited", + JSON.getDefault().getMapper().writeValueAsString(isInherited)); + } + } + if (source != null) { + if (isFileTypeOrListOfFiles(source)) { + fileTypeFound = true; + } + + if (source.getClass().equals(java.io.File.class) + || source.getClass().equals(Integer.class) + || source.getClass().equals(String.class) + || source.getClass().isEnum()) { + map.put("source", source); + } else if (isListOfFile(source)) { + for (int i = 0; i < getListSize(source); i++) { + map.put("source[" + i + "]", getFromList(source, i)); + } + } else { + map.put("source", JSON.getDefault().getMapper().writeValueAsString(source)); + } + } + if (type != null) { + if (isFileTypeOrListOfFiles(type)) { + fileTypeFound = true; + } + + if (type.getClass().equals(java.io.File.class) + || type.getClass().equals(Integer.class) + || type.getClass().equals(String.class) + || type.getClass().isEnum()) { + map.put("type", type); + } else if (isListOfFile(type)) { + for (int i = 0; i < getListSize(type); i++) { + map.put("type[" + i + "]", getFromList(type, i)); + } + } else { + map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); + } + } + if (writable != null) { + if (isFileTypeOrListOfFiles(writable)) { + fileTypeFound = true; + } + + if (writable.getClass().equals(java.io.File.class) + || writable.getClass().equals(Integer.class) + || writable.getClass().equals(String.class) + || writable.getClass().isEnum()) { + map.put("writable", writable); + } else if (isListOfFile(writable)) { + for (int i = 0; i < getListSize(writable); i++) { + map.put("writable[" + i + "]", getFromList(writable, i)); + } + } else { + map.put("writable", JSON.getDefault().getMapper().writeValueAsString(writable)); + } + } + if (lock != null) { + if (isFileTypeOrListOfFiles(lock)) { + fileTypeFound = true; + } + + if (lock.getClass().equals(java.io.File.class) + || lock.getClass().equals(Integer.class) + || lock.getClass().equals(String.class) + || lock.getClass().isEnum()) { + map.put("lock", lock); + } else if (isListOfFile(lock)) { + for (int i = 0; i < getListSize(lock); i++) { + map.put("lock[" + i + "]", getFromList(lock, i)); + } + } else { + map.put("lock", JSON.getDefault().getMapper().writeValueAsString(lock)); + } + } + } 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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index b83a7c823..57337de50 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -379,11 +379,7 @@ public SignatureRequestBulkCreateEmbeddedWithTemplateRequest putMetadataItem( } /** - * 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. + * _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA * * @return metadata */ diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index 96b3b03fd..ae7c14026 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -376,11 +376,7 @@ public SignatureRequestBulkSendWithTemplateRequest putMetadataItem( } /** - * 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. + * _t__SignatureRequestBulkSendWithTemplate::METADATA * * @return metadata */ diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java new file mode 100644 index 000000000..dfa4ea926 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java @@ -0,0 +1,215 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Updates a string team setting. Provide `value`, `lock_mode`, or both. */ +@JsonPropertyOrder({ + StringSettingUpdate.JSON_PROPERTY_VALUE, + StringSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class StringSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @javax.annotation.Nullable private String value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @javax.annotation.Nullable private TeamSettingLock lockMode; + + public StringSettingUpdate() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static StringSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, StringSettingUpdate.class); + } + + public static StringSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), StringSettingUpdate.class); + } + + public StringSettingUpdate value(@javax.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * String value to store. + * + * @return value + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; + } + + public StringSettingUpdate lockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * + * @return lockMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TeamSettingLock getLockMode() { + return lockMode; + } + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@javax.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + /** Return true if this StringSettingUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StringSettingUpdate stringSettingUpdate = (StringSettingUpdate) o; + return Objects.equals(this.value, stringSettingUpdate.value) + && Objects.equals(this.lockMode, stringSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) + || value.getClass().equals(Integer.class) + || value.getClass().equals(String.class) + || value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for (int i = 0; i < getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) + || lockMode.getClass().equals(Integer.class) + || lockMode.getClass().equals(String.class) + || lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for (int i = 0; i < getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } else { + map.put( + "lock_mode", + JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/SubBulkSignerList.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index d08a75d1e..1a8884e87 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -28,7 +28,8 @@ /** SubBulkSignerList */ @JsonPropertyOrder({ SubBulkSignerList.JSON_PROPERTY_CUSTOM_FIELDS, - SubBulkSignerList.JSON_PROPERTY_SIGNERS + SubBulkSignerList.JSON_PROPERTY_SIGNERS, + SubBulkSignerList.JSON_PROPERTY_METADATA }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -41,6 +42,9 @@ public class SubBulkSignerList { public static final String JSON_PROPERTY_SIGNERS = "signers"; @javax.annotation.Nullable private List signers = null; + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = null; + public SubBulkSignerList() {} /** @@ -123,6 +127,36 @@ public void setSigners( this.signers = signers; } + public SubBulkSignerList metadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SubBulkSignerList putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * _t__Sub::BulkSigner::METADATA + * + * @return metadata + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + /** Return true if this SubBulkSignerList object is equal to o. */ @Override public boolean equals(Object o) { @@ -134,12 +168,13 @@ public boolean equals(Object o) { } SubBulkSignerList subBulkSignerList = (SubBulkSignerList) o; return Objects.equals(this.customFields, subBulkSignerList.customFields) - && Objects.equals(this.signers, subBulkSignerList.signers); + && Objects.equals(this.signers, subBulkSignerList.signers) + && Objects.equals(this.metadata, subBulkSignerList.metadata); } @Override public int hashCode() { - return Objects.hash(customFields, signers); + return Objects.hash(customFields, signers, metadata); } @Override @@ -148,6 +183,7 @@ public String toString() { sb.append("class SubBulkSignerList {\n"); sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } @@ -194,6 +230,24 @@ public Map createFormData() throws ApiException { map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); } } + 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)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index 2766e1d20..9ba9016f3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -24,7 +24,10 @@ import java.util.Objects; /** TeamCreateRequest */ -@JsonPropertyOrder({TeamCreateRequest.JSON_PROPERTY_NAME}) +@JsonPropertyOrder({ + TeamCreateRequest.JSON_PROPERTY_NAME, + TeamCreateRequest.JSON_PROPERTY_PARENT_TEAM_ID +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @@ -33,6 +36,9 @@ public class TeamCreateRequest { public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name = "Untitled Team"; + public static final String JSON_PROPERTY_PARENT_TEAM_ID = "parent_team_id"; + @javax.annotation.Nullable private String parentTeamId; + public TeamCreateRequest() {} /** @@ -71,6 +77,28 @@ public void setName(@javax.annotation.Nullable String name) { this.name = name; } + public TeamCreateRequest parentTeamId(@javax.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + return this; + } + + /** + * _t__TeamCreate::PARENT_TEAM_ID + * + * @return parentTeamId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentTeamId() { + return parentTeamId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentTeamId(@javax.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + } + /** Return true if this TeamCreateRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -81,12 +109,13 @@ public boolean equals(Object o) { return false; } TeamCreateRequest teamCreateRequest = (TeamCreateRequest) o; - return Objects.equals(this.name, teamCreateRequest.name); + return Objects.equals(this.name, teamCreateRequest.name) + && Objects.equals(this.parentTeamId, teamCreateRequest.parentTeamId); } @Override public int hashCode() { - return Objects.hash(name); + return Objects.hash(name, parentTeamId); } @Override @@ -94,6 +123,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TeamCreateRequest {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTeamId: ").append(toIndentedString(parentTeamId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -120,6 +150,26 @@ public Map createFormData() throws ApiException { map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); } } + if (parentTeamId != null) { + if (isFileTypeOrListOfFiles(parentTeamId)) { + fileTypeFound = true; + } + + if (parentTeamId.getClass().equals(java.io.File.class) + || parentTeamId.getClass().equals(Integer.class) + || parentTeamId.getClass().equals(String.class) + || parentTeamId.getClass().isEnum()) { + map.put("parent_team_id", parentTeamId); + } else if (isListOfFile(parentTeamId)) { + for (int i = 0; i < getListSize(parentTeamId); i++) { + map.put("parent_team_id[" + i + "]", getFromList(parentTeamId, i)); + } + } else { + map.put( + "parent_team_id", + JSON.getDefault().getMapper().writeValueAsString(parentTeamId)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java index 6fcc0fd87..3bff5e733 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -27,6 +27,8 @@ /** Contains information about your team and its members */ @JsonPropertyOrder({ + TeamResponse.JSON_PROPERTY_TEAM_ID, + TeamResponse.JSON_PROPERTY_PARENT_TEAM_ID, TeamResponse.JSON_PROPERTY_NAME, TeamResponse.JSON_PROPERTY_ACCOUNTS, TeamResponse.JSON_PROPERTY_INVITED_ACCOUNTS, @@ -37,6 +39,12 @@ comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamResponse { + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @javax.annotation.Nullable private String teamId; + + public static final String JSON_PROPERTY_PARENT_TEAM_ID = "parent_team_id"; + @javax.annotation.Nullable private String parentTeamId; + public static final String JSON_PROPERTY_NAME = "name"; @javax.annotation.Nullable private String name; @@ -65,6 +73,50 @@ public static TeamResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamResponse.class); } + public TeamResponse teamId(@javax.annotation.Nullable String teamId) { + this.teamId = teamId; + return this; + } + + /** + * The id of a team + * + * @return teamId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeamId() { + return teamId; + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTeamId(@javax.annotation.Nullable String teamId) { + this.teamId = teamId; + } + + public TeamResponse parentTeamId(@javax.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + return this; + } + + /** + * _t__Team::PARENT_TEAM_ID + * + * @return parentTeamId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentTeamId() { + return parentTeamId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentTeamId(@javax.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + } + public TeamResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; @@ -191,7 +243,9 @@ public boolean equals(Object o) { return false; } TeamResponse teamResponse = (TeamResponse) o; - return Objects.equals(this.name, teamResponse.name) + return Objects.equals(this.teamId, teamResponse.teamId) + && Objects.equals(this.parentTeamId, teamResponse.parentTeamId) + && Objects.equals(this.name, teamResponse.name) && Objects.equals(this.accounts, teamResponse.accounts) && Objects.equals(this.invitedAccounts, teamResponse.invitedAccounts) && Objects.equals(this.invitedEmails, teamResponse.invitedEmails); @@ -199,13 +253,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, accounts, invitedAccounts, invitedEmails); + return Objects.hash(teamId, parentTeamId, name, accounts, invitedAccounts, invitedEmails); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TeamResponse {\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" parentTeamId: ").append(toIndentedString(parentTeamId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); sb.append(" invitedAccounts: ").append(toIndentedString(invitedAccounts)).append("\n"); @@ -218,6 +274,44 @@ public Map createFormData() throws ApiException { Map map = new HashMap<>(); boolean fileTypeFound = false; try { + if (teamId != null) { + if (isFileTypeOrListOfFiles(teamId)) { + fileTypeFound = true; + } + + if (teamId.getClass().equals(java.io.File.class) + || teamId.getClass().equals(Integer.class) + || teamId.getClass().equals(String.class) + || teamId.getClass().isEnum()) { + map.put("team_id", teamId); + } else if (isListOfFile(teamId)) { + for (int i = 0; i < getListSize(teamId); i++) { + map.put("team_id[" + i + "]", getFromList(teamId, i)); + } + } else { + map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); + } + } + if (parentTeamId != null) { + if (isFileTypeOrListOfFiles(parentTeamId)) { + fileTypeFound = true; + } + + if (parentTeamId.getClass().equals(java.io.File.class) + || parentTeamId.getClass().equals(Integer.class) + || parentTeamId.getClass().equals(String.class) + || parentTeamId.getClass().isEnum()) { + map.put("parent_team_id", parentTeamId); + } else if (isListOfFile(parentTeamId)) { + for (int i = 0; i < getListSize(parentTeamId); i++) { + map.put("parent_team_id[" + i + "]", getFromList(parentTeamId, i)); + } + } else { + map.put( + "parent_team_id", + JSON.getDefault().getMapper().writeValueAsString(parentTeamId)); + } + } if (name != null) { if (isFileTypeOrListOfFiles(name)) { fileTypeFound = true; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingLock.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingLock.java new file mode 100644 index 000000000..ea961ec61 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingLock.java @@ -0,0 +1,55 @@ +/* + * 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Who can change a team setting. `organization_admins` limits changes to organization + * admins, and subteams use that value. `team_admins` lets admins of a team and its + * subteams set their own value. `members` lets each member set their own value. + */ +public enum TeamSettingLock { + ORGANIZATION_ADMINS("organization_admins"), + + TEAM_ADMINS("team_admins"), + + MEMBERS("members"); + + private String value; + + TeamSettingLock(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TeamSettingLock fromValue(String value) { + for (TeamSettingLock b : TeamSettingLock.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java new file mode 100644 index 000000000..88f4889f5 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java @@ -0,0 +1,273 @@ +/* + * 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; + +/** TeamSettingsResponse */ +@JsonPropertyOrder({ + TeamSettingsResponse.JSON_PROPERTY_TEAM_ID, + TeamSettingsResponse.JSON_PROPERTY_SETTINGS, + TeamSettingsResponse.JSON_PROPERTY_WARNINGS +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class TeamSettingsResponse { + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @javax.annotation.Nonnull private String teamId; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @javax.annotation.Nonnull private TeamSettingsResponseSettings settings; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @javax.annotation.Nullable private List warnings = null; + + public TeamSettingsResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static TeamSettingsResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsResponse.class); + } + + public static TeamSettingsResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), TeamSettingsResponse.class); + } + + public TeamSettingsResponse teamId(@javax.annotation.Nonnull String teamId) { + this.teamId = teamId; + return this; + } + + /** + * Get teamId + * + * @return teamId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTeamId() { + return teamId; + } + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTeamId(@javax.annotation.Nonnull String teamId) { + this.teamId = teamId; + } + + public TeamSettingsResponse settings( + @javax.annotation.Nonnull TeamSettingsResponseSettings settings) { + this.settings = settings; + return this; + } + + /** + * Get settings + * + * @return settings + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TeamSettingsResponseSettings getSettings() { + return settings; + } + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettings(@javax.annotation.Nonnull TeamSettingsResponseSettings settings) { + this.settings = settings; + } + + public TeamSettingsResponse warnings( + @javax.annotation.Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public TeamSettingsResponse 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(@javax.annotation.Nullable List warnings) { + this.warnings = warnings; + } + + /** Return true if this TeamSettingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsResponse teamSettingsResponse = (TeamSettingsResponse) o; + return Objects.equals(this.teamId, teamSettingsResponse.teamId) + && Objects.equals(this.settings, teamSettingsResponse.settings) + && Objects.equals(this.warnings, teamSettingsResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(teamId, settings, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsResponse {\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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 (teamId != null) { + if (isFileTypeOrListOfFiles(teamId)) { + fileTypeFound = true; + } + + if (teamId.getClass().equals(java.io.File.class) + || teamId.getClass().equals(Integer.class) + || teamId.getClass().equals(String.class) + || teamId.getClass().isEnum()) { + map.put("team_id", teamId); + } else if (isListOfFile(teamId)) { + for (int i = 0; i < getListSize(teamId); i++) { + map.put("team_id[" + i + "]", getFromList(teamId, i)); + } + } else { + map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); + } + } + if (settings != null) { + if (isFileTypeOrListOfFiles(settings)) { + fileTypeFound = true; + } + + if (settings.getClass().equals(java.io.File.class) + || settings.getClass().equals(Integer.class) + || settings.getClass().equals(String.class) + || settings.getClass().isEnum()) { + map.put("settings", settings); + } else if (isListOfFile(settings)) { + for (int i = 0; i < getListSize(settings); i++) { + map.put("settings[" + i + "]", getFromList(settings, i)); + } + } else { + map.put("settings", JSON.getDefault().getMapper().writeValueAsString(settings)); + } + } + 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/TeamSettingsResponseSettings.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsResponseSettings.java new file mode 100644 index 000000000..09e55a387 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsResponseSettings.java @@ -0,0 +1,1571 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** TeamSettingsResponseSettings */ +@JsonPropertyOrder({ + TeamSettingsResponseSettings.JSON_PROPERTY_COMPANY, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_TAGLINE, + TeamSettingsResponseSettings.JSON_PROPERTY_DATE_FORMAT, + TeamSettingsResponseSettings.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_FROM, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + TeamSettingsResponseSettings.JSON_PROPERTY_DATA_RESIDENCY, + TeamSettingsResponseSettings.JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE, + TeamSettingsResponseSettings.JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV, + TeamSettingsResponseSettings.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION, + TeamSettingsResponseSettings.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY, + TeamSettingsResponseSettings.JSON_PROPERTY_SELF_SIGN_MESSAGE, + TeamSettingsResponseSettings.JSON_PROPERTY_SELF_SIGN_TITLE, + TeamSettingsResponseSettings.JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE, + TeamSettingsResponseSettings.JSON_PROPERTY_SIGNATURE_REQUEST_TITLE, + TeamSettingsResponseSettings.JSON_PROPERTY_MULTIFACTOR_AUTH_APP, + TeamSettingsResponseSettings.JSON_PROPERTY_MULTIFACTOR_AUTH_SMS +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class TeamSettingsResponseSettings { + public static final String JSON_PROPERTY_COMPANY = "company"; + @javax.annotation.Nonnull private SettingResponse company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = + "custom_signing_redirect_enabled"; + @javax.annotation.Nonnull private SettingResponse customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = + "custom_signing_redirect_url"; + @javax.annotation.Nonnull private SettingResponse customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @javax.annotation.Nonnull private SettingResponse customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @javax.annotation.Nonnull private SettingResponse dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = + "is_signature_reminders_enabled"; + @javax.annotation.Nonnull private SettingResponse isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @javax.annotation.Nonnull private SettingResponse requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @javax.annotation.Nonnull private SettingResponse requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @javax.annotation.Nonnull private SettingResponse requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = + "should_enable_tamper_proof"; + @javax.annotation.Nonnull private SettingResponse shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = + "should_include_distinct_pdfs"; + @javax.annotation.Nonnull private SettingResponse shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = + "should_offer_signer_access_code"; + @javax.annotation.Nonnull private SettingResponse shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = + "should_offer_signer_sms_authentication"; + @javax.annotation.Nonnull private SettingResponse shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = + "should_remove_document_id"; + @javax.annotation.Nonnull private SettingResponse shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_DATA_RESIDENCY = "data_residency"; + @javax.annotation.Nonnull private SettingResponse dataResidency; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE = + "allow_team_delete_document_for_everyone"; + @javax.annotation.Nonnull private SettingResponse allowTeamDeleteDocumentForEveryone; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV = "allow_team_download_csv"; + @javax.annotation.Nonnull private SettingResponse allowTeamDownloadCsv; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION = + "lock_team_template_creation"; + @javax.annotation.Nonnull private SettingResponse lockTeamTemplateCreation; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY = + "lock_team_template_gallery"; + @javax.annotation.Nonnull private SettingResponse lockTeamTemplateGallery; + + public static final String JSON_PROPERTY_SELF_SIGN_MESSAGE = "self_sign_message"; + @javax.annotation.Nonnull private SettingResponse selfSignMessage; + + public static final String JSON_PROPERTY_SELF_SIGN_TITLE = "self_sign_title"; + @javax.annotation.Nonnull private SettingResponse selfSignTitle; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE = + "signature_request_message"; + @javax.annotation.Nonnull private SettingResponse signatureRequestMessage; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_TITLE = "signature_request_title"; + @javax.annotation.Nonnull private SettingResponse signatureRequestTitle; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_APP = "multifactor_auth_app"; + @javax.annotation.Nonnull private SettingResponse multifactorAuthApp; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_SMS = "multifactor_auth_sms"; + @javax.annotation.Nonnull private SettingResponse multifactorAuthSms; + + public TeamSettingsResponseSettings() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static TeamSettingsResponseSettings init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsResponseSettings.class); + } + + public static TeamSettingsResponseSettings init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + TeamSettingsResponseSettings.class); + } + + public TeamSettingsResponseSettings company(@javax.annotation.Nonnull SettingResponse company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * + * @return company + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCompany() { + return company; + } + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompany(@javax.annotation.Nonnull SettingResponse company) { + this.company = company; + } + + public TeamSettingsResponseSettings customSigningRedirectEnabled( + @javax.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * + * @return customSigningRedirectEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectEnabled( + @javax.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + public TeamSettingsResponseSettings customSigningRedirectUrl( + @javax.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects + * are enabled. + * + * @return customSigningRedirectUrl + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectUrl( + @javax.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + public TeamSettingsResponseSettings customTagline( + @javax.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * + * @return customTagline + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getCustomTagline() { + return customTagline; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomTagline(@javax.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + } + + public TeamSettingsResponseSettings dateFormat( + @javax.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the + * default. + * + * @return dateFormat + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getDateFormat() { + return dateFormat; + } + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateFormat(@javax.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + } + + public TeamSettingsResponseSettings isSignatureRemindersEnabled( + @javax.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * + * @return isSignatureRemindersEnabled + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSignatureRemindersEnabled( + @javax.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + public TeamSettingsResponseSettings requestEmailFrom( + @javax.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * + * @return requestEmailFrom + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequestEmailFrom() { + return requestEmailFrom; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailFrom(@javax.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + public TeamSettingsResponseSettings requestEmailSignature( + @javax.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * + * @return requestEmailSignature + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequestEmailSignature() { + return requestEmailSignature; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailSignature( + @javax.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + public TeamSettingsResponseSettings requiredSignatureTypes( + @javax.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * + * @return requiredSignatureTypes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredSignatureTypes( + @javax.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + public TeamSettingsResponseSettings shouldEnableTamperProof( + @javax.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * + * @return shouldEnableTamperProof + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldEnableTamperProof( + @javax.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + public TeamSettingsResponseSettings shouldIncludeDistinctPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one + * PDF. + * + * @return shouldIncludeDistinctPdfs + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeDistinctPdfs( + @javax.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + public TeamSettingsResponseSettings shouldOfferSignerAccessCode( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * + * @return shouldOfferSignerAccessCode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerAccessCode( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + public TeamSettingsResponseSettings shouldOfferSignerSmsAuthentication( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * + * @return shouldOfferSignerSmsAuthentication + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerSmsAuthentication( + @javax.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + public TeamSettingsResponseSettings shouldRemoveDocumentId( + @javax.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * + * @return shouldRemoveDocumentId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldRemoveDocumentId( + @javax.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + public TeamSettingsResponseSettings dataResidency( + @javax.annotation.Nonnull SettingResponse dataResidency) { + this.dataResidency = dataResidency; + return this; + } + + /** + * Storage region for team documents. + * + * @return dataResidency + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getDataResidency() { + return dataResidency; + } + + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataResidency(@javax.annotation.Nonnull SettingResponse dataResidency) { + this.dataResidency = dataResidency; + } + + public TeamSettingsResponseSettings allowTeamDeleteDocumentForEveryone( + @javax.annotation.Nonnull SettingResponse allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + return this; + } + + /** + * Whether team members can delete a document for all participants. + * + * @return allowTeamDeleteDocumentForEveryone + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getAllowTeamDeleteDocumentForEveryone() { + return allowTeamDeleteDocumentForEveryone; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllowTeamDeleteDocumentForEveryone( + @javax.annotation.Nonnull SettingResponse allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + } + + public TeamSettingsResponseSettings allowTeamDownloadCsv( + @javax.annotation.Nonnull SettingResponse allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + return this; + } + + /** + * Whether team members can download CSV files. + * + * @return allowTeamDownloadCsv + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getAllowTeamDownloadCsv() { + return allowTeamDownloadCsv; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllowTeamDownloadCsv( + @javax.annotation.Nonnull SettingResponse allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + } + + public TeamSettingsResponseSettings lockTeamTemplateCreation( + @javax.annotation.Nonnull SettingResponse lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + return this; + } + + /** + * Whether team members are prevented from creating templates. + * + * @return lockTeamTemplateCreation + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getLockTeamTemplateCreation() { + return lockTeamTemplateCreation; + } + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLockTeamTemplateCreation( + @javax.annotation.Nonnull SettingResponse lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + } + + public TeamSettingsResponseSettings lockTeamTemplateGallery( + @javax.annotation.Nonnull SettingResponse lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + return this; + } + + /** + * Whether team members are prevented from using the template gallery. + * + * @return lockTeamTemplateGallery + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getLockTeamTemplateGallery() { + return lockTeamTemplateGallery; + } + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLockTeamTemplateGallery( + @javax.annotation.Nonnull SettingResponse lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + } + + public TeamSettingsResponseSettings selfSignMessage( + @javax.annotation.Nonnull SettingResponse selfSignMessage) { + this.selfSignMessage = selfSignMessage; + return this; + } + + /** + * Default message enforced for team members when they create self-signed documents. + * + * @return selfSignMessage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getSelfSignMessage() { + return selfSignMessage; + } + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSelfSignMessage(@javax.annotation.Nonnull SettingResponse selfSignMessage) { + this.selfSignMessage = selfSignMessage; + } + + public TeamSettingsResponseSettings selfSignTitle( + @javax.annotation.Nonnull SettingResponse selfSignTitle) { + this.selfSignTitle = selfSignTitle; + return this; + } + + /** + * Default title enforced for team members when they create self-signed documents. + * + * @return selfSignTitle + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getSelfSignTitle() { + return selfSignTitle; + } + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSelfSignTitle(@javax.annotation.Nonnull SettingResponse selfSignTitle) { + this.selfSignTitle = selfSignTitle; + } + + public TeamSettingsResponseSettings signatureRequestMessage( + @javax.annotation.Nonnull SettingResponse signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + return this; + } + + /** + * Default message enforced for team members when they create signature requests. + * + * @return signatureRequestMessage + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getSignatureRequestMessage() { + return signatureRequestMessage; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignatureRequestMessage( + @javax.annotation.Nonnull SettingResponse signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + } + + public TeamSettingsResponseSettings signatureRequestTitle( + @javax.annotation.Nonnull SettingResponse signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + return this; + } + + /** + * Default title enforced for team members when they create signature requests. + * + * @return signatureRequestTitle + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getSignatureRequestTitle() { + return signatureRequestTitle; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignatureRequestTitle( + @javax.annotation.Nonnull SettingResponse signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + } + + public TeamSettingsResponseSettings multifactorAuthApp( + @javax.annotation.Nonnull SettingResponse multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + return this; + } + + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + * + * @return multifactorAuthApp + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getMultifactorAuthApp() { + return multifactorAuthApp; + } + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMultifactorAuthApp( + @javax.annotation.Nonnull SettingResponse multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + } + + public TeamSettingsResponseSettings multifactorAuthSms( + @javax.annotation.Nonnull SettingResponse multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + return this; + } + + /** + * Whether SMS multifactor authentication is enabled for the team. + * + * @return multifactorAuthSms + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettingResponse getMultifactorAuthSms() { + return multifactorAuthSms; + } + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMultifactorAuthSms( + @javax.annotation.Nonnull SettingResponse multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + } + + /** Return true if this TeamSettingsResponseSettings object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsResponseSettings teamSettingsResponseSettings = + (TeamSettingsResponseSettings) o; + return Objects.equals(this.company, teamSettingsResponseSettings.company) + && Objects.equals( + this.customSigningRedirectEnabled, + teamSettingsResponseSettings.customSigningRedirectEnabled) + && Objects.equals( + this.customSigningRedirectUrl, + teamSettingsResponseSettings.customSigningRedirectUrl) + && Objects.equals(this.customTagline, teamSettingsResponseSettings.customTagline) + && Objects.equals(this.dateFormat, teamSettingsResponseSettings.dateFormat) + && Objects.equals( + this.isSignatureRemindersEnabled, + teamSettingsResponseSettings.isSignatureRemindersEnabled) + && Objects.equals( + this.requestEmailFrom, teamSettingsResponseSettings.requestEmailFrom) + && Objects.equals( + this.requestEmailSignature, + teamSettingsResponseSettings.requestEmailSignature) + && Objects.equals( + this.requiredSignatureTypes, + teamSettingsResponseSettings.requiredSignatureTypes) + && Objects.equals( + this.shouldEnableTamperProof, + teamSettingsResponseSettings.shouldEnableTamperProof) + && Objects.equals( + this.shouldIncludeDistinctPdfs, + teamSettingsResponseSettings.shouldIncludeDistinctPdfs) + && Objects.equals( + this.shouldOfferSignerAccessCode, + teamSettingsResponseSettings.shouldOfferSignerAccessCode) + && Objects.equals( + this.shouldOfferSignerSmsAuthentication, + teamSettingsResponseSettings.shouldOfferSignerSmsAuthentication) + && Objects.equals( + this.shouldRemoveDocumentId, + teamSettingsResponseSettings.shouldRemoveDocumentId) + && Objects.equals(this.dataResidency, teamSettingsResponseSettings.dataResidency) + && Objects.equals( + this.allowTeamDeleteDocumentForEveryone, + teamSettingsResponseSettings.allowTeamDeleteDocumentForEveryone) + && Objects.equals( + this.allowTeamDownloadCsv, + teamSettingsResponseSettings.allowTeamDownloadCsv) + && Objects.equals( + this.lockTeamTemplateCreation, + teamSettingsResponseSettings.lockTeamTemplateCreation) + && Objects.equals( + this.lockTeamTemplateGallery, + teamSettingsResponseSettings.lockTeamTemplateGallery) + && Objects.equals( + this.selfSignMessage, teamSettingsResponseSettings.selfSignMessage) + && Objects.equals(this.selfSignTitle, teamSettingsResponseSettings.selfSignTitle) + && Objects.equals( + this.signatureRequestMessage, + teamSettingsResponseSettings.signatureRequestMessage) + && Objects.equals( + this.signatureRequestTitle, + teamSettingsResponseSettings.signatureRequestTitle) + && Objects.equals( + this.multifactorAuthApp, teamSettingsResponseSettings.multifactorAuthApp) + && Objects.equals( + this.multifactorAuthSms, teamSettingsResponseSettings.multifactorAuthSms); + } + + @Override + public int hashCode() { + return Objects.hash( + company, + customSigningRedirectEnabled, + customSigningRedirectUrl, + customTagline, + dateFormat, + isSignatureRemindersEnabled, + requestEmailFrom, + requestEmailSignature, + requiredSignatureTypes, + shouldEnableTamperProof, + shouldIncludeDistinctPdfs, + shouldOfferSignerAccessCode, + shouldOfferSignerSmsAuthentication, + shouldRemoveDocumentId, + dataResidency, + allowTeamDeleteDocumentForEveryone, + allowTeamDownloadCsv, + lockTeamTemplateCreation, + lockTeamTemplateGallery, + selfSignMessage, + selfSignTitle, + signatureRequestMessage, + signatureRequestTitle, + multifactorAuthApp, + multifactorAuthSms); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsResponseSettings {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ") + .append(toIndentedString(customSigningRedirectEnabled)) + .append("\n"); + sb.append(" customSigningRedirectUrl: ") + .append(toIndentedString(customSigningRedirectUrl)) + .append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ") + .append(toIndentedString(isSignatureRemindersEnabled)) + .append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ") + .append(toIndentedString(requestEmailSignature)) + .append("\n"); + sb.append(" requiredSignatureTypes: ") + .append(toIndentedString(requiredSignatureTypes)) + .append("\n"); + sb.append(" shouldEnableTamperProof: ") + .append(toIndentedString(shouldEnableTamperProof)) + .append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ") + .append(toIndentedString(shouldIncludeDistinctPdfs)) + .append("\n"); + sb.append(" shouldOfferSignerAccessCode: ") + .append(toIndentedString(shouldOfferSignerAccessCode)) + .append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ") + .append(toIndentedString(shouldOfferSignerSmsAuthentication)) + .append("\n"); + sb.append(" shouldRemoveDocumentId: ") + .append(toIndentedString(shouldRemoveDocumentId)) + .append("\n"); + sb.append(" dataResidency: ").append(toIndentedString(dataResidency)).append("\n"); + sb.append(" allowTeamDeleteDocumentForEveryone: ") + .append(toIndentedString(allowTeamDeleteDocumentForEveryone)) + .append("\n"); + sb.append(" allowTeamDownloadCsv: ") + .append(toIndentedString(allowTeamDownloadCsv)) + .append("\n"); + sb.append(" lockTeamTemplateCreation: ") + .append(toIndentedString(lockTeamTemplateCreation)) + .append("\n"); + sb.append(" lockTeamTemplateGallery: ") + .append(toIndentedString(lockTeamTemplateGallery)) + .append("\n"); + sb.append(" selfSignMessage: ").append(toIndentedString(selfSignMessage)).append("\n"); + sb.append(" selfSignTitle: ").append(toIndentedString(selfSignTitle)).append("\n"); + sb.append(" signatureRequestMessage: ") + .append(toIndentedString(signatureRequestMessage)) + .append("\n"); + sb.append(" signatureRequestTitle: ") + .append(toIndentedString(signatureRequestTitle)) + .append("\n"); + sb.append(" multifactorAuthApp: ") + .append(toIndentedString(multifactorAuthApp)) + .append("\n"); + sb.append(" multifactorAuthSms: ") + .append(toIndentedString(multifactorAuthSms)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) + || company.getClass().equals(Integer.class) + || company.getClass().equals(String.class) + || company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for (int i = 0; i < getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) + || customSigningRedirectEnabled.getClass().equals(Integer.class) + || customSigningRedirectEnabled.getClass().equals(String.class) + || customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for (int i = 0; i < getListSize(customSigningRedirectEnabled); i++) { + map.put( + "custom_signing_redirect_enabled[" + i + "]", + getFromList(customSigningRedirectEnabled, i)); + } + } else { + map.put( + "custom_signing_redirect_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) + || customSigningRedirectUrl.getClass().equals(Integer.class) + || customSigningRedirectUrl.getClass().equals(String.class) + || customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for (int i = 0; i < getListSize(customSigningRedirectUrl); i++) { + map.put( + "custom_signing_redirect_url[" + i + "]", + getFromList(customSigningRedirectUrl, i)); + } + } else { + map.put( + "custom_signing_redirect_url", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) + || customTagline.getClass().equals(Integer.class) + || customTagline.getClass().equals(String.class) + || customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for (int i = 0; i < getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } else { + map.put( + "custom_tagline", + JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) + || dateFormat.getClass().equals(Integer.class) + || dateFormat.getClass().equals(String.class) + || dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for (int i = 0; i < getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } else { + map.put( + "date_format", + JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) + || isSignatureRemindersEnabled.getClass().equals(Integer.class) + || isSignatureRemindersEnabled.getClass().equals(String.class) + || isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for (int i = 0; i < getListSize(isSignatureRemindersEnabled); i++) { + map.put( + "is_signature_reminders_enabled[" + i + "]", + getFromList(isSignatureRemindersEnabled, i)); + } + } else { + map.put( + "is_signature_reminders_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) + || requestEmailFrom.getClass().equals(Integer.class) + || requestEmailFrom.getClass().equals(String.class) + || requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for (int i = 0; i < getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } else { + map.put( + "request_email_from", + JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) + || requestEmailSignature.getClass().equals(Integer.class) + || requestEmailSignature.getClass().equals(String.class) + || requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for (int i = 0; i < getListSize(requestEmailSignature); i++) { + map.put( + "request_email_signature[" + i + "]", + getFromList(requestEmailSignature, i)); + } + } else { + map.put( + "request_email_signature", + JSON.getDefault() + .getMapper() + .writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) + || requiredSignatureTypes.getClass().equals(Integer.class) + || requiredSignatureTypes.getClass().equals(String.class) + || requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for (int i = 0; i < getListSize(requiredSignatureTypes); i++) { + map.put( + "required_signature_types[" + i + "]", + getFromList(requiredSignatureTypes, i)); + } + } else { + map.put( + "required_signature_types", + JSON.getDefault() + .getMapper() + .writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) + || shouldEnableTamperProof.getClass().equals(Integer.class) + || shouldEnableTamperProof.getClass().equals(String.class) + || shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for (int i = 0; i < getListSize(shouldEnableTamperProof); i++) { + map.put( + "should_enable_tamper_proof[" + i + "]", + getFromList(shouldEnableTamperProof, i)); + } + } else { + map.put( + "should_enable_tamper_proof", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) + || shouldIncludeDistinctPdfs.getClass().equals(Integer.class) + || shouldIncludeDistinctPdfs.getClass().equals(String.class) + || shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeDistinctPdfs); i++) { + map.put( + "should_include_distinct_pdfs[" + i + "]", + getFromList(shouldIncludeDistinctPdfs, i)); + } + } else { + map.put( + "should_include_distinct_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) + || shouldOfferSignerAccessCode.getClass().equals(Integer.class) + || shouldOfferSignerAccessCode.getClass().equals(String.class) + || shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for (int i = 0; i < getListSize(shouldOfferSignerAccessCode); i++) { + map.put( + "should_offer_signer_access_code[" + i + "]", + getFromList(shouldOfferSignerAccessCode, i)); + } + } else { + map.put( + "should_offer_signer_access_code", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(String.class) + || shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put( + "should_offer_signer_sms_authentication", + shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for (int i = 0; i < getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put( + "should_offer_signer_sms_authentication[" + i + "]", + getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } else { + map.put( + "should_offer_signer_sms_authentication", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) + || shouldRemoveDocumentId.getClass().equals(Integer.class) + || shouldRemoveDocumentId.getClass().equals(String.class) + || shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for (int i = 0; i < getListSize(shouldRemoveDocumentId); i++) { + map.put( + "should_remove_document_id[" + i + "]", + getFromList(shouldRemoveDocumentId, i)); + } + } else { + map.put( + "should_remove_document_id", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldRemoveDocumentId)); + } + } + if (dataResidency != null) { + if (isFileTypeOrListOfFiles(dataResidency)) { + fileTypeFound = true; + } + + if (dataResidency.getClass().equals(java.io.File.class) + || dataResidency.getClass().equals(Integer.class) + || dataResidency.getClass().equals(String.class) + || dataResidency.getClass().isEnum()) { + map.put("data_residency", dataResidency); + } else if (isListOfFile(dataResidency)) { + for (int i = 0; i < getListSize(dataResidency); i++) { + map.put("data_residency[" + i + "]", getFromList(dataResidency, i)); + } + } else { + map.put( + "data_residency", + JSON.getDefault().getMapper().writeValueAsString(dataResidency)); + } + } + if (allowTeamDeleteDocumentForEveryone != null) { + if (isFileTypeOrListOfFiles(allowTeamDeleteDocumentForEveryone)) { + fileTypeFound = true; + } + + if (allowTeamDeleteDocumentForEveryone.getClass().equals(java.io.File.class) + || allowTeamDeleteDocumentForEveryone.getClass().equals(Integer.class) + || allowTeamDeleteDocumentForEveryone.getClass().equals(String.class) + || allowTeamDeleteDocumentForEveryone.getClass().isEnum()) { + map.put( + "allow_team_delete_document_for_everyone", + allowTeamDeleteDocumentForEveryone); + } else if (isListOfFile(allowTeamDeleteDocumentForEveryone)) { + for (int i = 0; i < getListSize(allowTeamDeleteDocumentForEveryone); i++) { + map.put( + "allow_team_delete_document_for_everyone[" + i + "]", + getFromList(allowTeamDeleteDocumentForEveryone, i)); + } + } else { + map.put( + "allow_team_delete_document_for_everyone", + JSON.getDefault() + .getMapper() + .writeValueAsString(allowTeamDeleteDocumentForEveryone)); + } + } + if (allowTeamDownloadCsv != null) { + if (isFileTypeOrListOfFiles(allowTeamDownloadCsv)) { + fileTypeFound = true; + } + + if (allowTeamDownloadCsv.getClass().equals(java.io.File.class) + || allowTeamDownloadCsv.getClass().equals(Integer.class) + || allowTeamDownloadCsv.getClass().equals(String.class) + || allowTeamDownloadCsv.getClass().isEnum()) { + map.put("allow_team_download_csv", allowTeamDownloadCsv); + } else if (isListOfFile(allowTeamDownloadCsv)) { + for (int i = 0; i < getListSize(allowTeamDownloadCsv); i++) { + map.put( + "allow_team_download_csv[" + i + "]", + getFromList(allowTeamDownloadCsv, i)); + } + } else { + map.put( + "allow_team_download_csv", + JSON.getDefault().getMapper().writeValueAsString(allowTeamDownloadCsv)); + } + } + if (lockTeamTemplateCreation != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateCreation)) { + fileTypeFound = true; + } + + if (lockTeamTemplateCreation.getClass().equals(java.io.File.class) + || lockTeamTemplateCreation.getClass().equals(Integer.class) + || lockTeamTemplateCreation.getClass().equals(String.class) + || lockTeamTemplateCreation.getClass().isEnum()) { + map.put("lock_team_template_creation", lockTeamTemplateCreation); + } else if (isListOfFile(lockTeamTemplateCreation)) { + for (int i = 0; i < getListSize(lockTeamTemplateCreation); i++) { + map.put( + "lock_team_template_creation[" + i + "]", + getFromList(lockTeamTemplateCreation, i)); + } + } else { + map.put( + "lock_team_template_creation", + JSON.getDefault() + .getMapper() + .writeValueAsString(lockTeamTemplateCreation)); + } + } + if (lockTeamTemplateGallery != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateGallery)) { + fileTypeFound = true; + } + + if (lockTeamTemplateGallery.getClass().equals(java.io.File.class) + || lockTeamTemplateGallery.getClass().equals(Integer.class) + || lockTeamTemplateGallery.getClass().equals(String.class) + || lockTeamTemplateGallery.getClass().isEnum()) { + map.put("lock_team_template_gallery", lockTeamTemplateGallery); + } else if (isListOfFile(lockTeamTemplateGallery)) { + for (int i = 0; i < getListSize(lockTeamTemplateGallery); i++) { + map.put( + "lock_team_template_gallery[" + i + "]", + getFromList(lockTeamTemplateGallery, i)); + } + } else { + map.put( + "lock_team_template_gallery", + JSON.getDefault() + .getMapper() + .writeValueAsString(lockTeamTemplateGallery)); + } + } + if (selfSignMessage != null) { + if (isFileTypeOrListOfFiles(selfSignMessage)) { + fileTypeFound = true; + } + + if (selfSignMessage.getClass().equals(java.io.File.class) + || selfSignMessage.getClass().equals(Integer.class) + || selfSignMessage.getClass().equals(String.class) + || selfSignMessage.getClass().isEnum()) { + map.put("self_sign_message", selfSignMessage); + } else if (isListOfFile(selfSignMessage)) { + for (int i = 0; i < getListSize(selfSignMessage); i++) { + map.put("self_sign_message[" + i + "]", getFromList(selfSignMessage, i)); + } + } else { + map.put( + "self_sign_message", + JSON.getDefault().getMapper().writeValueAsString(selfSignMessage)); + } + } + if (selfSignTitle != null) { + if (isFileTypeOrListOfFiles(selfSignTitle)) { + fileTypeFound = true; + } + + if (selfSignTitle.getClass().equals(java.io.File.class) + || selfSignTitle.getClass().equals(Integer.class) + || selfSignTitle.getClass().equals(String.class) + || selfSignTitle.getClass().isEnum()) { + map.put("self_sign_title", selfSignTitle); + } else if (isListOfFile(selfSignTitle)) { + for (int i = 0; i < getListSize(selfSignTitle); i++) { + map.put("self_sign_title[" + i + "]", getFromList(selfSignTitle, i)); + } + } else { + map.put( + "self_sign_title", + JSON.getDefault().getMapper().writeValueAsString(selfSignTitle)); + } + } + if (signatureRequestMessage != null) { + if (isFileTypeOrListOfFiles(signatureRequestMessage)) { + fileTypeFound = true; + } + + if (signatureRequestMessage.getClass().equals(java.io.File.class) + || signatureRequestMessage.getClass().equals(Integer.class) + || signatureRequestMessage.getClass().equals(String.class) + || signatureRequestMessage.getClass().isEnum()) { + map.put("signature_request_message", signatureRequestMessage); + } else if (isListOfFile(signatureRequestMessage)) { + for (int i = 0; i < getListSize(signatureRequestMessage); i++) { + map.put( + "signature_request_message[" + i + "]", + getFromList(signatureRequestMessage, i)); + } + } else { + map.put( + "signature_request_message", + JSON.getDefault() + .getMapper() + .writeValueAsString(signatureRequestMessage)); + } + } + if (signatureRequestTitle != null) { + if (isFileTypeOrListOfFiles(signatureRequestTitle)) { + fileTypeFound = true; + } + + if (signatureRequestTitle.getClass().equals(java.io.File.class) + || signatureRequestTitle.getClass().equals(Integer.class) + || signatureRequestTitle.getClass().equals(String.class) + || signatureRequestTitle.getClass().isEnum()) { + map.put("signature_request_title", signatureRequestTitle); + } else if (isListOfFile(signatureRequestTitle)) { + for (int i = 0; i < getListSize(signatureRequestTitle); i++) { + map.put( + "signature_request_title[" + i + "]", + getFromList(signatureRequestTitle, i)); + } + } else { + map.put( + "signature_request_title", + JSON.getDefault() + .getMapper() + .writeValueAsString(signatureRequestTitle)); + } + } + if (multifactorAuthApp != null) { + if (isFileTypeOrListOfFiles(multifactorAuthApp)) { + fileTypeFound = true; + } + + if (multifactorAuthApp.getClass().equals(java.io.File.class) + || multifactorAuthApp.getClass().equals(Integer.class) + || multifactorAuthApp.getClass().equals(String.class) + || multifactorAuthApp.getClass().isEnum()) { + map.put("multifactor_auth_app", multifactorAuthApp); + } else if (isListOfFile(multifactorAuthApp)) { + for (int i = 0; i < getListSize(multifactorAuthApp); i++) { + map.put( + "multifactor_auth_app[" + i + "]", + getFromList(multifactorAuthApp, i)); + } + } else { + map.put( + "multifactor_auth_app", + JSON.getDefault().getMapper().writeValueAsString(multifactorAuthApp)); + } + } + if (multifactorAuthSms != null) { + if (isFileTypeOrListOfFiles(multifactorAuthSms)) { + fileTypeFound = true; + } + + if (multifactorAuthSms.getClass().equals(java.io.File.class) + || multifactorAuthSms.getClass().equals(Integer.class) + || multifactorAuthSms.getClass().equals(String.class) + || multifactorAuthSms.getClass().isEnum()) { + map.put("multifactor_auth_sms", multifactorAuthSms); + } else if (isListOfFile(multifactorAuthSms)) { + for (int i = 0; i < getListSize(multifactorAuthSms); i++) { + map.put( + "multifactor_auth_sms[" + i + "]", + getFromList(multifactorAuthSms, i)); + } + } else { + map.put( + "multifactor_auth_sms", + JSON.getDefault().getMapper().writeValueAsString(multifactorAuthSms)); + } + } + } 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/TeamSettingsUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsUpdateRequest.java new file mode 100644 index 000000000..ec957b3ec --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSettingsUpdateRequest.java @@ -0,0 +1,1686 @@ +/* + * 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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** TeamSettingsUpdateRequest */ +@JsonPropertyOrder({ + TeamSettingsUpdateRequest.JSON_PROPERTY_COMPANY, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_TAGLINE, + TeamSettingsUpdateRequest.JSON_PROPERTY_DATE_FORMAT, + TeamSettingsUpdateRequest.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_FROM, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + TeamSettingsUpdateRequest.JSON_PROPERTY_DATA_RESIDENCY, + TeamSettingsUpdateRequest.JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE, + TeamSettingsUpdateRequest.JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV, + TeamSettingsUpdateRequest.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION, + TeamSettingsUpdateRequest.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY, + TeamSettingsUpdateRequest.JSON_PROPERTY_SELF_SIGN_MESSAGE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SELF_SIGN_TITLE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SIGNATURE_REQUEST_TITLE, + TeamSettingsUpdateRequest.JSON_PROPERTY_MULTIFACTOR_AUTH_APP, + TeamSettingsUpdateRequest.JSON_PROPERTY_MULTIFACTOR_AUTH_SMS, + TeamSettingsUpdateRequest.JSON_PROPERTY_UNSET +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class TeamSettingsUpdateRequest { + public static final String JSON_PROPERTY_COMPANY = "company"; + @javax.annotation.Nullable private StringSettingUpdate company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = + "custom_signing_redirect_enabled"; + @javax.annotation.Nullable private BooleanSettingUpdate customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = + "custom_signing_redirect_url"; + @javax.annotation.Nullable private StringSettingUpdate customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @javax.annotation.Nullable private StringSettingUpdate customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @javax.annotation.Nullable private DateFormatSettingUpdate dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = + "is_signature_reminders_enabled"; + @javax.annotation.Nullable private BooleanSettingUpdate isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @javax.annotation.Nullable private StringSettingUpdate requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @javax.annotation.Nullable private StringSettingUpdate requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @javax.annotation.Nullable private RequiredSignatureTypesSettingUpdate requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = + "should_enable_tamper_proof"; + @javax.annotation.Nullable private BooleanSettingUpdate shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = + "should_include_distinct_pdfs"; + @javax.annotation.Nullable private BooleanSettingUpdate shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = + "should_offer_signer_access_code"; + @javax.annotation.Nullable private BooleanSettingUpdate shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = + "should_offer_signer_sms_authentication"; + @javax.annotation.Nullable private BooleanSettingUpdate shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = + "should_remove_document_id"; + @javax.annotation.Nullable private BooleanSettingUpdate shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_DATA_RESIDENCY = "data_residency"; + @javax.annotation.Nullable private DataResidencySettingUpdate dataResidency; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE = + "allow_team_delete_document_for_everyone"; + @javax.annotation.Nullable private BooleanSettingUpdate allowTeamDeleteDocumentForEveryone; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV = "allow_team_download_csv"; + @javax.annotation.Nullable private BooleanSettingUpdate allowTeamDownloadCsv; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION = + "lock_team_template_creation"; + @javax.annotation.Nullable private BooleanSettingUpdate lockTeamTemplateCreation; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY = + "lock_team_template_gallery"; + @javax.annotation.Nullable private BooleanSettingUpdate lockTeamTemplateGallery; + + public static final String JSON_PROPERTY_SELF_SIGN_MESSAGE = "self_sign_message"; + @javax.annotation.Nullable private StringSettingUpdate selfSignMessage; + + public static final String JSON_PROPERTY_SELF_SIGN_TITLE = "self_sign_title"; + @javax.annotation.Nullable private StringSettingUpdate selfSignTitle; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE = + "signature_request_message"; + @javax.annotation.Nullable private StringSettingUpdate signatureRequestMessage; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_TITLE = "signature_request_title"; + @javax.annotation.Nullable private StringSettingUpdate signatureRequestTitle; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_APP = "multifactor_auth_app"; + @javax.annotation.Nullable private BooleanSettingUpdate multifactorAuthApp; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_SMS = "multifactor_auth_sms"; + @javax.annotation.Nullable private BooleanSettingUpdate multifactorAuthSms; + + /** Gets or Sets unset */ + public enum UnsetEnum { + COMPANY(String.valueOf("company")), + + CUSTOM_SIGNING_REDIRECT_ENABLED(String.valueOf("custom_signing_redirect_enabled")), + + CUSTOM_SIGNING_REDIRECT_URL(String.valueOf("custom_signing_redirect_url")), + + CUSTOM_TAGLINE(String.valueOf("custom_tagline")), + + DATE_FORMAT(String.valueOf("date_format")), + + IS_SIGNATURE_REMINDERS_ENABLED(String.valueOf("is_signature_reminders_enabled")), + + REQUEST_EMAIL_FROM(String.valueOf("request_email_from")), + + REQUEST_EMAIL_SIGNATURE(String.valueOf("request_email_signature")), + + REQUIRED_SIGNATURE_TYPES(String.valueOf("required_signature_types")), + + SHOULD_ENABLE_TAMPER_PROOF(String.valueOf("should_enable_tamper_proof")), + + SHOULD_INCLUDE_DISTINCT_PDFS(String.valueOf("should_include_distinct_pdfs")), + + SHOULD_OFFER_SIGNER_ACCESS_CODE(String.valueOf("should_offer_signer_access_code")), + + SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION( + String.valueOf("should_offer_signer_sms_authentication")), + + SHOULD_REMOVE_DOCUMENT_ID(String.valueOf("should_remove_document_id")), + + DATA_RESIDENCY(String.valueOf("data_residency")), + + ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE( + String.valueOf("allow_team_delete_document_for_everyone")), + + ALLOW_TEAM_DOWNLOAD_CSV(String.valueOf("allow_team_download_csv")), + + LOCK_TEAM_TEMPLATE_CREATION(String.valueOf("lock_team_template_creation")), + + LOCK_TEAM_TEMPLATE_GALLERY(String.valueOf("lock_team_template_gallery")), + + SELF_SIGN_MESSAGE(String.valueOf("self_sign_message")), + + SELF_SIGN_TITLE(String.valueOf("self_sign_title")), + + SIGNATURE_REQUEST_MESSAGE(String.valueOf("signature_request_message")), + + SIGNATURE_REQUEST_TITLE(String.valueOf("signature_request_title")), + + MULTIFACTOR_AUTH_APP(String.valueOf("multifactor_auth_app")), + + MULTIFACTOR_AUTH_SMS(String.valueOf("multifactor_auth_sms")); + + private String value; + + UnsetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UnsetEnum fromValue(String value) { + for (UnsetEnum b : UnsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_UNSET = "unset"; + @javax.annotation.Nullable private Set unset = null; + + public TeamSettingsUpdateRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static TeamSettingsUpdateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsUpdateRequest.class); + } + + public static TeamSettingsUpdateRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + TeamSettingsUpdateRequest.class); + } + + public TeamSettingsUpdateRequest company( + @javax.annotation.Nullable StringSettingUpdate company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * + * @return company + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getCompany() { + return company; + } + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompany(@javax.annotation.Nullable StringSettingUpdate company) { + this.company = company; + } + + public TeamSettingsUpdateRequest customSigningRedirectEnabled( + @javax.annotation.Nullable BooleanSettingUpdate customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * + * @return customSigningRedirectEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectEnabled( + @javax.annotation.Nullable BooleanSettingUpdate customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + public TeamSettingsUpdateRequest customSigningRedirectUrl( + @javax.annotation.Nullable StringSettingUpdate customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects + * are enabled. + * + * @return customSigningRedirectUrl + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectUrl( + @javax.annotation.Nullable StringSettingUpdate customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + public TeamSettingsUpdateRequest customTagline( + @javax.annotation.Nullable StringSettingUpdate customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * + * @return customTagline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getCustomTagline() { + return customTagline; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomTagline(@javax.annotation.Nullable StringSettingUpdate customTagline) { + this.customTagline = customTagline; + } + + public TeamSettingsUpdateRequest dateFormat( + @javax.annotation.Nullable DateFormatSettingUpdate dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the + * default. + * + * @return dateFormat + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DateFormatSettingUpdate getDateFormat() { + return dateFormat; + } + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateFormat(@javax.annotation.Nullable DateFormatSettingUpdate dateFormat) { + this.dateFormat = dateFormat; + } + + public TeamSettingsUpdateRequest isSignatureRemindersEnabled( + @javax.annotation.Nullable BooleanSettingUpdate isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * + * @return isSignatureRemindersEnabled + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsSignatureRemindersEnabled( + @javax.annotation.Nullable BooleanSettingUpdate isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + public TeamSettingsUpdateRequest requestEmailFrom( + @javax.annotation.Nullable StringSettingUpdate requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * + * @return requestEmailFrom + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getRequestEmailFrom() { + return requestEmailFrom; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailFrom( + @javax.annotation.Nullable StringSettingUpdate requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + public TeamSettingsUpdateRequest requestEmailSignature( + @javax.annotation.Nullable StringSettingUpdate requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * + * @return requestEmailSignature + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getRequestEmailSignature() { + return requestEmailSignature; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailSignature( + @javax.annotation.Nullable StringSettingUpdate requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + public TeamSettingsUpdateRequest requiredSignatureTypes( + @javax.annotation.Nullable RequiredSignatureTypesSettingUpdate requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * + * @return requiredSignatureTypes + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RequiredSignatureTypesSettingUpdate getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredSignatureTypes( + @javax.annotation.Nullable RequiredSignatureTypesSettingUpdate requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + public TeamSettingsUpdateRequest shouldEnableTamperProof( + @javax.annotation.Nullable BooleanSettingUpdate shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * + * @return shouldEnableTamperProof + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldEnableTamperProof( + @javax.annotation.Nullable BooleanSettingUpdate shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + public TeamSettingsUpdateRequest shouldIncludeDistinctPdfs( + @javax.annotation.Nullable BooleanSettingUpdate shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one + * PDF. + * + * @return shouldIncludeDistinctPdfs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeDistinctPdfs( + @javax.annotation.Nullable BooleanSettingUpdate shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + public TeamSettingsUpdateRequest shouldOfferSignerAccessCode( + @javax.annotation.Nullable BooleanSettingUpdate shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * + * @return shouldOfferSignerAccessCode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerAccessCode( + @javax.annotation.Nullable BooleanSettingUpdate shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + public TeamSettingsUpdateRequest shouldOfferSignerSmsAuthentication( + @javax.annotation.Nullable BooleanSettingUpdate shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * + * @return shouldOfferSignerSmsAuthentication + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerSmsAuthentication( + @javax.annotation.Nullable BooleanSettingUpdate shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + public TeamSettingsUpdateRequest shouldRemoveDocumentId( + @javax.annotation.Nullable BooleanSettingUpdate shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * + * @return shouldRemoveDocumentId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldRemoveDocumentId( + @javax.annotation.Nullable BooleanSettingUpdate shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + public TeamSettingsUpdateRequest dataResidency( + @javax.annotation.Nullable DataResidencySettingUpdate dataResidency) { + this.dataResidency = dataResidency; + return this; + } + + /** + * Storage region for team documents. + * + * @return dataResidency + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataResidencySettingUpdate getDataResidency() { + return dataResidency; + } + + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataResidency( + @javax.annotation.Nullable DataResidencySettingUpdate dataResidency) { + this.dataResidency = dataResidency; + } + + public TeamSettingsUpdateRequest allowTeamDeleteDocumentForEveryone( + @javax.annotation.Nullable BooleanSettingUpdate allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + return this; + } + + /** + * Whether team members can delete a document for all participants. + * + * @return allowTeamDeleteDocumentForEveryone + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getAllowTeamDeleteDocumentForEveryone() { + return allowTeamDeleteDocumentForEveryone; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowTeamDeleteDocumentForEveryone( + @javax.annotation.Nullable BooleanSettingUpdate allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + } + + public TeamSettingsUpdateRequest allowTeamDownloadCsv( + @javax.annotation.Nullable BooleanSettingUpdate allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + return this; + } + + /** + * Whether team members can download CSV files. + * + * @return allowTeamDownloadCsv + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getAllowTeamDownloadCsv() { + return allowTeamDownloadCsv; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowTeamDownloadCsv( + @javax.annotation.Nullable BooleanSettingUpdate allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + } + + public TeamSettingsUpdateRequest lockTeamTemplateCreation( + @javax.annotation.Nullable BooleanSettingUpdate lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + return this; + } + + /** + * Whether team members are prevented from creating templates. + * + * @return lockTeamTemplateCreation + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getLockTeamTemplateCreation() { + return lockTeamTemplateCreation; + } + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockTeamTemplateCreation( + @javax.annotation.Nullable BooleanSettingUpdate lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + } + + public TeamSettingsUpdateRequest lockTeamTemplateGallery( + @javax.annotation.Nullable BooleanSettingUpdate lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + return this; + } + + /** + * Whether team members are prevented from using the template gallery. + * + * @return lockTeamTemplateGallery + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getLockTeamTemplateGallery() { + return lockTeamTemplateGallery; + } + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockTeamTemplateGallery( + @javax.annotation.Nullable BooleanSettingUpdate lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + } + + public TeamSettingsUpdateRequest selfSignMessage( + @javax.annotation.Nullable StringSettingUpdate selfSignMessage) { + this.selfSignMessage = selfSignMessage; + return this; + } + + /** + * Default message enforced for team members when they create self-signed documents. + * + * @return selfSignMessage + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getSelfSignMessage() { + return selfSignMessage; + } + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelfSignMessage(@javax.annotation.Nullable StringSettingUpdate selfSignMessage) { + this.selfSignMessage = selfSignMessage; + } + + public TeamSettingsUpdateRequest selfSignTitle( + @javax.annotation.Nullable StringSettingUpdate selfSignTitle) { + this.selfSignTitle = selfSignTitle; + return this; + } + + /** + * Default title enforced for team members when they create self-signed documents. + * + * @return selfSignTitle + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getSelfSignTitle() { + return selfSignTitle; + } + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelfSignTitle(@javax.annotation.Nullable StringSettingUpdate selfSignTitle) { + this.selfSignTitle = selfSignTitle; + } + + public TeamSettingsUpdateRequest signatureRequestMessage( + @javax.annotation.Nullable StringSettingUpdate signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + return this; + } + + /** + * Default message enforced for team members when they create signature requests. + * + * @return signatureRequestMessage + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getSignatureRequestMessage() { + return signatureRequestMessage; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatureRequestMessage( + @javax.annotation.Nullable StringSettingUpdate signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + } + + public TeamSettingsUpdateRequest signatureRequestTitle( + @javax.annotation.Nullable StringSettingUpdate signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + return this; + } + + /** + * Default title enforced for team members when they create signature requests. + * + * @return signatureRequestTitle + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StringSettingUpdate getSignatureRequestTitle() { + return signatureRequestTitle; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatureRequestTitle( + @javax.annotation.Nullable StringSettingUpdate signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + } + + public TeamSettingsUpdateRequest multifactorAuthApp( + @javax.annotation.Nullable BooleanSettingUpdate multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + return this; + } + + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + * + * @return multifactorAuthApp + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getMultifactorAuthApp() { + return multifactorAuthApp; + } + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultifactorAuthApp( + @javax.annotation.Nullable BooleanSettingUpdate multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + } + + public TeamSettingsUpdateRequest multifactorAuthSms( + @javax.annotation.Nullable BooleanSettingUpdate multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + return this; + } + + /** + * Whether SMS multifactor authentication is enabled for the team. + * + * @return multifactorAuthSms + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BooleanSettingUpdate getMultifactorAuthSms() { + return multifactorAuthSms; + } + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultifactorAuthSms( + @javax.annotation.Nullable BooleanSettingUpdate multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + } + + public TeamSettingsUpdateRequest unset(@javax.annotation.Nullable Set unset) { + this.unset = unset; + return this; + } + + public TeamSettingsUpdateRequest addUnsetItem(UnsetEnum unsetItem) { + if (this.unset == null) { + this.unset = new LinkedHashSet<>(); + } + this.unset.add(unsetItem); + return this; + } + + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or + * locked in the same request. + * + * @return unset + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getUnset() { + return unset; + } + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnset(@javax.annotation.Nullable Set unset) { + this.unset = unset; + } + + /** Return true if this TeamSettingsUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsUpdateRequest teamSettingsUpdateRequest = (TeamSettingsUpdateRequest) o; + return Objects.equals(this.company, teamSettingsUpdateRequest.company) + && Objects.equals( + this.customSigningRedirectEnabled, + teamSettingsUpdateRequest.customSigningRedirectEnabled) + && Objects.equals( + this.customSigningRedirectUrl, + teamSettingsUpdateRequest.customSigningRedirectUrl) + && Objects.equals(this.customTagline, teamSettingsUpdateRequest.customTagline) + && Objects.equals(this.dateFormat, teamSettingsUpdateRequest.dateFormat) + && Objects.equals( + this.isSignatureRemindersEnabled, + teamSettingsUpdateRequest.isSignatureRemindersEnabled) + && Objects.equals(this.requestEmailFrom, teamSettingsUpdateRequest.requestEmailFrom) + && Objects.equals( + this.requestEmailSignature, teamSettingsUpdateRequest.requestEmailSignature) + && Objects.equals( + this.requiredSignatureTypes, + teamSettingsUpdateRequest.requiredSignatureTypes) + && Objects.equals( + this.shouldEnableTamperProof, + teamSettingsUpdateRequest.shouldEnableTamperProof) + && Objects.equals( + this.shouldIncludeDistinctPdfs, + teamSettingsUpdateRequest.shouldIncludeDistinctPdfs) + && Objects.equals( + this.shouldOfferSignerAccessCode, + teamSettingsUpdateRequest.shouldOfferSignerAccessCode) + && Objects.equals( + this.shouldOfferSignerSmsAuthentication, + teamSettingsUpdateRequest.shouldOfferSignerSmsAuthentication) + && Objects.equals( + this.shouldRemoveDocumentId, + teamSettingsUpdateRequest.shouldRemoveDocumentId) + && Objects.equals(this.dataResidency, teamSettingsUpdateRequest.dataResidency) + && Objects.equals( + this.allowTeamDeleteDocumentForEveryone, + teamSettingsUpdateRequest.allowTeamDeleteDocumentForEveryone) + && Objects.equals( + this.allowTeamDownloadCsv, teamSettingsUpdateRequest.allowTeamDownloadCsv) + && Objects.equals( + this.lockTeamTemplateCreation, + teamSettingsUpdateRequest.lockTeamTemplateCreation) + && Objects.equals( + this.lockTeamTemplateGallery, + teamSettingsUpdateRequest.lockTeamTemplateGallery) + && Objects.equals(this.selfSignMessage, teamSettingsUpdateRequest.selfSignMessage) + && Objects.equals(this.selfSignTitle, teamSettingsUpdateRequest.selfSignTitle) + && Objects.equals( + this.signatureRequestMessage, + teamSettingsUpdateRequest.signatureRequestMessage) + && Objects.equals( + this.signatureRequestTitle, teamSettingsUpdateRequest.signatureRequestTitle) + && Objects.equals( + this.multifactorAuthApp, teamSettingsUpdateRequest.multifactorAuthApp) + && Objects.equals( + this.multifactorAuthSms, teamSettingsUpdateRequest.multifactorAuthSms) + && Objects.equals(this.unset, teamSettingsUpdateRequest.unset); + } + + @Override + public int hashCode() { + return Objects.hash( + company, + customSigningRedirectEnabled, + customSigningRedirectUrl, + customTagline, + dateFormat, + isSignatureRemindersEnabled, + requestEmailFrom, + requestEmailSignature, + requiredSignatureTypes, + shouldEnableTamperProof, + shouldIncludeDistinctPdfs, + shouldOfferSignerAccessCode, + shouldOfferSignerSmsAuthentication, + shouldRemoveDocumentId, + dataResidency, + allowTeamDeleteDocumentForEveryone, + allowTeamDownloadCsv, + lockTeamTemplateCreation, + lockTeamTemplateGallery, + selfSignMessage, + selfSignTitle, + signatureRequestMessage, + signatureRequestTitle, + multifactorAuthApp, + multifactorAuthSms, + unset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsUpdateRequest {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ") + .append(toIndentedString(customSigningRedirectEnabled)) + .append("\n"); + sb.append(" customSigningRedirectUrl: ") + .append(toIndentedString(customSigningRedirectUrl)) + .append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ") + .append(toIndentedString(isSignatureRemindersEnabled)) + .append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ") + .append(toIndentedString(requestEmailSignature)) + .append("\n"); + sb.append(" requiredSignatureTypes: ") + .append(toIndentedString(requiredSignatureTypes)) + .append("\n"); + sb.append(" shouldEnableTamperProof: ") + .append(toIndentedString(shouldEnableTamperProof)) + .append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ") + .append(toIndentedString(shouldIncludeDistinctPdfs)) + .append("\n"); + sb.append(" shouldOfferSignerAccessCode: ") + .append(toIndentedString(shouldOfferSignerAccessCode)) + .append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ") + .append(toIndentedString(shouldOfferSignerSmsAuthentication)) + .append("\n"); + sb.append(" shouldRemoveDocumentId: ") + .append(toIndentedString(shouldRemoveDocumentId)) + .append("\n"); + sb.append(" dataResidency: ").append(toIndentedString(dataResidency)).append("\n"); + sb.append(" allowTeamDeleteDocumentForEveryone: ") + .append(toIndentedString(allowTeamDeleteDocumentForEveryone)) + .append("\n"); + sb.append(" allowTeamDownloadCsv: ") + .append(toIndentedString(allowTeamDownloadCsv)) + .append("\n"); + sb.append(" lockTeamTemplateCreation: ") + .append(toIndentedString(lockTeamTemplateCreation)) + .append("\n"); + sb.append(" lockTeamTemplateGallery: ") + .append(toIndentedString(lockTeamTemplateGallery)) + .append("\n"); + sb.append(" selfSignMessage: ").append(toIndentedString(selfSignMessage)).append("\n"); + sb.append(" selfSignTitle: ").append(toIndentedString(selfSignTitle)).append("\n"); + sb.append(" signatureRequestMessage: ") + .append(toIndentedString(signatureRequestMessage)) + .append("\n"); + sb.append(" signatureRequestTitle: ") + .append(toIndentedString(signatureRequestTitle)) + .append("\n"); + sb.append(" multifactorAuthApp: ") + .append(toIndentedString(multifactorAuthApp)) + .append("\n"); + sb.append(" multifactorAuthSms: ") + .append(toIndentedString(multifactorAuthSms)) + .append("\n"); + sb.append(" unset: ").append(toIndentedString(unset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) + || company.getClass().equals(Integer.class) + || company.getClass().equals(String.class) + || company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for (int i = 0; i < getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) + || customSigningRedirectEnabled.getClass().equals(Integer.class) + || customSigningRedirectEnabled.getClass().equals(String.class) + || customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for (int i = 0; i < getListSize(customSigningRedirectEnabled); i++) { + map.put( + "custom_signing_redirect_enabled[" + i + "]", + getFromList(customSigningRedirectEnabled, i)); + } + } else { + map.put( + "custom_signing_redirect_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) + || customSigningRedirectUrl.getClass().equals(Integer.class) + || customSigningRedirectUrl.getClass().equals(String.class) + || customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for (int i = 0; i < getListSize(customSigningRedirectUrl); i++) { + map.put( + "custom_signing_redirect_url[" + i + "]", + getFromList(customSigningRedirectUrl, i)); + } + } else { + map.put( + "custom_signing_redirect_url", + JSON.getDefault() + .getMapper() + .writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) + || customTagline.getClass().equals(Integer.class) + || customTagline.getClass().equals(String.class) + || customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for (int i = 0; i < getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } else { + map.put( + "custom_tagline", + JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) + || dateFormat.getClass().equals(Integer.class) + || dateFormat.getClass().equals(String.class) + || dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for (int i = 0; i < getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } else { + map.put( + "date_format", + JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) + || isSignatureRemindersEnabled.getClass().equals(Integer.class) + || isSignatureRemindersEnabled.getClass().equals(String.class) + || isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for (int i = 0; i < getListSize(isSignatureRemindersEnabled); i++) { + map.put( + "is_signature_reminders_enabled[" + i + "]", + getFromList(isSignatureRemindersEnabled, i)); + } + } else { + map.put( + "is_signature_reminders_enabled", + JSON.getDefault() + .getMapper() + .writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) + || requestEmailFrom.getClass().equals(Integer.class) + || requestEmailFrom.getClass().equals(String.class) + || requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for (int i = 0; i < getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } else { + map.put( + "request_email_from", + JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) + || requestEmailSignature.getClass().equals(Integer.class) + || requestEmailSignature.getClass().equals(String.class) + || requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for (int i = 0; i < getListSize(requestEmailSignature); i++) { + map.put( + "request_email_signature[" + i + "]", + getFromList(requestEmailSignature, i)); + } + } else { + map.put( + "request_email_signature", + JSON.getDefault() + .getMapper() + .writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) + || requiredSignatureTypes.getClass().equals(Integer.class) + || requiredSignatureTypes.getClass().equals(String.class) + || requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for (int i = 0; i < getListSize(requiredSignatureTypes); i++) { + map.put( + "required_signature_types[" + i + "]", + getFromList(requiredSignatureTypes, i)); + } + } else { + map.put( + "required_signature_types", + JSON.getDefault() + .getMapper() + .writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) + || shouldEnableTamperProof.getClass().equals(Integer.class) + || shouldEnableTamperProof.getClass().equals(String.class) + || shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for (int i = 0; i < getListSize(shouldEnableTamperProof); i++) { + map.put( + "should_enable_tamper_proof[" + i + "]", + getFromList(shouldEnableTamperProof, i)); + } + } else { + map.put( + "should_enable_tamper_proof", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) + || shouldIncludeDistinctPdfs.getClass().equals(Integer.class) + || shouldIncludeDistinctPdfs.getClass().equals(String.class) + || shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for (int i = 0; i < getListSize(shouldIncludeDistinctPdfs); i++) { + map.put( + "should_include_distinct_pdfs[" + i + "]", + getFromList(shouldIncludeDistinctPdfs, i)); + } + } else { + map.put( + "should_include_distinct_pdfs", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) + || shouldOfferSignerAccessCode.getClass().equals(Integer.class) + || shouldOfferSignerAccessCode.getClass().equals(String.class) + || shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for (int i = 0; i < getListSize(shouldOfferSignerAccessCode); i++) { + map.put( + "should_offer_signer_access_code[" + i + "]", + getFromList(shouldOfferSignerAccessCode, i)); + } + } else { + map.put( + "should_offer_signer_access_code", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) + || shouldOfferSignerSmsAuthentication.getClass().equals(String.class) + || shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put( + "should_offer_signer_sms_authentication", + shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for (int i = 0; i < getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put( + "should_offer_signer_sms_authentication[" + i + "]", + getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } else { + map.put( + "should_offer_signer_sms_authentication", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) + || shouldRemoveDocumentId.getClass().equals(Integer.class) + || shouldRemoveDocumentId.getClass().equals(String.class) + || shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for (int i = 0; i < getListSize(shouldRemoveDocumentId); i++) { + map.put( + "should_remove_document_id[" + i + "]", + getFromList(shouldRemoveDocumentId, i)); + } + } else { + map.put( + "should_remove_document_id", + JSON.getDefault() + .getMapper() + .writeValueAsString(shouldRemoveDocumentId)); + } + } + if (dataResidency != null) { + if (isFileTypeOrListOfFiles(dataResidency)) { + fileTypeFound = true; + } + + if (dataResidency.getClass().equals(java.io.File.class) + || dataResidency.getClass().equals(Integer.class) + || dataResidency.getClass().equals(String.class) + || dataResidency.getClass().isEnum()) { + map.put("data_residency", dataResidency); + } else if (isListOfFile(dataResidency)) { + for (int i = 0; i < getListSize(dataResidency); i++) { + map.put("data_residency[" + i + "]", getFromList(dataResidency, i)); + } + } else { + map.put( + "data_residency", + JSON.getDefault().getMapper().writeValueAsString(dataResidency)); + } + } + if (allowTeamDeleteDocumentForEveryone != null) { + if (isFileTypeOrListOfFiles(allowTeamDeleteDocumentForEveryone)) { + fileTypeFound = true; + } + + if (allowTeamDeleteDocumentForEveryone.getClass().equals(java.io.File.class) + || allowTeamDeleteDocumentForEveryone.getClass().equals(Integer.class) + || allowTeamDeleteDocumentForEveryone.getClass().equals(String.class) + || allowTeamDeleteDocumentForEveryone.getClass().isEnum()) { + map.put( + "allow_team_delete_document_for_everyone", + allowTeamDeleteDocumentForEveryone); + } else if (isListOfFile(allowTeamDeleteDocumentForEveryone)) { + for (int i = 0; i < getListSize(allowTeamDeleteDocumentForEveryone); i++) { + map.put( + "allow_team_delete_document_for_everyone[" + i + "]", + getFromList(allowTeamDeleteDocumentForEveryone, i)); + } + } else { + map.put( + "allow_team_delete_document_for_everyone", + JSON.getDefault() + .getMapper() + .writeValueAsString(allowTeamDeleteDocumentForEveryone)); + } + } + if (allowTeamDownloadCsv != null) { + if (isFileTypeOrListOfFiles(allowTeamDownloadCsv)) { + fileTypeFound = true; + } + + if (allowTeamDownloadCsv.getClass().equals(java.io.File.class) + || allowTeamDownloadCsv.getClass().equals(Integer.class) + || allowTeamDownloadCsv.getClass().equals(String.class) + || allowTeamDownloadCsv.getClass().isEnum()) { + map.put("allow_team_download_csv", allowTeamDownloadCsv); + } else if (isListOfFile(allowTeamDownloadCsv)) { + for (int i = 0; i < getListSize(allowTeamDownloadCsv); i++) { + map.put( + "allow_team_download_csv[" + i + "]", + getFromList(allowTeamDownloadCsv, i)); + } + } else { + map.put( + "allow_team_download_csv", + JSON.getDefault().getMapper().writeValueAsString(allowTeamDownloadCsv)); + } + } + if (lockTeamTemplateCreation != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateCreation)) { + fileTypeFound = true; + } + + if (lockTeamTemplateCreation.getClass().equals(java.io.File.class) + || lockTeamTemplateCreation.getClass().equals(Integer.class) + || lockTeamTemplateCreation.getClass().equals(String.class) + || lockTeamTemplateCreation.getClass().isEnum()) { + map.put("lock_team_template_creation", lockTeamTemplateCreation); + } else if (isListOfFile(lockTeamTemplateCreation)) { + for (int i = 0; i < getListSize(lockTeamTemplateCreation); i++) { + map.put( + "lock_team_template_creation[" + i + "]", + getFromList(lockTeamTemplateCreation, i)); + } + } else { + map.put( + "lock_team_template_creation", + JSON.getDefault() + .getMapper() + .writeValueAsString(lockTeamTemplateCreation)); + } + } + if (lockTeamTemplateGallery != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateGallery)) { + fileTypeFound = true; + } + + if (lockTeamTemplateGallery.getClass().equals(java.io.File.class) + || lockTeamTemplateGallery.getClass().equals(Integer.class) + || lockTeamTemplateGallery.getClass().equals(String.class) + || lockTeamTemplateGallery.getClass().isEnum()) { + map.put("lock_team_template_gallery", lockTeamTemplateGallery); + } else if (isListOfFile(lockTeamTemplateGallery)) { + for (int i = 0; i < getListSize(lockTeamTemplateGallery); i++) { + map.put( + "lock_team_template_gallery[" + i + "]", + getFromList(lockTeamTemplateGallery, i)); + } + } else { + map.put( + "lock_team_template_gallery", + JSON.getDefault() + .getMapper() + .writeValueAsString(lockTeamTemplateGallery)); + } + } + if (selfSignMessage != null) { + if (isFileTypeOrListOfFiles(selfSignMessage)) { + fileTypeFound = true; + } + + if (selfSignMessage.getClass().equals(java.io.File.class) + || selfSignMessage.getClass().equals(Integer.class) + || selfSignMessage.getClass().equals(String.class) + || selfSignMessage.getClass().isEnum()) { + map.put("self_sign_message", selfSignMessage); + } else if (isListOfFile(selfSignMessage)) { + for (int i = 0; i < getListSize(selfSignMessage); i++) { + map.put("self_sign_message[" + i + "]", getFromList(selfSignMessage, i)); + } + } else { + map.put( + "self_sign_message", + JSON.getDefault().getMapper().writeValueAsString(selfSignMessage)); + } + } + if (selfSignTitle != null) { + if (isFileTypeOrListOfFiles(selfSignTitle)) { + fileTypeFound = true; + } + + if (selfSignTitle.getClass().equals(java.io.File.class) + || selfSignTitle.getClass().equals(Integer.class) + || selfSignTitle.getClass().equals(String.class) + || selfSignTitle.getClass().isEnum()) { + map.put("self_sign_title", selfSignTitle); + } else if (isListOfFile(selfSignTitle)) { + for (int i = 0; i < getListSize(selfSignTitle); i++) { + map.put("self_sign_title[" + i + "]", getFromList(selfSignTitle, i)); + } + } else { + map.put( + "self_sign_title", + JSON.getDefault().getMapper().writeValueAsString(selfSignTitle)); + } + } + if (signatureRequestMessage != null) { + if (isFileTypeOrListOfFiles(signatureRequestMessage)) { + fileTypeFound = true; + } + + if (signatureRequestMessage.getClass().equals(java.io.File.class) + || signatureRequestMessage.getClass().equals(Integer.class) + || signatureRequestMessage.getClass().equals(String.class) + || signatureRequestMessage.getClass().isEnum()) { + map.put("signature_request_message", signatureRequestMessage); + } else if (isListOfFile(signatureRequestMessage)) { + for (int i = 0; i < getListSize(signatureRequestMessage); i++) { + map.put( + "signature_request_message[" + i + "]", + getFromList(signatureRequestMessage, i)); + } + } else { + map.put( + "signature_request_message", + JSON.getDefault() + .getMapper() + .writeValueAsString(signatureRequestMessage)); + } + } + if (signatureRequestTitle != null) { + if (isFileTypeOrListOfFiles(signatureRequestTitle)) { + fileTypeFound = true; + } + + if (signatureRequestTitle.getClass().equals(java.io.File.class) + || signatureRequestTitle.getClass().equals(Integer.class) + || signatureRequestTitle.getClass().equals(String.class) + || signatureRequestTitle.getClass().isEnum()) { + map.put("signature_request_title", signatureRequestTitle); + } else if (isListOfFile(signatureRequestTitle)) { + for (int i = 0; i < getListSize(signatureRequestTitle); i++) { + map.put( + "signature_request_title[" + i + "]", + getFromList(signatureRequestTitle, i)); + } + } else { + map.put( + "signature_request_title", + JSON.getDefault() + .getMapper() + .writeValueAsString(signatureRequestTitle)); + } + } + if (multifactorAuthApp != null) { + if (isFileTypeOrListOfFiles(multifactorAuthApp)) { + fileTypeFound = true; + } + + if (multifactorAuthApp.getClass().equals(java.io.File.class) + || multifactorAuthApp.getClass().equals(Integer.class) + || multifactorAuthApp.getClass().equals(String.class) + || multifactorAuthApp.getClass().isEnum()) { + map.put("multifactor_auth_app", multifactorAuthApp); + } else if (isListOfFile(multifactorAuthApp)) { + for (int i = 0; i < getListSize(multifactorAuthApp); i++) { + map.put( + "multifactor_auth_app[" + i + "]", + getFromList(multifactorAuthApp, i)); + } + } else { + map.put( + "multifactor_auth_app", + JSON.getDefault().getMapper().writeValueAsString(multifactorAuthApp)); + } + } + if (multifactorAuthSms != null) { + if (isFileTypeOrListOfFiles(multifactorAuthSms)) { + fileTypeFound = true; + } + + if (multifactorAuthSms.getClass().equals(java.io.File.class) + || multifactorAuthSms.getClass().equals(Integer.class) + || multifactorAuthSms.getClass().equals(String.class) + || multifactorAuthSms.getClass().isEnum()) { + map.put("multifactor_auth_sms", multifactorAuthSms); + } else if (isListOfFile(multifactorAuthSms)) { + for (int i = 0; i < getListSize(multifactorAuthSms); i++) { + map.put( + "multifactor_auth_sms[" + i + "]", + getFromList(multifactorAuthSms, i)); + } + } else { + map.put( + "multifactor_auth_sms", + JSON.getDefault().getMapper().writeValueAsString(multifactorAuthSms)); + } + } + if (unset != null) { + if (isFileTypeOrListOfFiles(unset)) { + fileTypeFound = true; + } + + if (unset.getClass().equals(java.io.File.class) + || unset.getClass().equals(Integer.class) + || unset.getClass().equals(String.class) + || unset.getClass().isEnum()) { + map.put("unset", unset); + } else if (isListOfFile(unset)) { + for (int i = 0; i < getListSize(unset); i++) { + map.put("unset[" + i + "]", getFromList(unset, i)); + } + } else { + map.put("unset", JSON.getDefault().getMapper().writeValueAsString(unset)); + } + } + } 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/README.md b/sdks/java-v2/README.md index 80001f0d1..ec1a92ac0 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -152,6 +152,8 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountApi* | [**accountCreate**](docs/AccountApi.md#accountCreate) | **POST** /account/create | Create Account *AccountApi* | [**accountGet**](docs/AccountApi.md#accountGet) | **GET** /account | Get Account +*AccountApi* | [**accountSettingsGet**](docs/AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings +*AccountApi* | [**accountSettingsUpdate**](docs/AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings *AccountApi* | [**accountUpdate**](docs/AccountApi.md#accountUpdate) | **PUT** /account | Update Account *AccountApi* | [**accountVerify**](docs/AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account *ApiAppApi* | [**apiAppCreate**](docs/ApiAppApi.md#apiAppCreate) | **POST** /api_app | Create API App @@ -207,6 +209,8 @@ Class | Method | HTTP request | Description *TeamApi* | [**teamInvites**](docs/TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites *TeamApi* | [**teamMembers**](docs/TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members *TeamApi* | [**teamRemoveMember**](docs/TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team +*TeamApi* | [**teamSettingsGet**](docs/TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings +*TeamApi* | [**teamSettingsUpdate**](docs/TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings *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 @@ -235,6 +239,9 @@ Class | Method | HTTP request | Description - [AccountResponseQuotas](docs/AccountResponseQuotas.md) - [AccountResponseSettings](docs/AccountResponseSettings.md) - [AccountResponseUsage](docs/AccountResponseUsage.md) + - [AccountSettingsResponse](docs/AccountSettingsResponse.md) + - [AccountSettingsResponseSettings](docs/AccountSettingsResponseSettings.md) + - [AccountSettingsUpdateRequest](docs/AccountSettingsUpdateRequest.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -248,11 +255,16 @@ Class | Method | HTTP request | Description - [ApiAppResponseOwnerAccount](docs/ApiAppResponseOwnerAccount.md) - [ApiAppResponseWhiteLabelingOptions](docs/ApiAppResponseWhiteLabelingOptions.md) - [ApiAppUpdateRequest](docs/ApiAppUpdateRequest.md) + - [BooleanSettingUpdate](docs/BooleanSettingUpdate.md) - [BulkSendJobGetResponse](docs/BulkSendJobGetResponse.md) - [BulkSendJobGetResponseSignatureRequests](docs/BulkSendJobGetResponseSignatureRequests.md) - [BulkSendJobListResponse](docs/BulkSendJobListResponse.md) - [BulkSendJobResponse](docs/BulkSendJobResponse.md) - [BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md) + - [DataResidency](docs/DataResidency.md) + - [DataResidencySettingUpdate](docs/DataResidencySettingUpdate.md) + - [DateFormat](docs/DateFormat.md) + - [DateFormatSettingUpdate](docs/DateFormatSettingUpdate.md) - [DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md) - [DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md) - [DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md) @@ -291,6 +303,10 @@ Class | Method | HTTP request | Description - [ReportCreateRequest](docs/ReportCreateRequest.md) - [ReportCreateResponse](docs/ReportCreateResponse.md) - [ReportResponse](docs/ReportResponse.md) + - [RequiredSignatureType](docs/RequiredSignatureType.md) + - [RequiredSignatureTypesSettingUpdate](docs/RequiredSignatureTypesSettingUpdate.md) + - [SettingLockResponse](docs/SettingLockResponse.md) + - [SettingResponse](docs/SettingResponse.md) - [SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) @@ -323,6 +339,7 @@ Class | Method | HTTP request | Description - [SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) + - [StringSettingUpdate](docs/StringSettingUpdate.md) - [SubAttachment](docs/SubAttachment.md) - [SubBulkSignerList](docs/SubBulkSignerList.md) - [SubBulkSignerListCustomField](docs/SubBulkSignerListCustomField.md) @@ -371,6 +388,10 @@ Class | Method | HTTP request | Description - [TeamParentResponse](docs/TeamParentResponse.md) - [TeamRemoveMemberRequest](docs/TeamRemoveMemberRequest.md) - [TeamResponse](docs/TeamResponse.md) + - [TeamSettingLock](docs/TeamSettingLock.md) + - [TeamSettingsResponse](docs/TeamSettingsResponse.md) + - [TeamSettingsResponseSettings](docs/TeamSettingsResponseSettings.md) + - [TeamSettingsUpdateRequest](docs/TeamSettingsUpdateRequest.md) - [TeamSubTeamsResponse](docs/TeamSubTeamsResponse.md) - [TeamUpdateRequest](docs/TeamUpdateRequest.md) - [TemplateAddUserRequest](docs/TemplateAddUserRequest.md) diff --git a/sdks/java-v2/docs/AccountApi.md b/sdks/java-v2/docs/AccountApi.md index e638f559d..ab737020d 100644 --- a/sdks/java-v2/docs/AccountApi.md +++ b/sdks/java-v2/docs/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to *https://api.hellosign.com/v3* |------------- | ------------- | -------------| [**accountCreate**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account [**accountGet**](AccountApi.md#accountGet) | **GET** /account | Get Account +[**accountSettingsGet**](AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings +[**accountSettingsUpdate**](AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings [**accountUpdate**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account [**accountVerify**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account @@ -180,6 +182,173 @@ public class AccountGetExample | **4XX** | failed_operation | - | +## accountSettingsGet + +> AccountSettingsResponse accountSettingsGet(accountId) + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class AccountSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + + System.out.println(response); + System.out.println(response.getAccountId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountId** | **String**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## accountSettingsUpdate + +> AccountSettingsResponse accountSettingsUpdate(accountSettingsUpdateRequest, accountId) + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.AccountApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; +import com.dropbox.sign.model.DateFormat; +import com.dropbox.sign.model.RequiredSignatureType; +import java.util.List; + +public class AccountSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountSettingsUpdateRequest = new AccountSettingsUpdateRequest() + .dateFormat(DateFormat.MM_DD_YYYY) + .requiredSignatureTypes(List.of( + RequiredSignatureType.DRAW, + RequiredSignatureType.TYPE + )) + .shouldEnableTamperProof(false) + .unset(List.of("company")); + + try + { + var response = new AccountApi(config).accountSettingsUpdate( + accountSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountSettingsUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountSettingsUpdateRequest** | [**AccountSettingsUpdateRequest**](AccountSettingsUpdateRequest.md)| | + **accountId** | **String**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **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 | - | + + ## accountUpdate > AccountGetResponse accountUpdate(accountUpdateRequest) diff --git a/sdks/java-v2/docs/AccountSettingsResponse.md b/sdks/java-v2/docs/AccountSettingsResponse.md new file mode 100644 index 000000000..8bdcdfaf2 --- /dev/null +++ b/sdks/java-v2/docs/AccountSettingsResponse.md @@ -0,0 +1,16 @@ + + +# AccountSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId`*_required_ | ```String``` | | | +| `settings`*_required_ | [```AccountSettingsResponseSettings```](AccountSettingsResponseSettings.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v2/docs/AccountSettingsResponseSettings.md b/sdks/java-v2/docs/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..d6ae9bbe2 --- /dev/null +++ b/sdks/java-v2/docs/AccountSettingsResponseSettings.md @@ -0,0 +1,39 @@ + + +# AccountSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + + + diff --git a/sdks/java-v2/docs/AccountSettingsUpdateRequest.md b/sdks/java-v2/docs/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..d49eda4f8 --- /dev/null +++ b/sdks/java-v2/docs/AccountSettingsUpdateRequest.md @@ -0,0 +1,73 @@ + + +# AccountSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company` | ```String``` | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | ```Boolean``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | ```String``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | ```String``` | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | ```DateFormat``` | | | +| `isSignatureRemindersEnabled` | ```Boolean``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | ```String``` | Sender name shown on signature request emails. | | +| `requestEmailSignature` | ```String``` | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | ```Set``` | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | ```Boolean``` | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | ```Boolean``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | ```Boolean``` | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | ```Boolean``` | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | ```Boolean``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled` | ```Boolean``` | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled` | ```Boolean``` | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete` | ```Boolean``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs` | ```Boolean``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers` | ```Boolean``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary` | ```Boolean``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails` | ```Boolean``` | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail` | ```Boolean``` | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails` | ```Boolean``` | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled` | ```Boolean``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | [```Set<UnsetEnum>```](#Set<UnsetEnum>) | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + + + +## Enum: Set<UnsetEnum> + +| Name | Value | +---- | ----- +| COMPANY | "company" | +| CUSTOM_SIGNING_REDIRECT_ENABLED | "custom_signing_redirect_enabled" | +| CUSTOM_SIGNING_REDIRECT_URL | "custom_signing_redirect_url" | +| CUSTOM_TAGLINE | "custom_tagline" | +| DATE_FORMAT | "date_format" | +| IS_SIGNATURE_REMINDERS_ENABLED | "is_signature_reminders_enabled" | +| REQUEST_EMAIL_FROM | "request_email_from" | +| REQUEST_EMAIL_SIGNATURE | "request_email_signature" | +| REQUIRED_SIGNATURE_TYPES | "required_signature_types" | +| SHOULD_ENABLE_TAMPER_PROOF | "should_enable_tamper_proof" | +| SHOULD_INCLUDE_DISTINCT_PDFS | "should_include_distinct_pdfs" | +| SHOULD_OFFER_SIGNER_ACCESS_CODE | "should_offer_signer_access_code" | +| SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION | "should_offer_signer_sms_authentication" | +| SHOULD_REMOVE_DOCUMENT_ID | "should_remove_document_id" | +| IS_NOTIFY_ON_SIGN_ENABLED | "is_notify_on_sign_enabled" | +| IS_NOTIFY_ON_VIEW_ENABLED | "is_notify_on_view_enabled" | +| SHOULD_AUTOCOMPLETE | "should_autocomplete" | +| SHOULD_INCLUDE_REQUESTED_PDFS | "should_include_requested_pdfs" | +| SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS | "should_include_requested_pdfs_for_others" | +| SHOULD_INCLUDE_SENT_DOC_PDFS | "should_include_sent_doc_pdfs" | +| SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS | "should_include_sent_doc_pdfs_for_others" | +| SHOULD_SEND_DAILY_SUMMARY | "should_send_daily_summary" | +| SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS | "should_send_embedded_signature_conf_emails" | +| SHOULD_SEND_ORDERED_SR_EMAIL | "should_send_ordered_sr_email" | +| SHOULD_SEND_OUTBOUND_CONF_EMAILS | "should_send_outbound_conf_emails" | +| TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED | "template_link_signature_emails_enabled" | + + + diff --git a/sdks/java-v2/docs/BooleanSettingUpdate.md b/sdks/java-v2/docs/BooleanSettingUpdate.md new file mode 100644 index 000000000..04b6a353b --- /dev/null +++ b/sdks/java-v2/docs/BooleanSettingUpdate.md @@ -0,0 +1,15 @@ + + +# BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```Boolean``` | Boolean value to store. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v2/docs/DataResidency.md b/sdks/java-v2/docs/DataResidency.md new file mode 100644 index 000000000..c8813a37b --- /dev/null +++ b/sdks/java-v2/docs/DataResidency.md @@ -0,0 +1,21 @@ + + +# DataResidency + +## Enum + + +* `US` (value: `"us"`) + +* `EU` (value: `"eu"`) + +* `AU` (value: `"au"`) + +* `JP` (value: `"jp"`) + +* `UK` (value: `"uk"`) + +* `CA` (value: `"ca"`) + + + diff --git a/sdks/java-v2/docs/DataResidencySettingUpdate.md b/sdks/java-v2/docs/DataResidencySettingUpdate.md new file mode 100644 index 000000000..4bb64aab1 --- /dev/null +++ b/sdks/java-v2/docs/DataResidencySettingUpdate.md @@ -0,0 +1,15 @@ + + +# DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```DataResidency``` | | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v2/docs/DateFormat.md b/sdks/java-v2/docs/DateFormat.md new file mode 100644 index 000000000..7d5fd7adf --- /dev/null +++ b/sdks/java-v2/docs/DateFormat.md @@ -0,0 +1,15 @@ + + +# DateFormat + +## Enum + + +* `MM_DD_YYYY` (value: `"MM/DD/YYYY"`) + +* `DD_MM_YYYY` (value: `"DD/MM/YYYY"`) + +* `YYYY_MM_DD` (value: `"YYYY/MM/DD"`) + + + diff --git a/sdks/java-v2/docs/DateFormatSettingUpdate.md b/sdks/java-v2/docs/DateFormatSettingUpdate.md new file mode 100644 index 000000000..9fa5ebc9e --- /dev/null +++ b/sdks/java-v2/docs/DateFormatSettingUpdate.md @@ -0,0 +1,15 @@ + + +# DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```DateFormat``` | | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v2/docs/RequiredSignatureType.md b/sdks/java-v2/docs/RequiredSignatureType.md new file mode 100644 index 000000000..f12a49853 --- /dev/null +++ b/sdks/java-v2/docs/RequiredSignatureType.md @@ -0,0 +1,17 @@ + + +# RequiredSignatureType + +## Enum + + +* `DRAW` (value: `"draw"`) + +* `PHONE` (value: `"phone"`) + +* `TYPE` (value: `"type"`) + +* `UPLOAD` (value: `"upload"`) + + + diff --git a/sdks/java-v2/docs/RequiredSignatureTypesSettingUpdate.md b/sdks/java-v2/docs/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..7e99c85b0 --- /dev/null +++ b/sdks/java-v2/docs/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,15 @@ + + +# RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```Set``` | Signature creation methods signers may use. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v2/docs/SettingLockResponse.md b/sdks/java-v2/docs/SettingLockResponse.md new file mode 100644 index 000000000..295ebb2c0 --- /dev/null +++ b/sdks/java-v2/docs/SettingLockResponse.md @@ -0,0 +1,25 @@ + + +# SettingLockResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `mode`*_required_ | ```TeamSettingLock``` | | | +| `source`*_required_ | [```SourceEnum```](#SourceEnum) | | | + + + +## Enum: SourceEnum + +| Name | Value | +---- | ----- +| TEAM | "team" | +| PARENT_TEAM | "parent_team" | +| DEFAULT | "default" | + + + diff --git a/sdks/java-v2/docs/SettingResponse.md b/sdks/java-v2/docs/SettingResponse.md new file mode 100644 index 000000000..1611544f7 --- /dev/null +++ b/sdks/java-v2/docs/SettingResponse.md @@ -0,0 +1,41 @@ + + +# SettingResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value`*_required_ | ```Object``` | Current value of the setting. Null when the setting has no value. | | +| `isInherited`*_required_ | ```Boolean``` | | | +| `source`*_required_ | [```SourceEnum```](#SourceEnum) | | | +| `type`*_required_ | [```TypeEnum```](#TypeEnum) | | | +| `writable`*_required_ | ```Boolean``` | | | +| `lock`*_required_ | [```SettingLockResponse```](SettingLockResponse.md) | | | + + + +## Enum: SourceEnum + +| Name | Value | +---- | ----- +| ACCOUNT | "account" | +| TEAM | "team" | +| PARENT_TEAM | "parent_team" | +| DEFAULT | "default" | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| BOOLEAN | "boolean" | +| INTEGER | "integer" | +| STRING | "string" | +| ARRAY | "array" | + + + diff --git a/sdks/java-v2/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/java-v2/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index ef7454fc2..99f7f8649 100644 --- a/sdks/java-v2/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/java-v2/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -16,7 +16,7 @@ | `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Map``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | diff --git a/sdks/java-v2/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/java-v2/docs/SignatureRequestBulkSendWithTemplateRequest.md index 34a3281c8..cf007d669 100644 --- a/sdks/java-v2/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/java-v2/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -16,7 +16,7 @@ | `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Map``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | diff --git a/sdks/java-v2/docs/StringSettingUpdate.md b/sdks/java-v2/docs/StringSettingUpdate.md new file mode 100644 index 000000000..2361efc1a --- /dev/null +++ b/sdks/java-v2/docs/StringSettingUpdate.md @@ -0,0 +1,15 @@ + + +# StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `value` | ```String``` | String value to store. | | +| `lockMode` | ```TeamSettingLock``` | | | + + + diff --git a/sdks/java-v2/docs/SubBulkSignerList.md b/sdks/java-v2/docs/SubBulkSignerList.md index 918c935b1..653b11b9a 100644 --- a/sdks/java-v2/docs/SubBulkSignerList.md +++ b/sdks/java-v2/docs/SubBulkSignerList.md @@ -10,6 +10,7 @@ |------------ | ------------- | ------------- | -------------| | `customFields` | [```List```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```Map``` | _t__Sub::BulkSigner::METADATA | | diff --git a/sdks/java-v2/docs/TeamApi.md b/sdks/java-v2/docs/TeamApi.md index abb3f1ee0..47bb22045 100644 --- a/sdks/java-v2/docs/TeamApi.md +++ b/sdks/java-v2/docs/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.hellosign.com/v3* [**teamInvites**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites [**teamMembers**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members [**teamRemoveMember**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team +[**teamSettingsGet**](TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings +[**teamSettingsUpdate**](TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings [**teamSubTeams**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams [**teamUpdate**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team @@ -677,6 +679,176 @@ public class TeamRemoveMemberExample | **4XX** | failed_operation | - | +## teamSettingsGet + +> TeamSettingsResponse teamSettingsGet(teamId) + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.SettingResponse; + +public class TeamSettingsGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSettingsGet(); + SettingResponse company = response.getSettings().getCompany(); + SettingResponse dataResidency = response.getSettings().getDataResidency(); + + System.out.println(response); + System.out.println(response.getTeamId()); + System.out.println(company.getValue()); + System.out.println(company.getIsInherited()); + System.out.println(company.getSource()); + System.out.println(company.getType()); + System.out.println(company.getWritable()); + System.out.println(company.getLock().getMode()); + System.out.println(company.getLock().getSource()); + System.out.println(dataResidency.getValue()); + System.out.println(dataResidency.getType()); + System.out.println(dataResidency.getLock().getMode()); + System.out.println(dataResidency.getLock().getSource()); + System.out.println(response.getWarnings()); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamId** | **String**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamSettingsUpdate + +> TeamSettingsResponse teamSettingsUpdate(teamSettingsUpdateRequest, teamId) + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.TeamApi; +import com.dropbox.sign.auth.HttpBasicAuth; +import com.dropbox.sign.model.DataResidency; +import com.dropbox.sign.model.DataResidencySettingUpdate; +import com.dropbox.sign.model.StringSettingUpdate; +import com.dropbox.sign.model.TeamSettingLock; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; + +public class TeamSettingsUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamSettingsUpdateRequest = new TeamSettingsUpdateRequest() + .dataResidency(new DataResidencySettingUpdate().value(DataResidency.EU)) + .company(new StringSettingUpdate() + .value("Northwind") + .lockMode(TeamSettingLock.ORGANIZATION_ADMINS)); + + try + { + var response = new TeamApi(config).teamSettingsUpdate( + teamSettingsUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSettingsUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamSettingsUpdateRequest** | [**TeamSettingsUpdateRequest**](TeamSettingsUpdateRequest.md)| | + **teamId** | **String**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **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 | - | + + ## teamSubTeams > TeamSubTeamsResponse teamSubTeams(teamId, page, pageSize) diff --git a/sdks/java-v2/docs/TeamCreateRequest.md b/sdks/java-v2/docs/TeamCreateRequest.md index 1a4861618..be4d8e143 100644 --- a/sdks/java-v2/docs/TeamCreateRequest.md +++ b/sdks/java-v2/docs/TeamCreateRequest.md @@ -9,6 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `name` | ```String``` | The name of your Team. | | +| `parentTeamId` | ```String``` | _t__TeamCreate::PARENT_TEAM_ID | | diff --git a/sdks/java-v2/docs/TeamResponse.md b/sdks/java-v2/docs/TeamResponse.md index ca6344cfc..1ae2f8b03 100644 --- a/sdks/java-v2/docs/TeamResponse.md +++ b/sdks/java-v2/docs/TeamResponse.md @@ -8,6 +8,8 @@ Contains information about your team and its members | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| `teamId` | ```String``` | The id of a team | | +| `parentTeamId` | ```String``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```String``` | The name of your Team | | | `accounts` | [```List```](AccountResponse.md) | | | | `invitedAccounts` | [```List```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/java-v2/docs/TeamSettingLock.md b/sdks/java-v2/docs/TeamSettingLock.md new file mode 100644 index 000000000..bec706691 --- /dev/null +++ b/sdks/java-v2/docs/TeamSettingLock.md @@ -0,0 +1,15 @@ + + +# TeamSettingLock + +## Enum + + +* `ORGANIZATION_ADMINS` (value: `"organization_admins"`) + +* `TEAM_ADMINS` (value: `"team_admins"`) + +* `MEMBERS` (value: `"members"`) + + + diff --git a/sdks/java-v2/docs/TeamSettingsResponse.md b/sdks/java-v2/docs/TeamSettingsResponse.md new file mode 100644 index 000000000..58c27c736 --- /dev/null +++ b/sdks/java-v2/docs/TeamSettingsResponse.md @@ -0,0 +1,16 @@ + + +# TeamSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamId`*_required_ | ```String``` | | | +| `settings`*_required_ | [```TeamSettingsResponseSettings```](TeamSettingsResponseSettings.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v2/docs/TeamSettingsResponseSettings.md b/sdks/java-v2/docs/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..70718c202 --- /dev/null +++ b/sdks/java-v2/docs/TeamSettingsResponseSettings.md @@ -0,0 +1,38 @@ + + +# TeamSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency`*_required_ | [```SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + + + diff --git a/sdks/java-v2/docs/TeamSettingsUpdateRequest.md b/sdks/java-v2/docs/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..7a3b68476 --- /dev/null +++ b/sdks/java-v2/docs/TeamSettingsUpdateRequest.md @@ -0,0 +1,71 @@ + + +# TeamSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `company` | [```StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | [```StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | [```StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | [```DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | [```StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature` | [```StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | [```RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency` | [```DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | [```Set<UnsetEnum>```](#Set<UnsetEnum>) | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + + + +## Enum: Set<UnsetEnum> + +| Name | Value | +---- | ----- +| COMPANY | "company" | +| CUSTOM_SIGNING_REDIRECT_ENABLED | "custom_signing_redirect_enabled" | +| CUSTOM_SIGNING_REDIRECT_URL | "custom_signing_redirect_url" | +| CUSTOM_TAGLINE | "custom_tagline" | +| DATE_FORMAT | "date_format" | +| IS_SIGNATURE_REMINDERS_ENABLED | "is_signature_reminders_enabled" | +| REQUEST_EMAIL_FROM | "request_email_from" | +| REQUEST_EMAIL_SIGNATURE | "request_email_signature" | +| REQUIRED_SIGNATURE_TYPES | "required_signature_types" | +| SHOULD_ENABLE_TAMPER_PROOF | "should_enable_tamper_proof" | +| SHOULD_INCLUDE_DISTINCT_PDFS | "should_include_distinct_pdfs" | +| SHOULD_OFFER_SIGNER_ACCESS_CODE | "should_offer_signer_access_code" | +| SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION | "should_offer_signer_sms_authentication" | +| SHOULD_REMOVE_DOCUMENT_ID | "should_remove_document_id" | +| DATA_RESIDENCY | "data_residency" | +| ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE | "allow_team_delete_document_for_everyone" | +| ALLOW_TEAM_DOWNLOAD_CSV | "allow_team_download_csv" | +| LOCK_TEAM_TEMPLATE_CREATION | "lock_team_template_creation" | +| LOCK_TEAM_TEMPLATE_GALLERY | "lock_team_template_gallery" | +| SELF_SIGN_MESSAGE | "self_sign_message" | +| SELF_SIGN_TITLE | "self_sign_title" | +| SIGNATURE_REQUEST_MESSAGE | "signature_request_message" | +| SIGNATURE_REQUEST_TITLE | "signature_request_title" | +| MULTIFACTOR_AUTH_APP | "multifactor_auth_app" | +| MULTIFACTOR_AUTH_SMS | "multifactor_auth_sms" | + + + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java index 95a905691..dbdac8ddb 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -11,6 +11,8 @@ import com.dropbox.sign.model.AccountCreateRequest; import com.dropbox.sign.model.AccountCreateResponse; import com.dropbox.sign.model.AccountGetResponse; +import com.dropbox.sign.model.AccountSettingsResponse; +import com.dropbox.sign.model.AccountSettingsUpdateRequest; import com.dropbox.sign.model.AccountUpdateRequest; import com.dropbox.sign.model.AccountVerifyRequest; import com.dropbox.sign.model.AccountVerifyResponse; @@ -224,6 +226,181 @@ public ApiResponse accountGetWithHttpInfo(String accountId, false ); } + /** + * Get account settings + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/AccountSettingsGetExample.java + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @return AccountSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public AccountSettingsResponse accountSettingsGet(String accountId) throws ApiException { + return accountSettingsGetWithHttpInfo(accountId).getData(); + } + + + /** + * @see AccountApi#accountSettingsGet(String) + */ + public AccountSettingsResponse accountSettingsGet() throws ApiException { + String accountId = null; + + return accountSettingsGetWithHttpInfo(accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsGetWithHttpInfo(String) + */ + public ApiResponse accountSettingsGetWithHttpInfo() throws ApiException { + String accountId = null; + + return accountSettingsGetWithHttpInfo(accountId); + } + + + /** + * Get account settings + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/AccountSettingsGetExample.java + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @return ApiResponse<AccountSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse accountSettingsGetWithHttpInfo(String accountId) throws ApiException { + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "account_id", accountId) + ); + + 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", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "AccountApi.accountSettingsGet", + "/account/settings", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Modify account settings + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/AccountSettingsUpdateExample.java + * @param accountSettingsUpdateRequest (required) + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @return AccountSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public AccountSettingsResponse accountSettingsUpdate(AccountSettingsUpdateRequest accountSettingsUpdateRequest, String accountId) throws ApiException { + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId).getData(); + } + + + /** + * @see AccountApi#accountSettingsUpdate(AccountSettingsUpdateRequest, String) + */ + public AccountSettingsResponse accountSettingsUpdate(AccountSettingsUpdateRequest accountSettingsUpdateRequest) throws ApiException { + String accountId = null; + + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId).getData(); + } + + /** + * @see AccountApi#accountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest, String) + */ + public ApiResponse accountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest accountSettingsUpdateRequest) throws ApiException { + String accountId = null; + + return accountSettingsUpdateWithHttpInfo(accountSettingsUpdateRequest, accountId); + } + + + /** + * Modify account settings + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/AccountSettingsUpdateExample.java + * @param accountSettingsUpdateRequest (required) + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @return ApiResponse<AccountSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse accountSettingsUpdateWithHttpInfo(AccountSettingsUpdateRequest accountSettingsUpdateRequest, String accountId) throws ApiException { + + // Check required parameters + if (accountSettingsUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'accountSettingsUpdateRequest' when calling accountSettingsUpdate"); + } + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "account_id", accountId) + ); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = accountSettingsUpdateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "AccountApi.accountSettingsUpdate", + "/account/settings", + "POST", + localVarQueryParams, + isFileTypeFound ? null : accountSettingsUpdateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } /** * Update Account * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java index a2d67bc45..87c1c30e0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -16,6 +16,8 @@ import com.dropbox.sign.model.TeamInvitesResponse; import com.dropbox.sign.model.TeamMembersResponse; import com.dropbox.sign.model.TeamRemoveMemberRequest; +import com.dropbox.sign.model.TeamSettingsResponse; +import com.dropbox.sign.model.TeamSettingsUpdateRequest; import com.dropbox.sign.model.TeamSubTeamsResponse; import com.dropbox.sign.model.TeamUpdateRequest; @@ -682,6 +684,181 @@ public ApiResponse teamRemoveMemberWithHttpInfo(TeamRemoveMembe false ); } + /** + * Get team settings + * team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/TeamSettingsGetExample.java + * @param teamId Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @return TeamSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public TeamSettingsResponse teamSettingsGet(String teamId) throws ApiException { + return teamSettingsGetWithHttpInfo(teamId).getData(); + } + + + /** + * @see TeamApi#teamSettingsGet(String) + */ + public TeamSettingsResponse teamSettingsGet() throws ApiException { + String teamId = null; + + return teamSettingsGetWithHttpInfo(teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsGetWithHttpInfo(String) + */ + public ApiResponse teamSettingsGetWithHttpInfo() throws ApiException { + String teamId = null; + + return teamSettingsGetWithHttpInfo(teamId); + } + + + /** + * Get team settings + * team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/TeamSettingsGetExample.java + * @param teamId Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @return ApiResponse<TeamSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse teamSettingsGetWithHttpInfo(String teamId) throws ApiException { + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "team_id", teamId) + ); + + 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", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "TeamApi.teamSettingsGet", + "/team/settings", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Modify team settings + * team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/TeamSettingsUpdateExample.java + * @param teamSettingsUpdateRequest (required) + * @param teamId Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @return TeamSettingsResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public TeamSettingsResponse teamSettingsUpdate(TeamSettingsUpdateRequest teamSettingsUpdateRequest, String teamId) throws ApiException { + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId).getData(); + } + + + /** + * @see TeamApi#teamSettingsUpdate(TeamSettingsUpdateRequest, String) + */ + public TeamSettingsResponse teamSettingsUpdate(TeamSettingsUpdateRequest teamSettingsUpdateRequest) throws ApiException { + String teamId = null; + + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId).getData(); + } + + /** + * @see TeamApi#teamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest, String) + */ + public ApiResponse teamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest teamSettingsUpdateRequest) throws ApiException { + String teamId = null; + + return teamSettingsUpdateWithHttpInfo(teamSettingsUpdateRequest, teamId); + } + + + /** + * Modify team settings + * team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + * Example: https://github.com/hellosign/dropbox-sign-java/blob/main/examples/TeamSettingsUpdateExample.java + * @param teamSettingsUpdateRequest (required) + * @param teamId Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @return ApiResponse<TeamSettingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse teamSettingsUpdateWithHttpInfo(TeamSettingsUpdateRequest teamSettingsUpdateRequest, String teamId) throws ApiException { + + // Check required parameters + if (teamSettingsUpdateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'teamSettingsUpdateRequest' when calling teamSettingsUpdate"); + } + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "team_id", teamId) + ); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = teamSettingsUpdateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "TeamApi.teamSettingsUpdate", + "/team/settings", + "POST", + localVarQueryParams, + isFileTypeFound ? null : teamSettingsUpdateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } /** * List Sub Teams * Provides a paginated list of sub teams that belong to a given team. diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java new file mode 100644 index 000000000..f669f9b50 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsResponse.java @@ -0,0 +1,293 @@ +/* + * 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.AccountSettingsResponseSettings; +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; +/** + * AccountSettingsResponse + */ +@JsonPropertyOrder({ + AccountSettingsResponse.JSON_PROPERTY_ACCOUNT_ID, + AccountSettingsResponse.JSON_PROPERTY_SETTINGS, + AccountSettingsResponse.JSON_PROPERTY_WARNINGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class AccountSettingsResponse { + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nonnull + private String accountId; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @jakarta.annotation.Nonnull + private AccountSettingsResponseSettings settings; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable + private List warnings = null; + + public AccountSettingsResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public AccountSettingsResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsResponse.class); + } + + static public AccountSettingsResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + AccountSettingsResponse.class + ); + } + + public AccountSettingsResponse accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + } + + + public AccountSettingsResponse settings(@jakarta.annotation.Nonnull AccountSettingsResponseSettings settings) { + this.settings = settings; + return this; + } + + /** + * Get settings + * @return settings + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AccountSettingsResponseSettings getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettings(@jakarta.annotation.Nonnull AccountSettingsResponseSettings settings) { + this.settings = settings; + } + + + public AccountSettingsResponse warnings(@jakarta.annotation.Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public AccountSettingsResponse 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(@jakarta.annotation.Nullable List warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this AccountSettingsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsResponse accountSettingsResponse = (AccountSettingsResponse) o; + return Objects.equals(this.accountId, accountSettingsResponse.accountId) && + Objects.equals(this.settings, accountSettingsResponse.settings) && + Objects.equals(this.warnings, accountSettingsResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, settings, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsResponse {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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 (accountId != null) { + if (isFileTypeOrListOfFiles(accountId)) { + fileTypeFound = true; + } + + if (accountId.getClass().equals(java.io.File.class) || + accountId.getClass().equals(Integer.class) || + accountId.getClass().equals(String.class) || + accountId.getClass().isEnum()) { + map.put("account_id", accountId); + } else if (isListOfFile(accountId)) { + for(int i = 0; i< getListSize(accountId); i++) { + map.put("account_id[" + i + "]", getFromList(accountId, i)); + } + } + else { + map.put("account_id", JSON.getDefault().getMapper().writeValueAsString(accountId)); + } + } + if (settings != null) { + if (isFileTypeOrListOfFiles(settings)) { + fileTypeFound = true; + } + + if (settings.getClass().equals(java.io.File.class) || + settings.getClass().equals(Integer.class) || + settings.getClass().equals(String.class) || + settings.getClass().isEnum()) { + map.put("settings", settings); + } else if (isListOfFile(settings)) { + for(int i = 0; i< getListSize(settings); i++) { + map.put("settings[" + i + "]", getFromList(settings, i)); + } + } + else { + map.put("settings", JSON.getDefault().getMapper().writeValueAsString(settings)); + } + } + 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/AccountSettingsResponseSettings.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsResponseSettings.java new file mode 100644 index 000000000..1a29ad9ca --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsResponseSettings.java @@ -0,0 +1,1455 @@ +/* + * 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.SettingResponse; +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; +/** + * AccountSettingsResponseSettings + */ +@JsonPropertyOrder({ + AccountSettingsResponseSettings.JSON_PROPERTY_COMPANY, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + AccountSettingsResponseSettings.JSON_PROPERTY_CUSTOM_TAGLINE, + AccountSettingsResponseSettings.JSON_PROPERTY_DATE_FORMAT, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_FROM, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + AccountSettingsResponseSettings.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_AUTOCOMPLETE, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL, + AccountSettingsResponseSettings.JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS, + AccountSettingsResponseSettings.JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class AccountSettingsResponseSettings { + public static final String JSON_PROPERTY_COMPANY = "company"; + @jakarta.annotation.Nonnull + private SettingResponse company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = "custom_signing_redirect_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = "custom_signing_redirect_url"; + @jakarta.annotation.Nonnull + private SettingResponse customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @jakarta.annotation.Nonnull + private SettingResponse customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @jakarta.annotation.Nonnull + private SettingResponse dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = "is_signature_reminders_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @jakarta.annotation.Nonnull + private SettingResponse requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @jakarta.annotation.Nonnull + private SettingResponse requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @jakarta.annotation.Nonnull + private SettingResponse requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = "should_enable_tamper_proof"; + @jakarta.annotation.Nonnull + private SettingResponse shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = "should_include_distinct_pdfs"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = "should_offer_signer_access_code"; + @jakarta.annotation.Nonnull + private SettingResponse shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = "should_offer_signer_sms_authentication"; + @jakarta.annotation.Nonnull + private SettingResponse shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = "should_remove_document_id"; + @jakarta.annotation.Nonnull + private SettingResponse shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED = "is_notify_on_sign_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse isNotifyOnSignEnabled; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED = "is_notify_on_view_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse isNotifyOnViewEnabled; + + public static final String JSON_PROPERTY_SHOULD_AUTOCOMPLETE = "should_autocomplete"; + @jakarta.annotation.Nonnull + private SettingResponse shouldAutocomplete; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS = "should_include_requested_pdfs"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeRequestedPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS = "should_include_requested_pdfs_for_others"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeRequestedPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS = "should_include_sent_doc_pdfs"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeSentDocPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS = "should_include_sent_doc_pdfs_for_others"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeSentDocPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY = "should_send_daily_summary"; + @jakarta.annotation.Nonnull + private SettingResponse shouldSendDailySummary; + + public static final String JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS = "should_send_embedded_signature_conf_emails"; + @jakarta.annotation.Nonnull + private SettingResponse shouldSendEmbeddedSignatureConfEmails; + + public static final String JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL = "should_send_ordered_sr_email"; + @jakarta.annotation.Nonnull + private SettingResponse shouldSendOrderedSrEmail; + + public static final String JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS = "should_send_outbound_conf_emails"; + @jakarta.annotation.Nonnull + private SettingResponse shouldSendOutboundConfEmails; + + public static final String JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED = "template_link_signature_emails_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse templateLinkSignatureEmailsEnabled; + + public AccountSettingsResponseSettings() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public AccountSettingsResponseSettings init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsResponseSettings.class); + } + + static public AccountSettingsResponseSettings init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + AccountSettingsResponseSettings.class + ); + } + + public AccountSettingsResponseSettings company(@jakarta.annotation.Nonnull SettingResponse company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * @return company + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCompany() { + return company; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompany(@jakarta.annotation.Nonnull SettingResponse company) { + this.company = company; + } + + + public AccountSettingsResponseSettings customSigningRedirectEnabled(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * @return customSigningRedirectEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectEnabled(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + + public AccountSettingsResponseSettings customSigningRedirectUrl(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + * @return customSigningRedirectUrl + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectUrl(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + + public AccountSettingsResponseSettings customTagline(@jakarta.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * @return customTagline + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomTagline() { + return customTagline; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomTagline(@jakarta.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + } + + + public AccountSettingsResponseSettings dateFormat(@jakarta.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + * @return dateFormat + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getDateFormat() { + return dateFormat; + } + + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateFormat(@jakarta.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + } + + + public AccountSettingsResponseSettings isSignatureRemindersEnabled(@jakarta.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * @return isSignatureRemindersEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSignatureRemindersEnabled(@jakarta.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + + public AccountSettingsResponseSettings requestEmailFrom(@jakarta.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * @return requestEmailFrom + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequestEmailFrom() { + return requestEmailFrom; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailFrom(@jakarta.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + + public AccountSettingsResponseSettings requestEmailSignature(@jakarta.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * @return requestEmailSignature + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequestEmailSignature() { + return requestEmailSignature; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailSignature(@jakarta.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + + public AccountSettingsResponseSettings requiredSignatureTypes(@jakarta.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * @return requiredSignatureTypes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredSignatureTypes(@jakarta.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + + public AccountSettingsResponseSettings shouldEnableTamperProof(@jakarta.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * @return shouldEnableTamperProof + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldEnableTamperProof(@jakarta.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + + public AccountSettingsResponseSettings shouldIncludeDistinctPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + * @return shouldIncludeDistinctPdfs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeDistinctPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + + public AccountSettingsResponseSettings shouldOfferSignerAccessCode(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * @return shouldOfferSignerAccessCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerAccessCode(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + + public AccountSettingsResponseSettings shouldOfferSignerSmsAuthentication(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * @return shouldOfferSignerSmsAuthentication + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerSmsAuthentication(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + + public AccountSettingsResponseSettings shouldRemoveDocumentId(@jakarta.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * @return shouldRemoveDocumentId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldRemoveDocumentId(@jakarta.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + + public AccountSettingsResponseSettings isNotifyOnSignEnabled(@jakarta.annotation.Nonnull SettingResponse isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document it sent. + * @return isNotifyOnSignEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getIsNotifyOnSignEnabled() { + return isNotifyOnSignEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsNotifyOnSignEnabled(@jakarta.annotation.Nonnull SettingResponse isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + } + + + public AccountSettingsResponseSettings isNotifyOnViewEnabled(@jakarta.annotation.Nonnull SettingResponse isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + return this; + } + + /** + * Whether to notify the account when someone opens a document it sent. + * @return isNotifyOnViewEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getIsNotifyOnViewEnabled() { + return isNotifyOnViewEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsNotifyOnViewEnabled(@jakarta.annotation.Nonnull SettingResponse isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + } + + + public AccountSettingsResponseSettings shouldAutocomplete(@jakarta.annotation.Nonnull SettingResponse shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + return this; + } + + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + * @return shouldAutocomplete + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldAutocomplete() { + return shouldAutocomplete; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldAutocomplete(@jakarta.annotation.Nonnull SettingResponse shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + } + + + public AccountSettingsResponseSettings shouldIncludeRequestedPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + * @return shouldIncludeRequestedPdfs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeRequestedPdfs() { + return shouldIncludeRequestedPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeRequestedPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + } + + + public AccountSettingsResponseSettings shouldIncludeRequestedPdfsForOthers(@jakarta.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + * @return shouldIncludeRequestedPdfsForOthers + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeRequestedPdfsForOthers() { + return shouldIncludeRequestedPdfsForOthers; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeRequestedPdfsForOthers(@jakarta.annotation.Nonnull SettingResponse shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + } + + + public AccountSettingsResponseSettings shouldIncludeSentDocPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + return this; + } + + /** + * Whether emails sent to the account include PDF copies of documents it sends. + * @return shouldIncludeSentDocPdfs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeSentDocPdfs() { + return shouldIncludeSentDocPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeSentDocPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + } + + + public AccountSettingsResponseSettings shouldIncludeSentDocPdfsForOthers(@jakarta.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + return this; + } + + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + * @return shouldIncludeSentDocPdfsForOthers + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeSentDocPdfsForOthers() { + return shouldIncludeSentDocPdfsForOthers; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeSentDocPdfsForOthers(@jakarta.annotation.Nonnull SettingResponse shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + } + + + public AccountSettingsResponseSettings shouldSendDailySummary(@jakarta.annotation.Nonnull SettingResponse shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + return this; + } + + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + * @return shouldSendDailySummary + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldSendDailySummary() { + return shouldSendDailySummary; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendDailySummary(@jakarta.annotation.Nonnull SettingResponse shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + } + + + public AccountSettingsResponseSettings shouldSendEmbeddedSignatureConfEmails(@jakarta.annotation.Nonnull SettingResponse shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs a document on a third-party site. + * @return shouldSendEmbeddedSignatureConfEmails + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldSendEmbeddedSignatureConfEmails() { + return shouldSendEmbeddedSignatureConfEmails; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendEmbeddedSignatureConfEmails(@jakarta.annotation.Nonnull SettingResponse shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + } + + + public AccountSettingsResponseSettings shouldSendOrderedSrEmail(@jakarta.annotation.Nonnull SettingResponse shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + return this; + } + + /** + * Whether to notify all parties when an ordered signature request starts. + * @return shouldSendOrderedSrEmail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldSendOrderedSrEmail() { + return shouldSendOrderedSrEmail; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendOrderedSrEmail(@jakarta.annotation.Nonnull SettingResponse shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + } + + + public AccountSettingsResponseSettings shouldSendOutboundConfEmails(@jakarta.annotation.Nonnull SettingResponse shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs and sends a document. + * @return shouldSendOutboundConfEmails + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldSendOutboundConfEmails() { + return shouldSendOutboundConfEmails; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldSendOutboundConfEmails(@jakarta.annotation.Nonnull SettingResponse shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + } + + + public AccountSettingsResponseSettings templateLinkSignatureEmailsEnabled(@jakarta.annotation.Nonnull SettingResponse templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document sent by its team through a template link. + * @return templateLinkSignatureEmailsEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getTemplateLinkSignatureEmailsEnabled() { + return templateLinkSignatureEmailsEnabled; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateLinkSignatureEmailsEnabled(@jakarta.annotation.Nonnull SettingResponse templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + } + + + /** + * Return true if this AccountSettingsResponseSettings object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsResponseSettings accountSettingsResponseSettings = (AccountSettingsResponseSettings) o; + return Objects.equals(this.company, accountSettingsResponseSettings.company) && + Objects.equals(this.customSigningRedirectEnabled, accountSettingsResponseSettings.customSigningRedirectEnabled) && + Objects.equals(this.customSigningRedirectUrl, accountSettingsResponseSettings.customSigningRedirectUrl) && + Objects.equals(this.customTagline, accountSettingsResponseSettings.customTagline) && + Objects.equals(this.dateFormat, accountSettingsResponseSettings.dateFormat) && + Objects.equals(this.isSignatureRemindersEnabled, accountSettingsResponseSettings.isSignatureRemindersEnabled) && + Objects.equals(this.requestEmailFrom, accountSettingsResponseSettings.requestEmailFrom) && + Objects.equals(this.requestEmailSignature, accountSettingsResponseSettings.requestEmailSignature) && + Objects.equals(this.requiredSignatureTypes, accountSettingsResponseSettings.requiredSignatureTypes) && + Objects.equals(this.shouldEnableTamperProof, accountSettingsResponseSettings.shouldEnableTamperProof) && + Objects.equals(this.shouldIncludeDistinctPdfs, accountSettingsResponseSettings.shouldIncludeDistinctPdfs) && + Objects.equals(this.shouldOfferSignerAccessCode, accountSettingsResponseSettings.shouldOfferSignerAccessCode) && + Objects.equals(this.shouldOfferSignerSmsAuthentication, accountSettingsResponseSettings.shouldOfferSignerSmsAuthentication) && + Objects.equals(this.shouldRemoveDocumentId, accountSettingsResponseSettings.shouldRemoveDocumentId) && + Objects.equals(this.isNotifyOnSignEnabled, accountSettingsResponseSettings.isNotifyOnSignEnabled) && + Objects.equals(this.isNotifyOnViewEnabled, accountSettingsResponseSettings.isNotifyOnViewEnabled) && + Objects.equals(this.shouldAutocomplete, accountSettingsResponseSettings.shouldAutocomplete) && + Objects.equals(this.shouldIncludeRequestedPdfs, accountSettingsResponseSettings.shouldIncludeRequestedPdfs) && + Objects.equals(this.shouldIncludeRequestedPdfsForOthers, accountSettingsResponseSettings.shouldIncludeRequestedPdfsForOthers) && + Objects.equals(this.shouldIncludeSentDocPdfs, accountSettingsResponseSettings.shouldIncludeSentDocPdfs) && + Objects.equals(this.shouldIncludeSentDocPdfsForOthers, accountSettingsResponseSettings.shouldIncludeSentDocPdfsForOthers) && + Objects.equals(this.shouldSendDailySummary, accountSettingsResponseSettings.shouldSendDailySummary) && + Objects.equals(this.shouldSendEmbeddedSignatureConfEmails, accountSettingsResponseSettings.shouldSendEmbeddedSignatureConfEmails) && + Objects.equals(this.shouldSendOrderedSrEmail, accountSettingsResponseSettings.shouldSendOrderedSrEmail) && + Objects.equals(this.shouldSendOutboundConfEmails, accountSettingsResponseSettings.shouldSendOutboundConfEmails) && + Objects.equals(this.templateLinkSignatureEmailsEnabled, accountSettingsResponseSettings.templateLinkSignatureEmailsEnabled); + } + + @Override + public int hashCode() { + return Objects.hash(company, customSigningRedirectEnabled, customSigningRedirectUrl, customTagline, dateFormat, isSignatureRemindersEnabled, requestEmailFrom, requestEmailSignature, requiredSignatureTypes, shouldEnableTamperProof, shouldIncludeDistinctPdfs, shouldOfferSignerAccessCode, shouldOfferSignerSmsAuthentication, shouldRemoveDocumentId, isNotifyOnSignEnabled, isNotifyOnViewEnabled, shouldAutocomplete, shouldIncludeRequestedPdfs, shouldIncludeRequestedPdfsForOthers, shouldIncludeSentDocPdfs, shouldIncludeSentDocPdfsForOthers, shouldSendDailySummary, shouldSendEmbeddedSignatureConfEmails, shouldSendOrderedSrEmail, shouldSendOutboundConfEmails, templateLinkSignatureEmailsEnabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsResponseSettings {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ").append(toIndentedString(customSigningRedirectEnabled)).append("\n"); + sb.append(" customSigningRedirectUrl: ").append(toIndentedString(customSigningRedirectUrl)).append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ").append(toIndentedString(isSignatureRemindersEnabled)).append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ").append(toIndentedString(requestEmailSignature)).append("\n"); + sb.append(" requiredSignatureTypes: ").append(toIndentedString(requiredSignatureTypes)).append("\n"); + sb.append(" shouldEnableTamperProof: ").append(toIndentedString(shouldEnableTamperProof)).append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ").append(toIndentedString(shouldIncludeDistinctPdfs)).append("\n"); + sb.append(" shouldOfferSignerAccessCode: ").append(toIndentedString(shouldOfferSignerAccessCode)).append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ").append(toIndentedString(shouldOfferSignerSmsAuthentication)).append("\n"); + sb.append(" shouldRemoveDocumentId: ").append(toIndentedString(shouldRemoveDocumentId)).append("\n"); + sb.append(" isNotifyOnSignEnabled: ").append(toIndentedString(isNotifyOnSignEnabled)).append("\n"); + sb.append(" isNotifyOnViewEnabled: ").append(toIndentedString(isNotifyOnViewEnabled)).append("\n"); + sb.append(" shouldAutocomplete: ").append(toIndentedString(shouldAutocomplete)).append("\n"); + sb.append(" shouldIncludeRequestedPdfs: ").append(toIndentedString(shouldIncludeRequestedPdfs)).append("\n"); + sb.append(" shouldIncludeRequestedPdfsForOthers: ").append(toIndentedString(shouldIncludeRequestedPdfsForOthers)).append("\n"); + sb.append(" shouldIncludeSentDocPdfs: ").append(toIndentedString(shouldIncludeSentDocPdfs)).append("\n"); + sb.append(" shouldIncludeSentDocPdfsForOthers: ").append(toIndentedString(shouldIncludeSentDocPdfsForOthers)).append("\n"); + sb.append(" shouldSendDailySummary: ").append(toIndentedString(shouldSendDailySummary)).append("\n"); + sb.append(" shouldSendEmbeddedSignatureConfEmails: ").append(toIndentedString(shouldSendEmbeddedSignatureConfEmails)).append("\n"); + sb.append(" shouldSendOrderedSrEmail: ").append(toIndentedString(shouldSendOrderedSrEmail)).append("\n"); + sb.append(" shouldSendOutboundConfEmails: ").append(toIndentedString(shouldSendOutboundConfEmails)).append("\n"); + sb.append(" templateLinkSignatureEmailsEnabled: ").append(toIndentedString(templateLinkSignatureEmailsEnabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) || + company.getClass().equals(Integer.class) || + company.getClass().equals(String.class) || + company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for(int i = 0; i< getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } + else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) || + customSigningRedirectEnabled.getClass().equals(Integer.class) || + customSigningRedirectEnabled.getClass().equals(String.class) || + customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for(int i = 0; i< getListSize(customSigningRedirectEnabled); i++) { + map.put("custom_signing_redirect_enabled[" + i + "]", getFromList(customSigningRedirectEnabled, i)); + } + } + else { + map.put("custom_signing_redirect_enabled", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) || + customSigningRedirectUrl.getClass().equals(Integer.class) || + customSigningRedirectUrl.getClass().equals(String.class) || + customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for(int i = 0; i< getListSize(customSigningRedirectUrl); i++) { + map.put("custom_signing_redirect_url[" + i + "]", getFromList(customSigningRedirectUrl, i)); + } + } + else { + map.put("custom_signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) || + customTagline.getClass().equals(Integer.class) || + customTagline.getClass().equals(String.class) || + customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for(int i = 0; i< getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } + else { + map.put("custom_tagline", JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) || + dateFormat.getClass().equals(Integer.class) || + dateFormat.getClass().equals(String.class) || + dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for(int i = 0; i< getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } + else { + map.put("date_format", JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) || + isSignatureRemindersEnabled.getClass().equals(Integer.class) || + isSignatureRemindersEnabled.getClass().equals(String.class) || + isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for(int i = 0; i< getListSize(isSignatureRemindersEnabled); i++) { + map.put("is_signature_reminders_enabled[" + i + "]", getFromList(isSignatureRemindersEnabled, i)); + } + } + else { + map.put("is_signature_reminders_enabled", JSON.getDefault().getMapper().writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) || + requestEmailFrom.getClass().equals(Integer.class) || + requestEmailFrom.getClass().equals(String.class) || + requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for(int i = 0; i< getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } + else { + map.put("request_email_from", JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) || + requestEmailSignature.getClass().equals(Integer.class) || + requestEmailSignature.getClass().equals(String.class) || + requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for(int i = 0; i< getListSize(requestEmailSignature); i++) { + map.put("request_email_signature[" + i + "]", getFromList(requestEmailSignature, i)); + } + } + else { + map.put("request_email_signature", JSON.getDefault().getMapper().writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) || + requiredSignatureTypes.getClass().equals(Integer.class) || + requiredSignatureTypes.getClass().equals(String.class) || + requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for(int i = 0; i< getListSize(requiredSignatureTypes); i++) { + map.put("required_signature_types[" + i + "]", getFromList(requiredSignatureTypes, i)); + } + } + else { + map.put("required_signature_types", JSON.getDefault().getMapper().writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) || + shouldEnableTamperProof.getClass().equals(Integer.class) || + shouldEnableTamperProof.getClass().equals(String.class) || + shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for(int i = 0; i< getListSize(shouldEnableTamperProof); i++) { + map.put("should_enable_tamper_proof[" + i + "]", getFromList(shouldEnableTamperProof, i)); + } + } + else { + map.put("should_enable_tamper_proof", JSON.getDefault().getMapper().writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) || + shouldIncludeDistinctPdfs.getClass().equals(Integer.class) || + shouldIncludeDistinctPdfs.getClass().equals(String.class) || + shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeDistinctPdfs); i++) { + map.put("should_include_distinct_pdfs[" + i + "]", getFromList(shouldIncludeDistinctPdfs, i)); + } + } + else { + map.put("should_include_distinct_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) || + shouldOfferSignerAccessCode.getClass().equals(Integer.class) || + shouldOfferSignerAccessCode.getClass().equals(String.class) || + shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for(int i = 0; i< getListSize(shouldOfferSignerAccessCode); i++) { + map.put("should_offer_signer_access_code[" + i + "]", getFromList(shouldOfferSignerAccessCode, i)); + } + } + else { + map.put("should_offer_signer_access_code", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(String.class) || + shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put("should_offer_signer_sms_authentication", shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for(int i = 0; i< getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put("should_offer_signer_sms_authentication[" + i + "]", getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } + else { + map.put("should_offer_signer_sms_authentication", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) || + shouldRemoveDocumentId.getClass().equals(Integer.class) || + shouldRemoveDocumentId.getClass().equals(String.class) || + shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for(int i = 0; i< getListSize(shouldRemoveDocumentId); i++) { + map.put("should_remove_document_id[" + i + "]", getFromList(shouldRemoveDocumentId, i)); + } + } + else { + map.put("should_remove_document_id", JSON.getDefault().getMapper().writeValueAsString(shouldRemoveDocumentId)); + } + } + if (isNotifyOnSignEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnSignEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnSignEnabled.getClass().equals(java.io.File.class) || + isNotifyOnSignEnabled.getClass().equals(Integer.class) || + isNotifyOnSignEnabled.getClass().equals(String.class) || + isNotifyOnSignEnabled.getClass().isEnum()) { + map.put("is_notify_on_sign_enabled", isNotifyOnSignEnabled); + } else if (isListOfFile(isNotifyOnSignEnabled)) { + for(int i = 0; i< getListSize(isNotifyOnSignEnabled); i++) { + map.put("is_notify_on_sign_enabled[" + i + "]", getFromList(isNotifyOnSignEnabled, i)); + } + } + else { + map.put("is_notify_on_sign_enabled", JSON.getDefault().getMapper().writeValueAsString(isNotifyOnSignEnabled)); + } + } + if (isNotifyOnViewEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnViewEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnViewEnabled.getClass().equals(java.io.File.class) || + isNotifyOnViewEnabled.getClass().equals(Integer.class) || + isNotifyOnViewEnabled.getClass().equals(String.class) || + isNotifyOnViewEnabled.getClass().isEnum()) { + map.put("is_notify_on_view_enabled", isNotifyOnViewEnabled); + } else if (isListOfFile(isNotifyOnViewEnabled)) { + for(int i = 0; i< getListSize(isNotifyOnViewEnabled); i++) { + map.put("is_notify_on_view_enabled[" + i + "]", getFromList(isNotifyOnViewEnabled, i)); + } + } + else { + map.put("is_notify_on_view_enabled", JSON.getDefault().getMapper().writeValueAsString(isNotifyOnViewEnabled)); + } + } + if (shouldAutocomplete != null) { + if (isFileTypeOrListOfFiles(shouldAutocomplete)) { + fileTypeFound = true; + } + + if (shouldAutocomplete.getClass().equals(java.io.File.class) || + shouldAutocomplete.getClass().equals(Integer.class) || + shouldAutocomplete.getClass().equals(String.class) || + shouldAutocomplete.getClass().isEnum()) { + map.put("should_autocomplete", shouldAutocomplete); + } else if (isListOfFile(shouldAutocomplete)) { + for(int i = 0; i< getListSize(shouldAutocomplete); i++) { + map.put("should_autocomplete[" + i + "]", getFromList(shouldAutocomplete, i)); + } + } + else { + map.put("should_autocomplete", JSON.getDefault().getMapper().writeValueAsString(shouldAutocomplete)); + } + } + if (shouldIncludeRequestedPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfs.getClass().equals(java.io.File.class) || + shouldIncludeRequestedPdfs.getClass().equals(Integer.class) || + shouldIncludeRequestedPdfs.getClass().equals(String.class) || + shouldIncludeRequestedPdfs.getClass().isEnum()) { + map.put("should_include_requested_pdfs", shouldIncludeRequestedPdfs); + } else if (isListOfFile(shouldIncludeRequestedPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeRequestedPdfs); i++) { + map.put("should_include_requested_pdfs[" + i + "]", getFromList(shouldIncludeRequestedPdfs, i)); + } + } + else { + map.put("should_include_requested_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeRequestedPdfs)); + } + } + if (shouldIncludeRequestedPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfsForOthers.getClass().equals(java.io.File.class) || + shouldIncludeRequestedPdfsForOthers.getClass().equals(Integer.class) || + shouldIncludeRequestedPdfsForOthers.getClass().equals(String.class) || + shouldIncludeRequestedPdfsForOthers.getClass().isEnum()) { + map.put("should_include_requested_pdfs_for_others", shouldIncludeRequestedPdfsForOthers); + } else if (isListOfFile(shouldIncludeRequestedPdfsForOthers)) { + for(int i = 0; i< getListSize(shouldIncludeRequestedPdfsForOthers); i++) { + map.put("should_include_requested_pdfs_for_others[" + i + "]", getFromList(shouldIncludeRequestedPdfsForOthers, i)); + } + } + else { + map.put("should_include_requested_pdfs_for_others", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeRequestedPdfsForOthers)); + } + } + if (shouldIncludeSentDocPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfs.getClass().equals(java.io.File.class) || + shouldIncludeSentDocPdfs.getClass().equals(Integer.class) || + shouldIncludeSentDocPdfs.getClass().equals(String.class) || + shouldIncludeSentDocPdfs.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs", shouldIncludeSentDocPdfs); + } else if (isListOfFile(shouldIncludeSentDocPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeSentDocPdfs); i++) { + map.put("should_include_sent_doc_pdfs[" + i + "]", getFromList(shouldIncludeSentDocPdfs, i)); + } + } + else { + map.put("should_include_sent_doc_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeSentDocPdfs)); + } + } + if (shouldIncludeSentDocPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfsForOthers.getClass().equals(java.io.File.class) || + shouldIncludeSentDocPdfsForOthers.getClass().equals(Integer.class) || + shouldIncludeSentDocPdfsForOthers.getClass().equals(String.class) || + shouldIncludeSentDocPdfsForOthers.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs_for_others", shouldIncludeSentDocPdfsForOthers); + } else if (isListOfFile(shouldIncludeSentDocPdfsForOthers)) { + for(int i = 0; i< getListSize(shouldIncludeSentDocPdfsForOthers); i++) { + map.put("should_include_sent_doc_pdfs_for_others[" + i + "]", getFromList(shouldIncludeSentDocPdfsForOthers, i)); + } + } + else { + map.put("should_include_sent_doc_pdfs_for_others", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeSentDocPdfsForOthers)); + } + } + if (shouldSendDailySummary != null) { + if (isFileTypeOrListOfFiles(shouldSendDailySummary)) { + fileTypeFound = true; + } + + if (shouldSendDailySummary.getClass().equals(java.io.File.class) || + shouldSendDailySummary.getClass().equals(Integer.class) || + shouldSendDailySummary.getClass().equals(String.class) || + shouldSendDailySummary.getClass().isEnum()) { + map.put("should_send_daily_summary", shouldSendDailySummary); + } else if (isListOfFile(shouldSendDailySummary)) { + for(int i = 0; i< getListSize(shouldSendDailySummary); i++) { + map.put("should_send_daily_summary[" + i + "]", getFromList(shouldSendDailySummary, i)); + } + } + else { + map.put("should_send_daily_summary", JSON.getDefault().getMapper().writeValueAsString(shouldSendDailySummary)); + } + } + if (shouldSendEmbeddedSignatureConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendEmbeddedSignatureConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendEmbeddedSignatureConfEmails.getClass().equals(java.io.File.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().equals(Integer.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().equals(String.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().isEnum()) { + map.put("should_send_embedded_signature_conf_emails", shouldSendEmbeddedSignatureConfEmails); + } else if (isListOfFile(shouldSendEmbeddedSignatureConfEmails)) { + for(int i = 0; i< getListSize(shouldSendEmbeddedSignatureConfEmails); i++) { + map.put("should_send_embedded_signature_conf_emails[" + i + "]", getFromList(shouldSendEmbeddedSignatureConfEmails, i)); + } + } + else { + map.put("should_send_embedded_signature_conf_emails", JSON.getDefault().getMapper().writeValueAsString(shouldSendEmbeddedSignatureConfEmails)); + } + } + if (shouldSendOrderedSrEmail != null) { + if (isFileTypeOrListOfFiles(shouldSendOrderedSrEmail)) { + fileTypeFound = true; + } + + if (shouldSendOrderedSrEmail.getClass().equals(java.io.File.class) || + shouldSendOrderedSrEmail.getClass().equals(Integer.class) || + shouldSendOrderedSrEmail.getClass().equals(String.class) || + shouldSendOrderedSrEmail.getClass().isEnum()) { + map.put("should_send_ordered_sr_email", shouldSendOrderedSrEmail); + } else if (isListOfFile(shouldSendOrderedSrEmail)) { + for(int i = 0; i< getListSize(shouldSendOrderedSrEmail); i++) { + map.put("should_send_ordered_sr_email[" + i + "]", getFromList(shouldSendOrderedSrEmail, i)); + } + } + else { + map.put("should_send_ordered_sr_email", JSON.getDefault().getMapper().writeValueAsString(shouldSendOrderedSrEmail)); + } + } + if (shouldSendOutboundConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendOutboundConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendOutboundConfEmails.getClass().equals(java.io.File.class) || + shouldSendOutboundConfEmails.getClass().equals(Integer.class) || + shouldSendOutboundConfEmails.getClass().equals(String.class) || + shouldSendOutboundConfEmails.getClass().isEnum()) { + map.put("should_send_outbound_conf_emails", shouldSendOutboundConfEmails); + } else if (isListOfFile(shouldSendOutboundConfEmails)) { + for(int i = 0; i< getListSize(shouldSendOutboundConfEmails); i++) { + map.put("should_send_outbound_conf_emails[" + i + "]", getFromList(shouldSendOutboundConfEmails, i)); + } + } + else { + map.put("should_send_outbound_conf_emails", JSON.getDefault().getMapper().writeValueAsString(shouldSendOutboundConfEmails)); + } + } + if (templateLinkSignatureEmailsEnabled != null) { + if (isFileTypeOrListOfFiles(templateLinkSignatureEmailsEnabled)) { + fileTypeFound = true; + } + + if (templateLinkSignatureEmailsEnabled.getClass().equals(java.io.File.class) || + templateLinkSignatureEmailsEnabled.getClass().equals(Integer.class) || + templateLinkSignatureEmailsEnabled.getClass().equals(String.class) || + templateLinkSignatureEmailsEnabled.getClass().isEnum()) { + map.put("template_link_signature_emails_enabled", templateLinkSignatureEmailsEnabled); + } else if (isListOfFile(templateLinkSignatureEmailsEnabled)) { + for(int i = 0; i< getListSize(templateLinkSignatureEmailsEnabled); i++) { + map.put("template_link_signature_emails_enabled[" + i + "]", getFromList(templateLinkSignatureEmailsEnabled, i)); + } + } + else { + map.put("template_link_signature_emails_enabled", JSON.getDefault().getMapper().writeValueAsString(templateLinkSignatureEmailsEnabled)); + } + } + } 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/AccountSettingsUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsUpdateRequest.java new file mode 100644 index 000000000..dd81544dc --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountSettingsUpdateRequest.java @@ -0,0 +1,1611 @@ +/* + * 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.DateFormat; +import com.dropbox.sign.model.RequiredSignatureType; +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +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; +/** + * AccountSettingsUpdateRequest + */ +@JsonPropertyOrder({ + AccountSettingsUpdateRequest.JSON_PROPERTY_COMPANY, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + AccountSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_TAGLINE, + AccountSettingsUpdateRequest.JSON_PROPERTY_DATE_FORMAT, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_FROM, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + AccountSettingsUpdateRequest.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_AUTOCOMPLETE, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL, + AccountSettingsUpdateRequest.JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS, + AccountSettingsUpdateRequest.JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED, + AccountSettingsUpdateRequest.JSON_PROPERTY_UNSET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class AccountSettingsUpdateRequest { + public static final String JSON_PROPERTY_COMPANY = "company"; + @jakarta.annotation.Nullable + private String company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = "custom_signing_redirect_enabled"; + @jakarta.annotation.Nullable + private Boolean customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = "custom_signing_redirect_url"; + @jakarta.annotation.Nullable + private String customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @jakarta.annotation.Nullable + private String customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @jakarta.annotation.Nullable + private DateFormat dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = "is_signature_reminders_enabled"; + @jakarta.annotation.Nullable + private Boolean isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @jakarta.annotation.Nullable + private String requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @jakarta.annotation.Nullable + private String requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @jakarta.annotation.Nullable + private Set requiredSignatureTypes = null; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = "should_enable_tamper_proof"; + @jakarta.annotation.Nullable + private Boolean shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = "should_include_distinct_pdfs"; + @jakarta.annotation.Nullable + private Boolean shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = "should_offer_signer_access_code"; + @jakarta.annotation.Nullable + private Boolean shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = "should_offer_signer_sms_authentication"; + @jakarta.annotation.Nullable + private Boolean shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = "should_remove_document_id"; + @jakarta.annotation.Nullable + private Boolean shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED = "is_notify_on_sign_enabled"; + @jakarta.annotation.Nullable + private Boolean isNotifyOnSignEnabled; + + public static final String JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED = "is_notify_on_view_enabled"; + @jakarta.annotation.Nullable + private Boolean isNotifyOnViewEnabled; + + public static final String JSON_PROPERTY_SHOULD_AUTOCOMPLETE = "should_autocomplete"; + @jakarta.annotation.Nullable + private Boolean shouldAutocomplete; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS = "should_include_requested_pdfs"; + @jakarta.annotation.Nullable + private Boolean shouldIncludeRequestedPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS = "should_include_requested_pdfs_for_others"; + @jakarta.annotation.Nullable + private Boolean shouldIncludeRequestedPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS = "should_include_sent_doc_pdfs"; + @jakarta.annotation.Nullable + private Boolean shouldIncludeSentDocPdfs; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS = "should_include_sent_doc_pdfs_for_others"; + @jakarta.annotation.Nullable + private Boolean shouldIncludeSentDocPdfsForOthers; + + public static final String JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY = "should_send_daily_summary"; + @jakarta.annotation.Nullable + private Boolean shouldSendDailySummary; + + public static final String JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS = "should_send_embedded_signature_conf_emails"; + @jakarta.annotation.Nullable + private Boolean shouldSendEmbeddedSignatureConfEmails; + + public static final String JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL = "should_send_ordered_sr_email"; + @jakarta.annotation.Nullable + private Boolean shouldSendOrderedSrEmail; + + public static final String JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS = "should_send_outbound_conf_emails"; + @jakarta.annotation.Nullable + private Boolean shouldSendOutboundConfEmails; + + public static final String JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED = "template_link_signature_emails_enabled"; + @jakarta.annotation.Nullable + private Boolean templateLinkSignatureEmailsEnabled; + + /** + * Gets or Sets unset + */ + public enum UnsetEnum { + COMPANY(String.valueOf("company")), + + CUSTOM_SIGNING_REDIRECT_ENABLED(String.valueOf("custom_signing_redirect_enabled")), + + CUSTOM_SIGNING_REDIRECT_URL(String.valueOf("custom_signing_redirect_url")), + + CUSTOM_TAGLINE(String.valueOf("custom_tagline")), + + DATE_FORMAT(String.valueOf("date_format")), + + IS_SIGNATURE_REMINDERS_ENABLED(String.valueOf("is_signature_reminders_enabled")), + + REQUEST_EMAIL_FROM(String.valueOf("request_email_from")), + + REQUEST_EMAIL_SIGNATURE(String.valueOf("request_email_signature")), + + REQUIRED_SIGNATURE_TYPES(String.valueOf("required_signature_types")), + + SHOULD_ENABLE_TAMPER_PROOF(String.valueOf("should_enable_tamper_proof")), + + SHOULD_INCLUDE_DISTINCT_PDFS(String.valueOf("should_include_distinct_pdfs")), + + SHOULD_OFFER_SIGNER_ACCESS_CODE(String.valueOf("should_offer_signer_access_code")), + + SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION(String.valueOf("should_offer_signer_sms_authentication")), + + SHOULD_REMOVE_DOCUMENT_ID(String.valueOf("should_remove_document_id")), + + IS_NOTIFY_ON_SIGN_ENABLED(String.valueOf("is_notify_on_sign_enabled")), + + IS_NOTIFY_ON_VIEW_ENABLED(String.valueOf("is_notify_on_view_enabled")), + + SHOULD_AUTOCOMPLETE(String.valueOf("should_autocomplete")), + + SHOULD_INCLUDE_REQUESTED_PDFS(String.valueOf("should_include_requested_pdfs")), + + SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS(String.valueOf("should_include_requested_pdfs_for_others")), + + SHOULD_INCLUDE_SENT_DOC_PDFS(String.valueOf("should_include_sent_doc_pdfs")), + + SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS(String.valueOf("should_include_sent_doc_pdfs_for_others")), + + SHOULD_SEND_DAILY_SUMMARY(String.valueOf("should_send_daily_summary")), + + SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS(String.valueOf("should_send_embedded_signature_conf_emails")), + + SHOULD_SEND_ORDERED_SR_EMAIL(String.valueOf("should_send_ordered_sr_email")), + + SHOULD_SEND_OUTBOUND_CONF_EMAILS(String.valueOf("should_send_outbound_conf_emails")), + + TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED(String.valueOf("template_link_signature_emails_enabled")); + + private String value; + + UnsetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UnsetEnum fromValue(String value) { + for (UnsetEnum b : UnsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_UNSET = "unset"; + @jakarta.annotation.Nullable + private Set unset = null; + + public AccountSettingsUpdateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public AccountSettingsUpdateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, AccountSettingsUpdateRequest.class); + } + + static public AccountSettingsUpdateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + AccountSettingsUpdateRequest.class + ); + } + + public AccountSettingsUpdateRequest company(@jakarta.annotation.Nullable String company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * @return company + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCompany() { + return company; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompany(@jakarta.annotation.Nullable String company) { + this.company = company; + } + + + public AccountSettingsUpdateRequest customSigningRedirectEnabled(@jakarta.annotation.Nullable Boolean customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * @return customSigningRedirectEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectEnabled(@jakarta.annotation.Nullable Boolean customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + + public AccountSettingsUpdateRequest customSigningRedirectUrl(@jakarta.annotation.Nullable String customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + * @return customSigningRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectUrl(@jakarta.annotation.Nullable String customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + + public AccountSettingsUpdateRequest customTagline(@jakarta.annotation.Nullable String customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * @return customTagline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCustomTagline() { + return customTagline; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomTagline(@jakarta.annotation.Nullable String customTagline) { + this.customTagline = customTagline; + } + + + public AccountSettingsUpdateRequest dateFormat(@jakarta.annotation.Nullable DateFormat dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Get dateFormat + * @return dateFormat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DateFormat getDateFormat() { + return dateFormat; + } + + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateFormat(@jakarta.annotation.Nullable DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + + public AccountSettingsUpdateRequest isSignatureRemindersEnabled(@jakarta.annotation.Nullable Boolean isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * @return isSignatureRemindersEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsSignatureRemindersEnabled(@jakarta.annotation.Nullable Boolean isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + + public AccountSettingsUpdateRequest requestEmailFrom(@jakarta.annotation.Nullable String requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * @return requestEmailFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRequestEmailFrom() { + return requestEmailFrom; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailFrom(@jakarta.annotation.Nullable String requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + + public AccountSettingsUpdateRequest requestEmailSignature(@jakarta.annotation.Nullable String requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * @return requestEmailSignature + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRequestEmailSignature() { + return requestEmailSignature; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailSignature(@jakarta.annotation.Nullable String requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + + public AccountSettingsUpdateRequest requiredSignatureTypes(@jakarta.annotation.Nullable Set requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + public AccountSettingsUpdateRequest addRequiredSignatureTypesItem(RequiredSignatureType requiredSignatureTypesItem) { + if (this.requiredSignatureTypes == null) { + this.requiredSignatureTypes = new LinkedHashSet<>(); + } + this.requiredSignatureTypes.add(requiredSignatureTypesItem); + return this; + } + + /** + * Signature creation methods signers may use. + * @return requiredSignatureTypes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Set getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredSignatureTypes(@jakarta.annotation.Nullable Set requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + + public AccountSettingsUpdateRequest shouldEnableTamperProof(@jakarta.annotation.Nullable Boolean shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * @return shouldEnableTamperProof + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldEnableTamperProof(@jakarta.annotation.Nullable Boolean shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + + public AccountSettingsUpdateRequest shouldIncludeDistinctPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + * @return shouldIncludeDistinctPdfs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeDistinctPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + + public AccountSettingsUpdateRequest shouldOfferSignerAccessCode(@jakarta.annotation.Nullable Boolean shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * @return shouldOfferSignerAccessCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerAccessCode(@jakarta.annotation.Nullable Boolean shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + + public AccountSettingsUpdateRequest shouldOfferSignerSmsAuthentication(@jakarta.annotation.Nullable Boolean shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * @return shouldOfferSignerSmsAuthentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerSmsAuthentication(@jakarta.annotation.Nullable Boolean shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + + public AccountSettingsUpdateRequest shouldRemoveDocumentId(@jakarta.annotation.Nullable Boolean shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * @return shouldRemoveDocumentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldRemoveDocumentId(@jakarta.annotation.Nullable Boolean shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + + public AccountSettingsUpdateRequest isNotifyOnSignEnabled(@jakarta.annotation.Nullable Boolean isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document it sent. + * @return isNotifyOnSignEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsNotifyOnSignEnabled() { + return isNotifyOnSignEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_SIGN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNotifyOnSignEnabled(@jakarta.annotation.Nullable Boolean isNotifyOnSignEnabled) { + this.isNotifyOnSignEnabled = isNotifyOnSignEnabled; + } + + + public AccountSettingsUpdateRequest isNotifyOnViewEnabled(@jakarta.annotation.Nullable Boolean isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + return this; + } + + /** + * Whether to notify the account when someone opens a document it sent. + * @return isNotifyOnViewEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsNotifyOnViewEnabled() { + return isNotifyOnViewEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_NOTIFY_ON_VIEW_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsNotifyOnViewEnabled(@jakarta.annotation.Nullable Boolean isNotifyOnViewEnabled) { + this.isNotifyOnViewEnabled = isNotifyOnViewEnabled; + } + + + public AccountSettingsUpdateRequest shouldAutocomplete(@jakarta.annotation.Nullable Boolean shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + return this; + } + + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + * @return shouldAutocomplete + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldAutocomplete() { + return shouldAutocomplete; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_AUTOCOMPLETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldAutocomplete(@jakarta.annotation.Nullable Boolean shouldAutocomplete) { + this.shouldAutocomplete = shouldAutocomplete; + } + + + public AccountSettingsUpdateRequest shouldIncludeRequestedPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + * @return shouldIncludeRequestedPdfs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldIncludeRequestedPdfs() { + return shouldIncludeRequestedPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeRequestedPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeRequestedPdfs) { + this.shouldIncludeRequestedPdfs = shouldIncludeRequestedPdfs; + } + + + public AccountSettingsUpdateRequest shouldIncludeRequestedPdfsForOthers(@jakarta.annotation.Nullable Boolean shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + return this; + } + + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + * @return shouldIncludeRequestedPdfsForOthers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldIncludeRequestedPdfsForOthers() { + return shouldIncludeRequestedPdfsForOthers; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeRequestedPdfsForOthers(@jakarta.annotation.Nullable Boolean shouldIncludeRequestedPdfsForOthers) { + this.shouldIncludeRequestedPdfsForOthers = shouldIncludeRequestedPdfsForOthers; + } + + + public AccountSettingsUpdateRequest shouldIncludeSentDocPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + return this; + } + + /** + * Whether emails sent to the account include PDF copies of documents it sends. + * @return shouldIncludeSentDocPdfs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldIncludeSentDocPdfs() { + return shouldIncludeSentDocPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeSentDocPdfs(@jakarta.annotation.Nullable Boolean shouldIncludeSentDocPdfs) { + this.shouldIncludeSentDocPdfs = shouldIncludeSentDocPdfs; + } + + + public AccountSettingsUpdateRequest shouldIncludeSentDocPdfsForOthers(@jakarta.annotation.Nullable Boolean shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + return this; + } + + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + * @return shouldIncludeSentDocPdfsForOthers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldIncludeSentDocPdfsForOthers() { + return shouldIncludeSentDocPdfsForOthers; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeSentDocPdfsForOthers(@jakarta.annotation.Nullable Boolean shouldIncludeSentDocPdfsForOthers) { + this.shouldIncludeSentDocPdfsForOthers = shouldIncludeSentDocPdfsForOthers; + } + + + public AccountSettingsUpdateRequest shouldSendDailySummary(@jakarta.annotation.Nullable Boolean shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + return this; + } + + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + * @return shouldSendDailySummary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldSendDailySummary() { + return shouldSendDailySummary; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_DAILY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendDailySummary(@jakarta.annotation.Nullable Boolean shouldSendDailySummary) { + this.shouldSendDailySummary = shouldSendDailySummary; + } + + + public AccountSettingsUpdateRequest shouldSendEmbeddedSignatureConfEmails(@jakarta.annotation.Nullable Boolean shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs a document on a third-party site. + * @return shouldSendEmbeddedSignatureConfEmails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldSendEmbeddedSignatureConfEmails() { + return shouldSendEmbeddedSignatureConfEmails; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendEmbeddedSignatureConfEmails(@jakarta.annotation.Nullable Boolean shouldSendEmbeddedSignatureConfEmails) { + this.shouldSendEmbeddedSignatureConfEmails = shouldSendEmbeddedSignatureConfEmails; + } + + + public AccountSettingsUpdateRequest shouldSendOrderedSrEmail(@jakarta.annotation.Nullable Boolean shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + return this; + } + + /** + * Whether to notify all parties when an ordered signature request starts. + * @return shouldSendOrderedSrEmail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldSendOrderedSrEmail() { + return shouldSendOrderedSrEmail; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_ORDERED_SR_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendOrderedSrEmail(@jakarta.annotation.Nullable Boolean shouldSendOrderedSrEmail) { + this.shouldSendOrderedSrEmail = shouldSendOrderedSrEmail; + } + + + public AccountSettingsUpdateRequest shouldSendOutboundConfEmails(@jakarta.annotation.Nullable Boolean shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + return this; + } + + /** + * Whether to notify the account when it signs and sends a document. + * @return shouldSendOutboundConfEmails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShouldSendOutboundConfEmails() { + return shouldSendOutboundConfEmails; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_SEND_OUTBOUND_CONF_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldSendOutboundConfEmails(@jakarta.annotation.Nullable Boolean shouldSendOutboundConfEmails) { + this.shouldSendOutboundConfEmails = shouldSendOutboundConfEmails; + } + + + public AccountSettingsUpdateRequest templateLinkSignatureEmailsEnabled(@jakarta.annotation.Nullable Boolean templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + return this; + } + + /** + * Whether to notify the account when someone signs a document sent by its team through a template link. + * @return templateLinkSignatureEmailsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getTemplateLinkSignatureEmailsEnabled() { + return templateLinkSignatureEmailsEnabled; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateLinkSignatureEmailsEnabled(@jakarta.annotation.Nullable Boolean templateLinkSignatureEmailsEnabled) { + this.templateLinkSignatureEmailsEnabled = templateLinkSignatureEmailsEnabled; + } + + + public AccountSettingsUpdateRequest unset(@jakarta.annotation.Nullable Set unset) { + this.unset = unset; + return this; + } + + public AccountSettingsUpdateRequest addUnsetItem(UnsetEnum unsetItem) { + if (this.unset == null) { + this.unset = new LinkedHashSet<>(); + } + this.unset.add(unsetItem); + return this; + } + + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + * @return unset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Set getUnset() { + return unset; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnset(@jakarta.annotation.Nullable Set unset) { + this.unset = unset; + } + + + /** + * Return true if this AccountSettingsUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountSettingsUpdateRequest accountSettingsUpdateRequest = (AccountSettingsUpdateRequest) o; + return Objects.equals(this.company, accountSettingsUpdateRequest.company) && + Objects.equals(this.customSigningRedirectEnabled, accountSettingsUpdateRequest.customSigningRedirectEnabled) && + Objects.equals(this.customSigningRedirectUrl, accountSettingsUpdateRequest.customSigningRedirectUrl) && + Objects.equals(this.customTagline, accountSettingsUpdateRequest.customTagline) && + Objects.equals(this.dateFormat, accountSettingsUpdateRequest.dateFormat) && + Objects.equals(this.isSignatureRemindersEnabled, accountSettingsUpdateRequest.isSignatureRemindersEnabled) && + Objects.equals(this.requestEmailFrom, accountSettingsUpdateRequest.requestEmailFrom) && + Objects.equals(this.requestEmailSignature, accountSettingsUpdateRequest.requestEmailSignature) && + Objects.equals(this.requiredSignatureTypes, accountSettingsUpdateRequest.requiredSignatureTypes) && + Objects.equals(this.shouldEnableTamperProof, accountSettingsUpdateRequest.shouldEnableTamperProof) && + Objects.equals(this.shouldIncludeDistinctPdfs, accountSettingsUpdateRequest.shouldIncludeDistinctPdfs) && + Objects.equals(this.shouldOfferSignerAccessCode, accountSettingsUpdateRequest.shouldOfferSignerAccessCode) && + Objects.equals(this.shouldOfferSignerSmsAuthentication, accountSettingsUpdateRequest.shouldOfferSignerSmsAuthentication) && + Objects.equals(this.shouldRemoveDocumentId, accountSettingsUpdateRequest.shouldRemoveDocumentId) && + Objects.equals(this.isNotifyOnSignEnabled, accountSettingsUpdateRequest.isNotifyOnSignEnabled) && + Objects.equals(this.isNotifyOnViewEnabled, accountSettingsUpdateRequest.isNotifyOnViewEnabled) && + Objects.equals(this.shouldAutocomplete, accountSettingsUpdateRequest.shouldAutocomplete) && + Objects.equals(this.shouldIncludeRequestedPdfs, accountSettingsUpdateRequest.shouldIncludeRequestedPdfs) && + Objects.equals(this.shouldIncludeRequestedPdfsForOthers, accountSettingsUpdateRequest.shouldIncludeRequestedPdfsForOthers) && + Objects.equals(this.shouldIncludeSentDocPdfs, accountSettingsUpdateRequest.shouldIncludeSentDocPdfs) && + Objects.equals(this.shouldIncludeSentDocPdfsForOthers, accountSettingsUpdateRequest.shouldIncludeSentDocPdfsForOthers) && + Objects.equals(this.shouldSendDailySummary, accountSettingsUpdateRequest.shouldSendDailySummary) && + Objects.equals(this.shouldSendEmbeddedSignatureConfEmails, accountSettingsUpdateRequest.shouldSendEmbeddedSignatureConfEmails) && + Objects.equals(this.shouldSendOrderedSrEmail, accountSettingsUpdateRequest.shouldSendOrderedSrEmail) && + Objects.equals(this.shouldSendOutboundConfEmails, accountSettingsUpdateRequest.shouldSendOutboundConfEmails) && + Objects.equals(this.templateLinkSignatureEmailsEnabled, accountSettingsUpdateRequest.templateLinkSignatureEmailsEnabled) && + Objects.equals(this.unset, accountSettingsUpdateRequest.unset); + } + + @Override + public int hashCode() { + return Objects.hash(company, customSigningRedirectEnabled, customSigningRedirectUrl, customTagline, dateFormat, isSignatureRemindersEnabled, requestEmailFrom, requestEmailSignature, requiredSignatureTypes, shouldEnableTamperProof, shouldIncludeDistinctPdfs, shouldOfferSignerAccessCode, shouldOfferSignerSmsAuthentication, shouldRemoveDocumentId, isNotifyOnSignEnabled, isNotifyOnViewEnabled, shouldAutocomplete, shouldIncludeRequestedPdfs, shouldIncludeRequestedPdfsForOthers, shouldIncludeSentDocPdfs, shouldIncludeSentDocPdfsForOthers, shouldSendDailySummary, shouldSendEmbeddedSignatureConfEmails, shouldSendOrderedSrEmail, shouldSendOutboundConfEmails, templateLinkSignatureEmailsEnabled, unset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountSettingsUpdateRequest {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ").append(toIndentedString(customSigningRedirectEnabled)).append("\n"); + sb.append(" customSigningRedirectUrl: ").append(toIndentedString(customSigningRedirectUrl)).append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ").append(toIndentedString(isSignatureRemindersEnabled)).append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ").append(toIndentedString(requestEmailSignature)).append("\n"); + sb.append(" requiredSignatureTypes: ").append(toIndentedString(requiredSignatureTypes)).append("\n"); + sb.append(" shouldEnableTamperProof: ").append(toIndentedString(shouldEnableTamperProof)).append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ").append(toIndentedString(shouldIncludeDistinctPdfs)).append("\n"); + sb.append(" shouldOfferSignerAccessCode: ").append(toIndentedString(shouldOfferSignerAccessCode)).append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ").append(toIndentedString(shouldOfferSignerSmsAuthentication)).append("\n"); + sb.append(" shouldRemoveDocumentId: ").append(toIndentedString(shouldRemoveDocumentId)).append("\n"); + sb.append(" isNotifyOnSignEnabled: ").append(toIndentedString(isNotifyOnSignEnabled)).append("\n"); + sb.append(" isNotifyOnViewEnabled: ").append(toIndentedString(isNotifyOnViewEnabled)).append("\n"); + sb.append(" shouldAutocomplete: ").append(toIndentedString(shouldAutocomplete)).append("\n"); + sb.append(" shouldIncludeRequestedPdfs: ").append(toIndentedString(shouldIncludeRequestedPdfs)).append("\n"); + sb.append(" shouldIncludeRequestedPdfsForOthers: ").append(toIndentedString(shouldIncludeRequestedPdfsForOthers)).append("\n"); + sb.append(" shouldIncludeSentDocPdfs: ").append(toIndentedString(shouldIncludeSentDocPdfs)).append("\n"); + sb.append(" shouldIncludeSentDocPdfsForOthers: ").append(toIndentedString(shouldIncludeSentDocPdfsForOthers)).append("\n"); + sb.append(" shouldSendDailySummary: ").append(toIndentedString(shouldSendDailySummary)).append("\n"); + sb.append(" shouldSendEmbeddedSignatureConfEmails: ").append(toIndentedString(shouldSendEmbeddedSignatureConfEmails)).append("\n"); + sb.append(" shouldSendOrderedSrEmail: ").append(toIndentedString(shouldSendOrderedSrEmail)).append("\n"); + sb.append(" shouldSendOutboundConfEmails: ").append(toIndentedString(shouldSendOutboundConfEmails)).append("\n"); + sb.append(" templateLinkSignatureEmailsEnabled: ").append(toIndentedString(templateLinkSignatureEmailsEnabled)).append("\n"); + sb.append(" unset: ").append(toIndentedString(unset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) || + company.getClass().equals(Integer.class) || + company.getClass().equals(String.class) || + company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for(int i = 0; i< getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } + else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) || + customSigningRedirectEnabled.getClass().equals(Integer.class) || + customSigningRedirectEnabled.getClass().equals(String.class) || + customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for(int i = 0; i< getListSize(customSigningRedirectEnabled); i++) { + map.put("custom_signing_redirect_enabled[" + i + "]", getFromList(customSigningRedirectEnabled, i)); + } + } + else { + map.put("custom_signing_redirect_enabled", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) || + customSigningRedirectUrl.getClass().equals(Integer.class) || + customSigningRedirectUrl.getClass().equals(String.class) || + customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for(int i = 0; i< getListSize(customSigningRedirectUrl); i++) { + map.put("custom_signing_redirect_url[" + i + "]", getFromList(customSigningRedirectUrl, i)); + } + } + else { + map.put("custom_signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) || + customTagline.getClass().equals(Integer.class) || + customTagline.getClass().equals(String.class) || + customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for(int i = 0; i< getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } + else { + map.put("custom_tagline", JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) || + dateFormat.getClass().equals(Integer.class) || + dateFormat.getClass().equals(String.class) || + dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for(int i = 0; i< getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } + else { + map.put("date_format", JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) || + isSignatureRemindersEnabled.getClass().equals(Integer.class) || + isSignatureRemindersEnabled.getClass().equals(String.class) || + isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for(int i = 0; i< getListSize(isSignatureRemindersEnabled); i++) { + map.put("is_signature_reminders_enabled[" + i + "]", getFromList(isSignatureRemindersEnabled, i)); + } + } + else { + map.put("is_signature_reminders_enabled", JSON.getDefault().getMapper().writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) || + requestEmailFrom.getClass().equals(Integer.class) || + requestEmailFrom.getClass().equals(String.class) || + requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for(int i = 0; i< getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } + else { + map.put("request_email_from", JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) || + requestEmailSignature.getClass().equals(Integer.class) || + requestEmailSignature.getClass().equals(String.class) || + requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for(int i = 0; i< getListSize(requestEmailSignature); i++) { + map.put("request_email_signature[" + i + "]", getFromList(requestEmailSignature, i)); + } + } + else { + map.put("request_email_signature", JSON.getDefault().getMapper().writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) || + requiredSignatureTypes.getClass().equals(Integer.class) || + requiredSignatureTypes.getClass().equals(String.class) || + requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for(int i = 0; i< getListSize(requiredSignatureTypes); i++) { + map.put("required_signature_types[" + i + "]", getFromList(requiredSignatureTypes, i)); + } + } + else { + map.put("required_signature_types", JSON.getDefault().getMapper().writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) || + shouldEnableTamperProof.getClass().equals(Integer.class) || + shouldEnableTamperProof.getClass().equals(String.class) || + shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for(int i = 0; i< getListSize(shouldEnableTamperProof); i++) { + map.put("should_enable_tamper_proof[" + i + "]", getFromList(shouldEnableTamperProof, i)); + } + } + else { + map.put("should_enable_tamper_proof", JSON.getDefault().getMapper().writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) || + shouldIncludeDistinctPdfs.getClass().equals(Integer.class) || + shouldIncludeDistinctPdfs.getClass().equals(String.class) || + shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeDistinctPdfs); i++) { + map.put("should_include_distinct_pdfs[" + i + "]", getFromList(shouldIncludeDistinctPdfs, i)); + } + } + else { + map.put("should_include_distinct_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) || + shouldOfferSignerAccessCode.getClass().equals(Integer.class) || + shouldOfferSignerAccessCode.getClass().equals(String.class) || + shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for(int i = 0; i< getListSize(shouldOfferSignerAccessCode); i++) { + map.put("should_offer_signer_access_code[" + i + "]", getFromList(shouldOfferSignerAccessCode, i)); + } + } + else { + map.put("should_offer_signer_access_code", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(String.class) || + shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put("should_offer_signer_sms_authentication", shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for(int i = 0; i< getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put("should_offer_signer_sms_authentication[" + i + "]", getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } + else { + map.put("should_offer_signer_sms_authentication", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) || + shouldRemoveDocumentId.getClass().equals(Integer.class) || + shouldRemoveDocumentId.getClass().equals(String.class) || + shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for(int i = 0; i< getListSize(shouldRemoveDocumentId); i++) { + map.put("should_remove_document_id[" + i + "]", getFromList(shouldRemoveDocumentId, i)); + } + } + else { + map.put("should_remove_document_id", JSON.getDefault().getMapper().writeValueAsString(shouldRemoveDocumentId)); + } + } + if (isNotifyOnSignEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnSignEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnSignEnabled.getClass().equals(java.io.File.class) || + isNotifyOnSignEnabled.getClass().equals(Integer.class) || + isNotifyOnSignEnabled.getClass().equals(String.class) || + isNotifyOnSignEnabled.getClass().isEnum()) { + map.put("is_notify_on_sign_enabled", isNotifyOnSignEnabled); + } else if (isListOfFile(isNotifyOnSignEnabled)) { + for(int i = 0; i< getListSize(isNotifyOnSignEnabled); i++) { + map.put("is_notify_on_sign_enabled[" + i + "]", getFromList(isNotifyOnSignEnabled, i)); + } + } + else { + map.put("is_notify_on_sign_enabled", JSON.getDefault().getMapper().writeValueAsString(isNotifyOnSignEnabled)); + } + } + if (isNotifyOnViewEnabled != null) { + if (isFileTypeOrListOfFiles(isNotifyOnViewEnabled)) { + fileTypeFound = true; + } + + if (isNotifyOnViewEnabled.getClass().equals(java.io.File.class) || + isNotifyOnViewEnabled.getClass().equals(Integer.class) || + isNotifyOnViewEnabled.getClass().equals(String.class) || + isNotifyOnViewEnabled.getClass().isEnum()) { + map.put("is_notify_on_view_enabled", isNotifyOnViewEnabled); + } else if (isListOfFile(isNotifyOnViewEnabled)) { + for(int i = 0; i< getListSize(isNotifyOnViewEnabled); i++) { + map.put("is_notify_on_view_enabled[" + i + "]", getFromList(isNotifyOnViewEnabled, i)); + } + } + else { + map.put("is_notify_on_view_enabled", JSON.getDefault().getMapper().writeValueAsString(isNotifyOnViewEnabled)); + } + } + if (shouldAutocomplete != null) { + if (isFileTypeOrListOfFiles(shouldAutocomplete)) { + fileTypeFound = true; + } + + if (shouldAutocomplete.getClass().equals(java.io.File.class) || + shouldAutocomplete.getClass().equals(Integer.class) || + shouldAutocomplete.getClass().equals(String.class) || + shouldAutocomplete.getClass().isEnum()) { + map.put("should_autocomplete", shouldAutocomplete); + } else if (isListOfFile(shouldAutocomplete)) { + for(int i = 0; i< getListSize(shouldAutocomplete); i++) { + map.put("should_autocomplete[" + i + "]", getFromList(shouldAutocomplete, i)); + } + } + else { + map.put("should_autocomplete", JSON.getDefault().getMapper().writeValueAsString(shouldAutocomplete)); + } + } + if (shouldIncludeRequestedPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfs.getClass().equals(java.io.File.class) || + shouldIncludeRequestedPdfs.getClass().equals(Integer.class) || + shouldIncludeRequestedPdfs.getClass().equals(String.class) || + shouldIncludeRequestedPdfs.getClass().isEnum()) { + map.put("should_include_requested_pdfs", shouldIncludeRequestedPdfs); + } else if (isListOfFile(shouldIncludeRequestedPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeRequestedPdfs); i++) { + map.put("should_include_requested_pdfs[" + i + "]", getFromList(shouldIncludeRequestedPdfs, i)); + } + } + else { + map.put("should_include_requested_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeRequestedPdfs)); + } + } + if (shouldIncludeRequestedPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeRequestedPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeRequestedPdfsForOthers.getClass().equals(java.io.File.class) || + shouldIncludeRequestedPdfsForOthers.getClass().equals(Integer.class) || + shouldIncludeRequestedPdfsForOthers.getClass().equals(String.class) || + shouldIncludeRequestedPdfsForOthers.getClass().isEnum()) { + map.put("should_include_requested_pdfs_for_others", shouldIncludeRequestedPdfsForOthers); + } else if (isListOfFile(shouldIncludeRequestedPdfsForOthers)) { + for(int i = 0; i< getListSize(shouldIncludeRequestedPdfsForOthers); i++) { + map.put("should_include_requested_pdfs_for_others[" + i + "]", getFromList(shouldIncludeRequestedPdfsForOthers, i)); + } + } + else { + map.put("should_include_requested_pdfs_for_others", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeRequestedPdfsForOthers)); + } + } + if (shouldIncludeSentDocPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfs.getClass().equals(java.io.File.class) || + shouldIncludeSentDocPdfs.getClass().equals(Integer.class) || + shouldIncludeSentDocPdfs.getClass().equals(String.class) || + shouldIncludeSentDocPdfs.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs", shouldIncludeSentDocPdfs); + } else if (isListOfFile(shouldIncludeSentDocPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeSentDocPdfs); i++) { + map.put("should_include_sent_doc_pdfs[" + i + "]", getFromList(shouldIncludeSentDocPdfs, i)); + } + } + else { + map.put("should_include_sent_doc_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeSentDocPdfs)); + } + } + if (shouldIncludeSentDocPdfsForOthers != null) { + if (isFileTypeOrListOfFiles(shouldIncludeSentDocPdfsForOthers)) { + fileTypeFound = true; + } + + if (shouldIncludeSentDocPdfsForOthers.getClass().equals(java.io.File.class) || + shouldIncludeSentDocPdfsForOthers.getClass().equals(Integer.class) || + shouldIncludeSentDocPdfsForOthers.getClass().equals(String.class) || + shouldIncludeSentDocPdfsForOthers.getClass().isEnum()) { + map.put("should_include_sent_doc_pdfs_for_others", shouldIncludeSentDocPdfsForOthers); + } else if (isListOfFile(shouldIncludeSentDocPdfsForOthers)) { + for(int i = 0; i< getListSize(shouldIncludeSentDocPdfsForOthers); i++) { + map.put("should_include_sent_doc_pdfs_for_others[" + i + "]", getFromList(shouldIncludeSentDocPdfsForOthers, i)); + } + } + else { + map.put("should_include_sent_doc_pdfs_for_others", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeSentDocPdfsForOthers)); + } + } + if (shouldSendDailySummary != null) { + if (isFileTypeOrListOfFiles(shouldSendDailySummary)) { + fileTypeFound = true; + } + + if (shouldSendDailySummary.getClass().equals(java.io.File.class) || + shouldSendDailySummary.getClass().equals(Integer.class) || + shouldSendDailySummary.getClass().equals(String.class) || + shouldSendDailySummary.getClass().isEnum()) { + map.put("should_send_daily_summary", shouldSendDailySummary); + } else if (isListOfFile(shouldSendDailySummary)) { + for(int i = 0; i< getListSize(shouldSendDailySummary); i++) { + map.put("should_send_daily_summary[" + i + "]", getFromList(shouldSendDailySummary, i)); + } + } + else { + map.put("should_send_daily_summary", JSON.getDefault().getMapper().writeValueAsString(shouldSendDailySummary)); + } + } + if (shouldSendEmbeddedSignatureConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendEmbeddedSignatureConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendEmbeddedSignatureConfEmails.getClass().equals(java.io.File.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().equals(Integer.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().equals(String.class) || + shouldSendEmbeddedSignatureConfEmails.getClass().isEnum()) { + map.put("should_send_embedded_signature_conf_emails", shouldSendEmbeddedSignatureConfEmails); + } else if (isListOfFile(shouldSendEmbeddedSignatureConfEmails)) { + for(int i = 0; i< getListSize(shouldSendEmbeddedSignatureConfEmails); i++) { + map.put("should_send_embedded_signature_conf_emails[" + i + "]", getFromList(shouldSendEmbeddedSignatureConfEmails, i)); + } + } + else { + map.put("should_send_embedded_signature_conf_emails", JSON.getDefault().getMapper().writeValueAsString(shouldSendEmbeddedSignatureConfEmails)); + } + } + if (shouldSendOrderedSrEmail != null) { + if (isFileTypeOrListOfFiles(shouldSendOrderedSrEmail)) { + fileTypeFound = true; + } + + if (shouldSendOrderedSrEmail.getClass().equals(java.io.File.class) || + shouldSendOrderedSrEmail.getClass().equals(Integer.class) || + shouldSendOrderedSrEmail.getClass().equals(String.class) || + shouldSendOrderedSrEmail.getClass().isEnum()) { + map.put("should_send_ordered_sr_email", shouldSendOrderedSrEmail); + } else if (isListOfFile(shouldSendOrderedSrEmail)) { + for(int i = 0; i< getListSize(shouldSendOrderedSrEmail); i++) { + map.put("should_send_ordered_sr_email[" + i + "]", getFromList(shouldSendOrderedSrEmail, i)); + } + } + else { + map.put("should_send_ordered_sr_email", JSON.getDefault().getMapper().writeValueAsString(shouldSendOrderedSrEmail)); + } + } + if (shouldSendOutboundConfEmails != null) { + if (isFileTypeOrListOfFiles(shouldSendOutboundConfEmails)) { + fileTypeFound = true; + } + + if (shouldSendOutboundConfEmails.getClass().equals(java.io.File.class) || + shouldSendOutboundConfEmails.getClass().equals(Integer.class) || + shouldSendOutboundConfEmails.getClass().equals(String.class) || + shouldSendOutboundConfEmails.getClass().isEnum()) { + map.put("should_send_outbound_conf_emails", shouldSendOutboundConfEmails); + } else if (isListOfFile(shouldSendOutboundConfEmails)) { + for(int i = 0; i< getListSize(shouldSendOutboundConfEmails); i++) { + map.put("should_send_outbound_conf_emails[" + i + "]", getFromList(shouldSendOutboundConfEmails, i)); + } + } + else { + map.put("should_send_outbound_conf_emails", JSON.getDefault().getMapper().writeValueAsString(shouldSendOutboundConfEmails)); + } + } + if (templateLinkSignatureEmailsEnabled != null) { + if (isFileTypeOrListOfFiles(templateLinkSignatureEmailsEnabled)) { + fileTypeFound = true; + } + + if (templateLinkSignatureEmailsEnabled.getClass().equals(java.io.File.class) || + templateLinkSignatureEmailsEnabled.getClass().equals(Integer.class) || + templateLinkSignatureEmailsEnabled.getClass().equals(String.class) || + templateLinkSignatureEmailsEnabled.getClass().isEnum()) { + map.put("template_link_signature_emails_enabled", templateLinkSignatureEmailsEnabled); + } else if (isListOfFile(templateLinkSignatureEmailsEnabled)) { + for(int i = 0; i< getListSize(templateLinkSignatureEmailsEnabled); i++) { + map.put("template_link_signature_emails_enabled[" + i + "]", getFromList(templateLinkSignatureEmailsEnabled, i)); + } + } + else { + map.put("template_link_signature_emails_enabled", JSON.getDefault().getMapper().writeValueAsString(templateLinkSignatureEmailsEnabled)); + } + } + if (unset != null) { + if (isFileTypeOrListOfFiles(unset)) { + fileTypeFound = true; + } + + if (unset.getClass().equals(java.io.File.class) || + unset.getClass().equals(Integer.class) || + unset.getClass().equals(String.class) || + unset.getClass().isEnum()) { + map.put("unset", unset); + } else if (isListOfFile(unset)) { + for(int i = 0; i< getListSize(unset); i++) { + map.put("unset[" + i + "]", getFromList(unset, i)); + } + } + else { + map.put("unset", JSON.getDefault().getMapper().writeValueAsString(unset)); + } + } + } 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/BooleanSettingUpdate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BooleanSettingUpdate.java new file mode 100644 index 000000000..aca91d88c --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BooleanSettingUpdate.java @@ -0,0 +1,231 @@ +/* + * 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.TeamSettingLock; +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; +/** + * Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + BooleanSettingUpdate.JSON_PROPERTY_VALUE, + BooleanSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class BooleanSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private Boolean value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @jakarta.annotation.Nullable + private TeamSettingLock lockMode; + + public BooleanSettingUpdate() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public BooleanSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, BooleanSettingUpdate.class); + } + + static public BooleanSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + BooleanSettingUpdate.class + ); + } + + public BooleanSettingUpdate value(@jakarta.annotation.Nullable Boolean value) { + this.value = value; + return this; + } + + /** + * Boolean value to store. + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@jakarta.annotation.Nullable Boolean value) { + this.value = value; + } + + + public BooleanSettingUpdate lockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * @return lockMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TeamSettingLock getLockMode() { + return lockMode; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + + /** + * Return true if this BooleanSettingUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BooleanSettingUpdate booleanSettingUpdate = (BooleanSettingUpdate) o; + return Objects.equals(this.value, booleanSettingUpdate.value) && + Objects.equals(this.lockMode, booleanSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BooleanSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) || + lockMode.getClass().equals(Integer.class) || + lockMode.getClass().equals(String.class) || + lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for(int i = 0; i< getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } + else { + map.put("lock_mode", JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/DataResidency.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DataResidency.java new file mode 100644 index 000000000..6ff390d82 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DataResidency.java @@ -0,0 +1,71 @@ +/* + * 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.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Storage region for team documents. + */ +public enum DataResidency { + + US("us"), + + EU("eu"), + + AU("au"), + + JP("jp"), + + UK("uk"), + + CA("ca"); + + private String value; + + DataResidency(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DataResidency fromValue(String value) { + for (DataResidency b : DataResidency.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.java new file mode 100644 index 000000000..311f132f1 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DataResidencySettingUpdate.java @@ -0,0 +1,232 @@ +/* + * 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.DataResidency; +import com.dropbox.sign.model.TeamSettingLock; +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; +/** + * Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + DataResidencySettingUpdate.JSON_PROPERTY_VALUE, + DataResidencySettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataResidencySettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private DataResidency value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @jakarta.annotation.Nullable + private TeamSettingLock lockMode; + + public DataResidencySettingUpdate() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public DataResidencySettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, DataResidencySettingUpdate.class); + } + + static public DataResidencySettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + DataResidencySettingUpdate.class + ); + } + + public DataResidencySettingUpdate value(@jakarta.annotation.Nullable DataResidency value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DataResidency getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@jakarta.annotation.Nullable DataResidency value) { + this.value = value; + } + + + public DataResidencySettingUpdate lockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * @return lockMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TeamSettingLock getLockMode() { + return lockMode; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + + /** + * Return true if this DataResidencySettingUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataResidencySettingUpdate dataResidencySettingUpdate = (DataResidencySettingUpdate) o; + return Objects.equals(this.value, dataResidencySettingUpdate.value) && + Objects.equals(this.lockMode, dataResidencySettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataResidencySettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) || + lockMode.getClass().equals(Integer.class) || + lockMode.getClass().equals(String.class) || + lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for(int i = 0; i< getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } + else { + map.put("lock_mode", JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/DateFormat.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DateFormat.java new file mode 100644 index 000000000..dcf621796 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DateFormat.java @@ -0,0 +1,65 @@ +/* + * 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.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Date format used to display dates. + */ +public enum DateFormat { + + MM_DD_YYYY("MM/DD/YYYY"), + + DD_MM_YYYY("DD/MM/YYYY"), + + YYYY_MM_DD("YYYY/MM/DD"); + + private String value; + + DateFormat(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DateFormat fromValue(String value) { + for (DateFormat b : DateFormat.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java new file mode 100644 index 000000000..7e91407c1 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/DateFormatSettingUpdate.java @@ -0,0 +1,232 @@ +/* + * 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.DateFormat; +import com.dropbox.sign.model.TeamSettingLock; +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; +/** + * Updates a date format team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + DateFormatSettingUpdate.JSON_PROPERTY_VALUE, + DateFormatSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class DateFormatSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private DateFormat value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @jakarta.annotation.Nullable + private TeamSettingLock lockMode; + + public DateFormatSettingUpdate() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public DateFormatSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, DateFormatSettingUpdate.class); + } + + static public DateFormatSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + DateFormatSettingUpdate.class + ); + } + + public DateFormatSettingUpdate value(@jakarta.annotation.Nullable DateFormat value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DateFormat getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@jakarta.annotation.Nullable DateFormat value) { + this.value = value; + } + + + public DateFormatSettingUpdate lockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * @return lockMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TeamSettingLock getLockMode() { + return lockMode; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + + /** + * Return true if this DateFormatSettingUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DateFormatSettingUpdate dateFormatSettingUpdate = (DateFormatSettingUpdate) o; + return Objects.equals(this.value, dateFormatSettingUpdate.value) && + Objects.equals(this.lockMode, dateFormatSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DateFormatSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) || + lockMode.getClass().equals(Integer.class) || + lockMode.getClass().equals(String.class) || + lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for(int i = 0; i< getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } + else { + map.put("lock_mode", JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/RequiredSignatureType.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/RequiredSignatureType.java new file mode 100644 index 000000000..86891ad27 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/RequiredSignatureType.java @@ -0,0 +1,67 @@ +/* + * 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.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * A signature creation method a signer may use. + */ +public enum RequiredSignatureType { + + DRAW("draw"), + + PHONE("phone"), + + TYPE("type"), + + UPLOAD("upload"); + + private String value; + + RequiredSignatureType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RequiredSignatureType fromValue(String value) { + for (RequiredSignatureType b : RequiredSignatureType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java new file mode 100644 index 000000000..a775c1a2e --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/RequiredSignatureTypesSettingUpdate.java @@ -0,0 +1,244 @@ +/* + * 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.RequiredSignatureType; +import com.dropbox.sign.model.TeamSettingLock; +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +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; +/** + * Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + RequiredSignatureTypesSettingUpdate.JSON_PROPERTY_VALUE, + RequiredSignatureTypesSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class RequiredSignatureTypesSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private Set value = null; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @jakarta.annotation.Nullable + private TeamSettingLock lockMode; + + public RequiredSignatureTypesSettingUpdate() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public RequiredSignatureTypesSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, RequiredSignatureTypesSettingUpdate.class); + } + + static public RequiredSignatureTypesSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + RequiredSignatureTypesSettingUpdate.class + ); + } + + public RequiredSignatureTypesSettingUpdate value(@jakarta.annotation.Nullable Set value) { + this.value = value; + return this; + } + + public RequiredSignatureTypesSettingUpdate addValueItem(RequiredSignatureType valueItem) { + if (this.value == null) { + this.value = new LinkedHashSet<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * Signature creation methods signers may use. + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Set getValue() { + return value; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@jakarta.annotation.Nullable Set value) { + this.value = value; + } + + + public RequiredSignatureTypesSettingUpdate lockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * @return lockMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TeamSettingLock getLockMode() { + return lockMode; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + + /** + * Return true if this RequiredSignatureTypesSettingUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequiredSignatureTypesSettingUpdate requiredSignatureTypesSettingUpdate = (RequiredSignatureTypesSettingUpdate) o; + return Objects.equals(this.value, requiredSignatureTypesSettingUpdate.value) && + Objects.equals(this.lockMode, requiredSignatureTypesSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequiredSignatureTypesSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) || + lockMode.getClass().equals(Integer.class) || + lockMode.getClass().equals(String.class) || + lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for(int i = 0; i< getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } + else { + map.put("lock_mode", JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/SettingLockResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SettingLockResponse.java new file mode 100644 index 000000000..34e6feefc --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SettingLockResponse.java @@ -0,0 +1,268 @@ +/* + * 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.TeamSettingLock; +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; +/** + * SettingLockResponse + */ +@JsonPropertyOrder({ + SettingLockResponse.JSON_PROPERTY_MODE, + SettingLockResponse.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SettingLockResponse { + public static final String JSON_PROPERTY_MODE = "mode"; + @jakarta.annotation.Nonnull + private TeamSettingLock mode; + + /** + * Gets or Sets source + */ + public enum SourceEnum { + TEAM(String.valueOf("team")), + + PARENT_TEAM(String.valueOf("parent_team")), + + DEFAULT(String.valueOf("default")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @jakarta.annotation.Nonnull + private SourceEnum source; + + public SettingLockResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SettingLockResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SettingLockResponse.class); + } + + static public SettingLockResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SettingLockResponse.class + ); + } + + public SettingLockResponse mode(@jakarta.annotation.Nonnull TeamSettingLock mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TeamSettingLock getMode() { + return mode; + } + + + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMode(@jakarta.annotation.Nonnull TeamSettingLock mode) { + this.mode = mode; + } + + + public SettingLockResponse source(@jakarta.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@jakarta.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + + /** + * Return true if this SettingLockResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingLockResponse settingLockResponse = (SettingLockResponse) o; + return Objects.equals(this.mode, settingLockResponse.mode) && + Objects.equals(this.source, settingLockResponse.source); + } + + @Override + public int hashCode() { + return Objects.hash(mode, source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingLockResponse {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (mode != null) { + if (isFileTypeOrListOfFiles(mode)) { + fileTypeFound = true; + } + + if (mode.getClass().equals(java.io.File.class) || + mode.getClass().equals(Integer.class) || + mode.getClass().equals(String.class) || + mode.getClass().isEnum()) { + map.put("mode", mode); + } else if (isListOfFile(mode)) { + for(int i = 0; i< getListSize(mode); i++) { + map.put("mode[" + i + "]", getFromList(mode, i)); + } + } + else { + map.put("mode", JSON.getDefault().getMapper().writeValueAsString(mode)); + } + } + if (source != null) { + if (isFileTypeOrListOfFiles(source)) { + fileTypeFound = true; + } + + if (source.getClass().equals(java.io.File.class) || + source.getClass().equals(Integer.class) || + source.getClass().equals(String.class) || + source.getClass().isEnum()) { + map.put("source", source); + } else if (isListOfFile(source)) { + for(int i = 0; i< getListSize(source); i++) { + map.put("source[" + i + "]", getFromList(source, i)); + } + } + else { + map.put("source", JSON.getDefault().getMapper().writeValueAsString(source)); + } + } + } 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/SettingResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SettingResponse.java new file mode 100644 index 000000000..c83fdb02a --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SettingResponse.java @@ -0,0 +1,513 @@ +/* + * 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.SettingLockResponse; +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; +/** + * SettingResponse + */ +@JsonPropertyOrder({ + SettingResponse.JSON_PROPERTY_VALUE, + SettingResponse.JSON_PROPERTY_IS_INHERITED, + SettingResponse.JSON_PROPERTY_SOURCE, + SettingResponse.JSON_PROPERTY_TYPE, + SettingResponse.JSON_PROPERTY_WRITABLE, + SettingResponse.JSON_PROPERTY_LOCK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SettingResponse { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private Object value = null; + + public static final String JSON_PROPERTY_IS_INHERITED = "is_inherited"; + @jakarta.annotation.Nonnull + private Boolean isInherited; + + /** + * Gets or Sets source + */ + public enum SourceEnum { + ACCOUNT(String.valueOf("account")), + + TEAM(String.valueOf("team")), + + PARENT_TEAM(String.valueOf("parent_team")), + + DEFAULT(String.valueOf("default")); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SourceEnum fromValue(String value) { + for (SourceEnum b : SourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SOURCE = "source"; + @jakarta.annotation.Nonnull + private SourceEnum source; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + BOOLEAN(String.valueOf("boolean")), + + INTEGER(String.valueOf("integer")), + + STRING(String.valueOf("string")), + + ARRAY(String.valueOf("array")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull + private TypeEnum type; + + public static final String JSON_PROPERTY_WRITABLE = "writable"; + @jakarta.annotation.Nonnull + private Boolean writable; + + public static final String JSON_PROPERTY_LOCK = "lock"; + @jakarta.annotation.Nonnull + private SettingLockResponse lock; + + public SettingResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SettingResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SettingResponse.class); + } + + static public SettingResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SettingResponse.class + ); + } + + public SettingResponse value(@jakarta.annotation.Nullable Object value) { + this.value = value; + return this; + } + + /** + * Current value of the setting. Null when the setting has no value. + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Object getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nullable Object value) { + this.value = value; + } + + + public SettingResponse isInherited(@jakarta.annotation.Nonnull Boolean isInherited) { + this.isInherited = isInherited; + return this; + } + + /** + * Get isInherited + * @return isInherited + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_INHERITED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getIsInherited() { + return isInherited; + } + + + @JsonProperty(JSON_PROPERTY_IS_INHERITED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsInherited(@jakarta.annotation.Nonnull Boolean isInherited) { + this.isInherited = isInherited; + } + + + public SettingResponse source(@jakarta.annotation.Nonnull SourceEnum source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SourceEnum getSource() { + return source; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@jakarta.annotation.Nonnull SourceEnum source) { + this.source = source; + } + + + public SettingResponse type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public SettingResponse writable(@jakarta.annotation.Nonnull Boolean writable) { + this.writable = writable; + return this; + } + + /** + * Get writable + * @return writable + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getWritable() { + return writable; + } + + + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setWritable(@jakarta.annotation.Nonnull Boolean writable) { + this.writable = writable; + } + + + public SettingResponse lock(@jakarta.annotation.Nonnull SettingLockResponse lock) { + this.lock = lock; + return this; + } + + /** + * Get lock + * @return lock + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingLockResponse getLock() { + return lock; + } + + + @JsonProperty(JSON_PROPERTY_LOCK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLock(@jakarta.annotation.Nonnull SettingLockResponse lock) { + this.lock = lock; + } + + + /** + * Return true if this SettingResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingResponse settingResponse = (SettingResponse) o; + return Objects.equals(this.value, settingResponse.value) && + Objects.equals(this.isInherited, settingResponse.isInherited) && + Objects.equals(this.source, settingResponse.source) && + Objects.equals(this.type, settingResponse.type) && + Objects.equals(this.writable, settingResponse.writable) && + Objects.equals(this.lock, settingResponse.lock); + } + + @Override + public int hashCode() { + return Objects.hash(value, isInherited, source, type, writable, lock); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingResponse {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" isInherited: ").append(toIndentedString(isInherited)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" writable: ").append(toIndentedString(writable)).append("\n"); + sb.append(" lock: ").append(toIndentedString(lock)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (isInherited != null) { + if (isFileTypeOrListOfFiles(isInherited)) { + fileTypeFound = true; + } + + if (isInherited.getClass().equals(java.io.File.class) || + isInherited.getClass().equals(Integer.class) || + isInherited.getClass().equals(String.class) || + isInherited.getClass().isEnum()) { + map.put("is_inherited", isInherited); + } else if (isListOfFile(isInherited)) { + for(int i = 0; i< getListSize(isInherited); i++) { + map.put("is_inherited[" + i + "]", getFromList(isInherited, i)); + } + } + else { + map.put("is_inherited", JSON.getDefault().getMapper().writeValueAsString(isInherited)); + } + } + if (source != null) { + if (isFileTypeOrListOfFiles(source)) { + fileTypeFound = true; + } + + if (source.getClass().equals(java.io.File.class) || + source.getClass().equals(Integer.class) || + source.getClass().equals(String.class) || + source.getClass().isEnum()) { + map.put("source", source); + } else if (isListOfFile(source)) { + for(int i = 0; i< getListSize(source); i++) { + map.put("source[" + i + "]", getFromList(source, i)); + } + } + else { + map.put("source", JSON.getDefault().getMapper().writeValueAsString(source)); + } + } + if (type != null) { + if (isFileTypeOrListOfFiles(type)) { + fileTypeFound = true; + } + + if (type.getClass().equals(java.io.File.class) || + type.getClass().equals(Integer.class) || + type.getClass().equals(String.class) || + type.getClass().isEnum()) { + map.put("type", type); + } else if (isListOfFile(type)) { + for(int i = 0; i< getListSize(type); i++) { + map.put("type[" + i + "]", getFromList(type, i)); + } + } + else { + map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); + } + } + if (writable != null) { + if (isFileTypeOrListOfFiles(writable)) { + fileTypeFound = true; + } + + if (writable.getClass().equals(java.io.File.class) || + writable.getClass().equals(Integer.class) || + writable.getClass().equals(String.class) || + writable.getClass().isEnum()) { + map.put("writable", writable); + } else if (isListOfFile(writable)) { + for(int i = 0; i< getListSize(writable); i++) { + map.put("writable[" + i + "]", getFromList(writable, i)); + } + } + else { + map.put("writable", JSON.getDefault().getMapper().writeValueAsString(writable)); + } + } + if (lock != null) { + if (isFileTypeOrListOfFiles(lock)) { + fileTypeFound = true; + } + + if (lock.getClass().equals(java.io.File.class) || + lock.getClass().equals(Integer.class) || + lock.getClass().equals(String.class) || + lock.getClass().isEnum()) { + map.put("lock", lock); + } else if (isListOfFile(lock)) { + for(int i = 0; i< getListSize(lock); i++) { + map.put("lock[" + i + "]", getFromList(lock, i)); + } + } + else { + map.put("lock", JSON.getDefault().getMapper().writeValueAsString(lock)); + } + } + } 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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index 6086d7571..cccb0d7f0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -379,7 +379,7 @@ public SignatureRequestBulkCreateEmbeddedWithTemplateRequest putMetadataItem(Str } /** - * 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. + * _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA * @return metadata */ @jakarta.annotation.Nullable diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index 000984aa9..3012489b9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -379,7 +379,7 @@ public SignatureRequestBulkSendWithTemplateRequest putMetadataItem(String key, O } /** - * 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. + * _t__SignatureRequestBulkSendWithTemplate::METADATA * @return metadata */ @jakarta.annotation.Nullable diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java new file mode 100644 index 000000000..2780584f8 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/StringSettingUpdate.java @@ -0,0 +1,231 @@ +/* + * 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.TeamSettingLock; +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; +/** + * Updates a string team setting. Provide `value`, `lock_mode`, or both. + */ +@JsonPropertyOrder({ + StringSettingUpdate.JSON_PROPERTY_VALUE, + StringSettingUpdate.JSON_PROPERTY_LOCK_MODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class StringSettingUpdate { + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable + private String value; + + public static final String JSON_PROPERTY_LOCK_MODE = "lock_mode"; + @jakarta.annotation.Nullable + private TeamSettingLock lockMode; + + public StringSettingUpdate() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public StringSettingUpdate init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, StringSettingUpdate.class); + } + + static public StringSettingUpdate init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + StringSettingUpdate.class + ); + } + + public StringSettingUpdate value(@jakarta.annotation.Nullable String value) { + this.value = value; + return this; + } + + /** + * String value to store. + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@jakarta.annotation.Nullable String value) { + this.value = value; + } + + + public StringSettingUpdate lockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + return this; + } + + /** + * Get lockMode + * @return lockMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TeamSettingLock getLockMode() { + return lockMode; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockMode(@jakarta.annotation.Nullable TeamSettingLock lockMode) { + this.lockMode = lockMode; + } + + + /** + * Return true if this StringSettingUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StringSettingUpdate stringSettingUpdate = (StringSettingUpdate) o; + return Objects.equals(this.value, stringSettingUpdate.value) && + Objects.equals(this.lockMode, stringSettingUpdate.lockMode); + } + + @Override + public int hashCode() { + return Objects.hash(value, lockMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringSettingUpdate {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" lockMode: ").append(toIndentedString(lockMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (value != null) { + if (isFileTypeOrListOfFiles(value)) { + fileTypeFound = true; + } + + if (value.getClass().equals(java.io.File.class) || + value.getClass().equals(Integer.class) || + value.getClass().equals(String.class) || + value.getClass().isEnum()) { + map.put("value", value); + } else if (isListOfFile(value)) { + for(int i = 0; i< getListSize(value); i++) { + map.put("value[" + i + "]", getFromList(value, i)); + } + } + else { + map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); + } + } + if (lockMode != null) { + if (isFileTypeOrListOfFiles(lockMode)) { + fileTypeFound = true; + } + + if (lockMode.getClass().equals(java.io.File.class) || + lockMode.getClass().equals(Integer.class) || + lockMode.getClass().equals(String.class) || + lockMode.getClass().isEnum()) { + map.put("lock_mode", lockMode); + } else if (isListOfFile(lockMode)) { + for(int i = 0; i< getListSize(lockMode); i++) { + map.put("lock_mode[" + i + "]", getFromList(lockMode, i)); + } + } + else { + map.put("lock_mode", JSON.getDefault().getMapper().writeValueAsString(lockMode)); + } + } + } 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/SubBulkSignerList.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index beb21db0b..5b9692dd1 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -25,7 +25,9 @@ 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; @@ -38,7 +40,8 @@ */ @JsonPropertyOrder({ SubBulkSignerList.JSON_PROPERTY_CUSTOM_FIELDS, - SubBulkSignerList.JSON_PROPERTY_SIGNERS + SubBulkSignerList.JSON_PROPERTY_SIGNERS, + SubBulkSignerList.JSON_PROPERTY_METADATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) @@ -51,6 +54,10 @@ public class SubBulkSignerList { @jakarta.annotation.Nullable private List signers = null; + public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable + private Map metadata = null; + public SubBulkSignerList() { } @@ -135,6 +142,39 @@ public void setSigners(@jakarta.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public SubBulkSignerList putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * _t__Sub::BulkSigner::METADATA + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + /** * Return true if this SubBulkSignerList object is equal to o. */ @@ -148,12 +188,13 @@ public boolean equals(Object o) { } SubBulkSignerList subBulkSignerList = (SubBulkSignerList) o; return Objects.equals(this.customFields, subBulkSignerList.customFields) && - Objects.equals(this.signers, subBulkSignerList.signers); + Objects.equals(this.signers, subBulkSignerList.signers) && + Objects.equals(this.metadata, subBulkSignerList.metadata); } @Override public int hashCode() { - return Objects.hash(customFields, signers); + return Objects.hash(customFields, signers, metadata); } @Override @@ -162,6 +203,7 @@ public String toString() { sb.append("class SubBulkSignerList {\n"); sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } @@ -208,6 +250,25 @@ public Map createFormData() throws ApiException { map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); } } + 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)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index f5b0e92ad..9ad7f552d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -33,7 +33,8 @@ * TeamCreateRequest */ @JsonPropertyOrder({ - TeamCreateRequest.JSON_PROPERTY_NAME + TeamCreateRequest.JSON_PROPERTY_NAME, + TeamCreateRequest.JSON_PROPERTY_PARENT_TEAM_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) @@ -42,6 +43,10 @@ public class TeamCreateRequest { @jakarta.annotation.Nullable private String name = "Untitled Team"; + public static final String JSON_PROPERTY_PARENT_TEAM_ID = "parent_team_id"; + @jakarta.annotation.Nullable + private String parentTeamId; + public TeamCreateRequest() { } @@ -85,6 +90,31 @@ public void setName(@jakarta.annotation.Nullable String name) { } + public TeamCreateRequest parentTeamId(@jakarta.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + return this; + } + + /** + * _t__TeamCreate::PARENT_TEAM_ID + * @return parentTeamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getParentTeamId() { + return parentTeamId; + } + + + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentTeamId(@jakarta.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + } + + /** * Return true if this TeamCreateRequest object is equal to o. */ @@ -97,12 +127,13 @@ public boolean equals(Object o) { return false; } TeamCreateRequest teamCreateRequest = (TeamCreateRequest) o; - return Objects.equals(this.name, teamCreateRequest.name); + return Objects.equals(this.name, teamCreateRequest.name) && + Objects.equals(this.parentTeamId, teamCreateRequest.parentTeamId); } @Override public int hashCode() { - return Objects.hash(name); + return Objects.hash(name, parentTeamId); } @Override @@ -110,6 +141,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TeamCreateRequest {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTeamId: ").append(toIndentedString(parentTeamId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -137,6 +169,25 @@ public Map createFormData() throws ApiException { map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); } } + if (parentTeamId != null) { + if (isFileTypeOrListOfFiles(parentTeamId)) { + fileTypeFound = true; + } + + if (parentTeamId.getClass().equals(java.io.File.class) || + parentTeamId.getClass().equals(Integer.class) || + parentTeamId.getClass().equals(String.class) || + parentTeamId.getClass().isEnum()) { + map.put("parent_team_id", parentTeamId); + } else if (isListOfFile(parentTeamId)) { + for(int i = 0; i< getListSize(parentTeamId); i++) { + map.put("parent_team_id[" + i + "]", getFromList(parentTeamId, i)); + } + } + else { + map.put("parent_team_id", JSON.getDefault().getMapper().writeValueAsString(parentTeamId)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java index 37128c92a..3e6d746d7 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -36,6 +36,8 @@ * Contains information about your team and its members */ @JsonPropertyOrder({ + TeamResponse.JSON_PROPERTY_TEAM_ID, + TeamResponse.JSON_PROPERTY_PARENT_TEAM_ID, TeamResponse.JSON_PROPERTY_NAME, TeamResponse.JSON_PROPERTY_ACCOUNTS, TeamResponse.JSON_PROPERTY_INVITED_ACCOUNTS, @@ -44,6 +46,14 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamResponse { + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable + private String teamId; + + public static final String JSON_PROPERTY_PARENT_TEAM_ID = "parent_team_id"; + @jakarta.annotation.Nullable + private String parentTeamId; + public static final String JSON_PROPERTY_NAME = "name"; @jakarta.annotation.Nullable private String name; @@ -78,6 +88,56 @@ static public TeamResponse init(HashMap data) throws Exception { ); } + public TeamResponse teamId(@jakarta.annotation.Nullable String teamId) { + this.teamId = teamId; + return this; + } + + /** + * The id of a team + * @return teamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTeamId() { + return teamId; + } + + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTeamId(@jakarta.annotation.Nullable String teamId) { + this.teamId = teamId; + } + + + public TeamResponse parentTeamId(@jakarta.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + return this; + } + + /** + * _t__Team::PARENT_TEAM_ID + * @return parentTeamId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getParentTeamId() { + return parentTeamId; + } + + + @JsonProperty(JSON_PROPERTY_PARENT_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentTeamId(@jakarta.annotation.Nullable String parentTeamId) { + this.parentTeamId = parentTeamId; + } + + public TeamResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; @@ -214,7 +274,9 @@ public boolean equals(Object o) { return false; } TeamResponse teamResponse = (TeamResponse) o; - return Objects.equals(this.name, teamResponse.name) && + return Objects.equals(this.teamId, teamResponse.teamId) && + Objects.equals(this.parentTeamId, teamResponse.parentTeamId) && + Objects.equals(this.name, teamResponse.name) && Objects.equals(this.accounts, teamResponse.accounts) && Objects.equals(this.invitedAccounts, teamResponse.invitedAccounts) && Objects.equals(this.invitedEmails, teamResponse.invitedEmails); @@ -222,13 +284,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, accounts, invitedAccounts, invitedEmails); + return Objects.hash(teamId, parentTeamId, name, accounts, invitedAccounts, invitedEmails); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TeamResponse {\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" parentTeamId: ").append(toIndentedString(parentTeamId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); sb.append(" invitedAccounts: ").append(toIndentedString(invitedAccounts)).append("\n"); @@ -241,6 +305,44 @@ public Map createFormData() throws ApiException { Map map = new HashMap<>(); boolean fileTypeFound = false; try { + if (teamId != null) { + if (isFileTypeOrListOfFiles(teamId)) { + fileTypeFound = true; + } + + if (teamId.getClass().equals(java.io.File.class) || + teamId.getClass().equals(Integer.class) || + teamId.getClass().equals(String.class) || + teamId.getClass().isEnum()) { + map.put("team_id", teamId); + } else if (isListOfFile(teamId)) { + for(int i = 0; i< getListSize(teamId); i++) { + map.put("team_id[" + i + "]", getFromList(teamId, i)); + } + } + else { + map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); + } + } + if (parentTeamId != null) { + if (isFileTypeOrListOfFiles(parentTeamId)) { + fileTypeFound = true; + } + + if (parentTeamId.getClass().equals(java.io.File.class) || + parentTeamId.getClass().equals(Integer.class) || + parentTeamId.getClass().equals(String.class) || + parentTeamId.getClass().isEnum()) { + map.put("parent_team_id", parentTeamId); + } else if (isListOfFile(parentTeamId)) { + for(int i = 0; i< getListSize(parentTeamId); i++) { + map.put("parent_team_id[" + i + "]", getFromList(parentTeamId, i)); + } + } + else { + map.put("parent_team_id", JSON.getDefault().getMapper().writeValueAsString(parentTeamId)); + } + } if (name != null) { if (isFileTypeOrListOfFiles(name)) { fileTypeFound = true; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingLock.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingLock.java new file mode 100644 index 000000000..a6cdbf881 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingLock.java @@ -0,0 +1,65 @@ +/* + * 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.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + */ +public enum TeamSettingLock { + + ORGANIZATION_ADMINS("organization_admins"), + + TEAM_ADMINS("team_admins"), + + MEMBERS("members"); + + private String value; + + TeamSettingLock(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TeamSettingLock fromValue(String value) { + for (TeamSettingLock b : TeamSettingLock.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java new file mode 100644 index 000000000..1105ccded --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsResponse.java @@ -0,0 +1,293 @@ +/* + * 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.TeamSettingsResponseSettings; +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; +/** + * TeamSettingsResponse + */ +@JsonPropertyOrder({ + TeamSettingsResponse.JSON_PROPERTY_TEAM_ID, + TeamSettingsResponse.JSON_PROPERTY_SETTINGS, + TeamSettingsResponse.JSON_PROPERTY_WARNINGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class TeamSettingsResponse { + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nonnull + private String teamId; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @jakarta.annotation.Nonnull + private TeamSettingsResponseSettings settings; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable + private List warnings = null; + + public TeamSettingsResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public TeamSettingsResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsResponse.class); + } + + static public TeamSettingsResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + TeamSettingsResponse.class + ); + } + + public TeamSettingsResponse teamId(@jakarta.annotation.Nonnull String teamId) { + this.teamId = teamId; + return this; + } + + /** + * Get teamId + * @return teamId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTeamId() { + return teamId; + } + + + @JsonProperty(JSON_PROPERTY_TEAM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTeamId(@jakarta.annotation.Nonnull String teamId) { + this.teamId = teamId; + } + + + public TeamSettingsResponse settings(@jakarta.annotation.Nonnull TeamSettingsResponseSettings settings) { + this.settings = settings; + return this; + } + + /** + * Get settings + * @return settings + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TeamSettingsResponseSettings getSettings() { + return settings; + } + + + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettings(@jakarta.annotation.Nonnull TeamSettingsResponseSettings settings) { + this.settings = settings; + } + + + public TeamSettingsResponse warnings(@jakarta.annotation.Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public TeamSettingsResponse 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(@jakarta.annotation.Nullable List warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this TeamSettingsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsResponse teamSettingsResponse = (TeamSettingsResponse) o; + return Objects.equals(this.teamId, teamSettingsResponse.teamId) && + Objects.equals(this.settings, teamSettingsResponse.settings) && + Objects.equals(this.warnings, teamSettingsResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(teamId, settings, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsResponse {\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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 (teamId != null) { + if (isFileTypeOrListOfFiles(teamId)) { + fileTypeFound = true; + } + + if (teamId.getClass().equals(java.io.File.class) || + teamId.getClass().equals(Integer.class) || + teamId.getClass().equals(String.class) || + teamId.getClass().isEnum()) { + map.put("team_id", teamId); + } else if (isListOfFile(teamId)) { + for(int i = 0; i< getListSize(teamId); i++) { + map.put("team_id[" + i + "]", getFromList(teamId, i)); + } + } + else { + map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); + } + } + if (settings != null) { + if (isFileTypeOrListOfFiles(settings)) { + fileTypeFound = true; + } + + if (settings.getClass().equals(java.io.File.class) || + settings.getClass().equals(Integer.class) || + settings.getClass().equals(String.class) || + settings.getClass().isEnum()) { + map.put("settings", settings); + } else if (isListOfFile(settings)) { + for(int i = 0; i< getListSize(settings); i++) { + map.put("settings[" + i + "]", getFromList(settings, i)); + } + } + else { + map.put("settings", JSON.getDefault().getMapper().writeValueAsString(settings)); + } + } + 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/TeamSettingsResponseSettings.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsResponseSettings.java new file mode 100644 index 000000000..83ba799cb --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsResponseSettings.java @@ -0,0 +1,1404 @@ +/* + * 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.SettingResponse; +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; +/** + * TeamSettingsResponseSettings + */ +@JsonPropertyOrder({ + TeamSettingsResponseSettings.JSON_PROPERTY_COMPANY, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + TeamSettingsResponseSettings.JSON_PROPERTY_CUSTOM_TAGLINE, + TeamSettingsResponseSettings.JSON_PROPERTY_DATE_FORMAT, + TeamSettingsResponseSettings.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_FROM, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + TeamSettingsResponseSettings.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + TeamSettingsResponseSettings.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + TeamSettingsResponseSettings.JSON_PROPERTY_DATA_RESIDENCY, + TeamSettingsResponseSettings.JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE, + TeamSettingsResponseSettings.JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV, + TeamSettingsResponseSettings.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION, + TeamSettingsResponseSettings.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY, + TeamSettingsResponseSettings.JSON_PROPERTY_SELF_SIGN_MESSAGE, + TeamSettingsResponseSettings.JSON_PROPERTY_SELF_SIGN_TITLE, + TeamSettingsResponseSettings.JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE, + TeamSettingsResponseSettings.JSON_PROPERTY_SIGNATURE_REQUEST_TITLE, + TeamSettingsResponseSettings.JSON_PROPERTY_MULTIFACTOR_AUTH_APP, + TeamSettingsResponseSettings.JSON_PROPERTY_MULTIFACTOR_AUTH_SMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class TeamSettingsResponseSettings { + public static final String JSON_PROPERTY_COMPANY = "company"; + @jakarta.annotation.Nonnull + private SettingResponse company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = "custom_signing_redirect_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = "custom_signing_redirect_url"; + @jakarta.annotation.Nonnull + private SettingResponse customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @jakarta.annotation.Nonnull + private SettingResponse customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @jakarta.annotation.Nonnull + private SettingResponse dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = "is_signature_reminders_enabled"; + @jakarta.annotation.Nonnull + private SettingResponse isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @jakarta.annotation.Nonnull + private SettingResponse requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @jakarta.annotation.Nonnull + private SettingResponse requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @jakarta.annotation.Nonnull + private SettingResponse requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = "should_enable_tamper_proof"; + @jakarta.annotation.Nonnull + private SettingResponse shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = "should_include_distinct_pdfs"; + @jakarta.annotation.Nonnull + private SettingResponse shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = "should_offer_signer_access_code"; + @jakarta.annotation.Nonnull + private SettingResponse shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = "should_offer_signer_sms_authentication"; + @jakarta.annotation.Nonnull + private SettingResponse shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = "should_remove_document_id"; + @jakarta.annotation.Nonnull + private SettingResponse shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_DATA_RESIDENCY = "data_residency"; + @jakarta.annotation.Nonnull + private SettingResponse dataResidency; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE = "allow_team_delete_document_for_everyone"; + @jakarta.annotation.Nonnull + private SettingResponse allowTeamDeleteDocumentForEveryone; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV = "allow_team_download_csv"; + @jakarta.annotation.Nonnull + private SettingResponse allowTeamDownloadCsv; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION = "lock_team_template_creation"; + @jakarta.annotation.Nonnull + private SettingResponse lockTeamTemplateCreation; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY = "lock_team_template_gallery"; + @jakarta.annotation.Nonnull + private SettingResponse lockTeamTemplateGallery; + + public static final String JSON_PROPERTY_SELF_SIGN_MESSAGE = "self_sign_message"; + @jakarta.annotation.Nonnull + private SettingResponse selfSignMessage; + + public static final String JSON_PROPERTY_SELF_SIGN_TITLE = "self_sign_title"; + @jakarta.annotation.Nonnull + private SettingResponse selfSignTitle; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE = "signature_request_message"; + @jakarta.annotation.Nonnull + private SettingResponse signatureRequestMessage; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_TITLE = "signature_request_title"; + @jakarta.annotation.Nonnull + private SettingResponse signatureRequestTitle; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_APP = "multifactor_auth_app"; + @jakarta.annotation.Nonnull + private SettingResponse multifactorAuthApp; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_SMS = "multifactor_auth_sms"; + @jakarta.annotation.Nonnull + private SettingResponse multifactorAuthSms; + + public TeamSettingsResponseSettings() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public TeamSettingsResponseSettings init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsResponseSettings.class); + } + + static public TeamSettingsResponseSettings init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + TeamSettingsResponseSettings.class + ); + } + + public TeamSettingsResponseSettings company(@jakarta.annotation.Nonnull SettingResponse company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * @return company + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCompany() { + return company; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCompany(@jakarta.annotation.Nonnull SettingResponse company) { + this.company = company; + } + + + public TeamSettingsResponseSettings customSigningRedirectEnabled(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * @return customSigningRedirectEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectEnabled(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + + public TeamSettingsResponseSettings customSigningRedirectUrl(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + * @return customSigningRedirectUrl + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomSigningRedirectUrl(@jakarta.annotation.Nonnull SettingResponse customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + + public TeamSettingsResponseSettings customTagline(@jakarta.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * @return customTagline + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getCustomTagline() { + return customTagline; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomTagline(@jakarta.annotation.Nonnull SettingResponse customTagline) { + this.customTagline = customTagline; + } + + + public TeamSettingsResponseSettings dateFormat(@jakarta.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + * @return dateFormat + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getDateFormat() { + return dateFormat; + } + + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateFormat(@jakarta.annotation.Nonnull SettingResponse dateFormat) { + this.dateFormat = dateFormat; + } + + + public TeamSettingsResponseSettings isSignatureRemindersEnabled(@jakarta.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * @return isSignatureRemindersEnabled + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsSignatureRemindersEnabled(@jakarta.annotation.Nonnull SettingResponse isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + + public TeamSettingsResponseSettings requestEmailFrom(@jakarta.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * @return requestEmailFrom + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequestEmailFrom() { + return requestEmailFrom; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailFrom(@jakarta.annotation.Nonnull SettingResponse requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + + public TeamSettingsResponseSettings requestEmailSignature(@jakarta.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * @return requestEmailSignature + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequestEmailSignature() { + return requestEmailSignature; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequestEmailSignature(@jakarta.annotation.Nonnull SettingResponse requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + + public TeamSettingsResponseSettings requiredSignatureTypes(@jakarta.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * @return requiredSignatureTypes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRequiredSignatureTypes(@jakarta.annotation.Nonnull SettingResponse requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + + public TeamSettingsResponseSettings shouldEnableTamperProof(@jakarta.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * @return shouldEnableTamperProof + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldEnableTamperProof(@jakarta.annotation.Nonnull SettingResponse shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + + public TeamSettingsResponseSettings shouldIncludeDistinctPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + * @return shouldIncludeDistinctPdfs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldIncludeDistinctPdfs(@jakarta.annotation.Nonnull SettingResponse shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + + public TeamSettingsResponseSettings shouldOfferSignerAccessCode(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * @return shouldOfferSignerAccessCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerAccessCode(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + + public TeamSettingsResponseSettings shouldOfferSignerSmsAuthentication(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * @return shouldOfferSignerSmsAuthentication + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldOfferSignerSmsAuthentication(@jakarta.annotation.Nonnull SettingResponse shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + + public TeamSettingsResponseSettings shouldRemoveDocumentId(@jakarta.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * @return shouldRemoveDocumentId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setShouldRemoveDocumentId(@jakarta.annotation.Nonnull SettingResponse shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + + public TeamSettingsResponseSettings dataResidency(@jakarta.annotation.Nonnull SettingResponse dataResidency) { + this.dataResidency = dataResidency; + return this; + } + + /** + * Storage region for team documents. + * @return dataResidency + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getDataResidency() { + return dataResidency; + } + + + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataResidency(@jakarta.annotation.Nonnull SettingResponse dataResidency) { + this.dataResidency = dataResidency; + } + + + public TeamSettingsResponseSettings allowTeamDeleteDocumentForEveryone(@jakarta.annotation.Nonnull SettingResponse allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + return this; + } + + /** + * Whether team members can delete a document for all participants. + * @return allowTeamDeleteDocumentForEveryone + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getAllowTeamDeleteDocumentForEveryone() { + return allowTeamDeleteDocumentForEveryone; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllowTeamDeleteDocumentForEveryone(@jakarta.annotation.Nonnull SettingResponse allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + } + + + public TeamSettingsResponseSettings allowTeamDownloadCsv(@jakarta.annotation.Nonnull SettingResponse allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + return this; + } + + /** + * Whether team members can download CSV files. + * @return allowTeamDownloadCsv + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getAllowTeamDownloadCsv() { + return allowTeamDownloadCsv; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAllowTeamDownloadCsv(@jakarta.annotation.Nonnull SettingResponse allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + } + + + public TeamSettingsResponseSettings lockTeamTemplateCreation(@jakarta.annotation.Nonnull SettingResponse lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + return this; + } + + /** + * Whether team members are prevented from creating templates. + * @return lockTeamTemplateCreation + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getLockTeamTemplateCreation() { + return lockTeamTemplateCreation; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLockTeamTemplateCreation(@jakarta.annotation.Nonnull SettingResponse lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + } + + + public TeamSettingsResponseSettings lockTeamTemplateGallery(@jakarta.annotation.Nonnull SettingResponse lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + return this; + } + + /** + * Whether team members are prevented from using the template gallery. + * @return lockTeamTemplateGallery + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getLockTeamTemplateGallery() { + return lockTeamTemplateGallery; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLockTeamTemplateGallery(@jakarta.annotation.Nonnull SettingResponse lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + } + + + public TeamSettingsResponseSettings selfSignMessage(@jakarta.annotation.Nonnull SettingResponse selfSignMessage) { + this.selfSignMessage = selfSignMessage; + return this; + } + + /** + * Default message enforced for team members when they create self-signed documents. + * @return selfSignMessage + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getSelfSignMessage() { + return selfSignMessage; + } + + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSelfSignMessage(@jakarta.annotation.Nonnull SettingResponse selfSignMessage) { + this.selfSignMessage = selfSignMessage; + } + + + public TeamSettingsResponseSettings selfSignTitle(@jakarta.annotation.Nonnull SettingResponse selfSignTitle) { + this.selfSignTitle = selfSignTitle; + return this; + } + + /** + * Default title enforced for team members when they create self-signed documents. + * @return selfSignTitle + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getSelfSignTitle() { + return selfSignTitle; + } + + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSelfSignTitle(@jakarta.annotation.Nonnull SettingResponse selfSignTitle) { + this.selfSignTitle = selfSignTitle; + } + + + public TeamSettingsResponseSettings signatureRequestMessage(@jakarta.annotation.Nonnull SettingResponse signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + return this; + } + + /** + * Default message enforced for team members when they create signature requests. + * @return signatureRequestMessage + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getSignatureRequestMessage() { + return signatureRequestMessage; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignatureRequestMessage(@jakarta.annotation.Nonnull SettingResponse signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + } + + + public TeamSettingsResponseSettings signatureRequestTitle(@jakarta.annotation.Nonnull SettingResponse signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + return this; + } + + /** + * Default title enforced for team members when they create signature requests. + * @return signatureRequestTitle + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getSignatureRequestTitle() { + return signatureRequestTitle; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignatureRequestTitle(@jakarta.annotation.Nonnull SettingResponse signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + } + + + public TeamSettingsResponseSettings multifactorAuthApp(@jakarta.annotation.Nonnull SettingResponse multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + return this; + } + + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + * @return multifactorAuthApp + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getMultifactorAuthApp() { + return multifactorAuthApp; + } + + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMultifactorAuthApp(@jakarta.annotation.Nonnull SettingResponse multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + } + + + public TeamSettingsResponseSettings multifactorAuthSms(@jakarta.annotation.Nonnull SettingResponse multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + return this; + } + + /** + * Whether SMS multifactor authentication is enabled for the team. + * @return multifactorAuthSms + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SettingResponse getMultifactorAuthSms() { + return multifactorAuthSms; + } + + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMultifactorAuthSms(@jakarta.annotation.Nonnull SettingResponse multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + } + + + /** + * Return true if this TeamSettingsResponseSettings object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsResponseSettings teamSettingsResponseSettings = (TeamSettingsResponseSettings) o; + return Objects.equals(this.company, teamSettingsResponseSettings.company) && + Objects.equals(this.customSigningRedirectEnabled, teamSettingsResponseSettings.customSigningRedirectEnabled) && + Objects.equals(this.customSigningRedirectUrl, teamSettingsResponseSettings.customSigningRedirectUrl) && + Objects.equals(this.customTagline, teamSettingsResponseSettings.customTagline) && + Objects.equals(this.dateFormat, teamSettingsResponseSettings.dateFormat) && + Objects.equals(this.isSignatureRemindersEnabled, teamSettingsResponseSettings.isSignatureRemindersEnabled) && + Objects.equals(this.requestEmailFrom, teamSettingsResponseSettings.requestEmailFrom) && + Objects.equals(this.requestEmailSignature, teamSettingsResponseSettings.requestEmailSignature) && + Objects.equals(this.requiredSignatureTypes, teamSettingsResponseSettings.requiredSignatureTypes) && + Objects.equals(this.shouldEnableTamperProof, teamSettingsResponseSettings.shouldEnableTamperProof) && + Objects.equals(this.shouldIncludeDistinctPdfs, teamSettingsResponseSettings.shouldIncludeDistinctPdfs) && + Objects.equals(this.shouldOfferSignerAccessCode, teamSettingsResponseSettings.shouldOfferSignerAccessCode) && + Objects.equals(this.shouldOfferSignerSmsAuthentication, teamSettingsResponseSettings.shouldOfferSignerSmsAuthentication) && + Objects.equals(this.shouldRemoveDocumentId, teamSettingsResponseSettings.shouldRemoveDocumentId) && + Objects.equals(this.dataResidency, teamSettingsResponseSettings.dataResidency) && + Objects.equals(this.allowTeamDeleteDocumentForEveryone, teamSettingsResponseSettings.allowTeamDeleteDocumentForEveryone) && + Objects.equals(this.allowTeamDownloadCsv, teamSettingsResponseSettings.allowTeamDownloadCsv) && + Objects.equals(this.lockTeamTemplateCreation, teamSettingsResponseSettings.lockTeamTemplateCreation) && + Objects.equals(this.lockTeamTemplateGallery, teamSettingsResponseSettings.lockTeamTemplateGallery) && + Objects.equals(this.selfSignMessage, teamSettingsResponseSettings.selfSignMessage) && + Objects.equals(this.selfSignTitle, teamSettingsResponseSettings.selfSignTitle) && + Objects.equals(this.signatureRequestMessage, teamSettingsResponseSettings.signatureRequestMessage) && + Objects.equals(this.signatureRequestTitle, teamSettingsResponseSettings.signatureRequestTitle) && + Objects.equals(this.multifactorAuthApp, teamSettingsResponseSettings.multifactorAuthApp) && + Objects.equals(this.multifactorAuthSms, teamSettingsResponseSettings.multifactorAuthSms); + } + + @Override + public int hashCode() { + return Objects.hash(company, customSigningRedirectEnabled, customSigningRedirectUrl, customTagline, dateFormat, isSignatureRemindersEnabled, requestEmailFrom, requestEmailSignature, requiredSignatureTypes, shouldEnableTamperProof, shouldIncludeDistinctPdfs, shouldOfferSignerAccessCode, shouldOfferSignerSmsAuthentication, shouldRemoveDocumentId, dataResidency, allowTeamDeleteDocumentForEveryone, allowTeamDownloadCsv, lockTeamTemplateCreation, lockTeamTemplateGallery, selfSignMessage, selfSignTitle, signatureRequestMessage, signatureRequestTitle, multifactorAuthApp, multifactorAuthSms); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsResponseSettings {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ").append(toIndentedString(customSigningRedirectEnabled)).append("\n"); + sb.append(" customSigningRedirectUrl: ").append(toIndentedString(customSigningRedirectUrl)).append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ").append(toIndentedString(isSignatureRemindersEnabled)).append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ").append(toIndentedString(requestEmailSignature)).append("\n"); + sb.append(" requiredSignatureTypes: ").append(toIndentedString(requiredSignatureTypes)).append("\n"); + sb.append(" shouldEnableTamperProof: ").append(toIndentedString(shouldEnableTamperProof)).append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ").append(toIndentedString(shouldIncludeDistinctPdfs)).append("\n"); + sb.append(" shouldOfferSignerAccessCode: ").append(toIndentedString(shouldOfferSignerAccessCode)).append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ").append(toIndentedString(shouldOfferSignerSmsAuthentication)).append("\n"); + sb.append(" shouldRemoveDocumentId: ").append(toIndentedString(shouldRemoveDocumentId)).append("\n"); + sb.append(" dataResidency: ").append(toIndentedString(dataResidency)).append("\n"); + sb.append(" allowTeamDeleteDocumentForEveryone: ").append(toIndentedString(allowTeamDeleteDocumentForEveryone)).append("\n"); + sb.append(" allowTeamDownloadCsv: ").append(toIndentedString(allowTeamDownloadCsv)).append("\n"); + sb.append(" lockTeamTemplateCreation: ").append(toIndentedString(lockTeamTemplateCreation)).append("\n"); + sb.append(" lockTeamTemplateGallery: ").append(toIndentedString(lockTeamTemplateGallery)).append("\n"); + sb.append(" selfSignMessage: ").append(toIndentedString(selfSignMessage)).append("\n"); + sb.append(" selfSignTitle: ").append(toIndentedString(selfSignTitle)).append("\n"); + sb.append(" signatureRequestMessage: ").append(toIndentedString(signatureRequestMessage)).append("\n"); + sb.append(" signatureRequestTitle: ").append(toIndentedString(signatureRequestTitle)).append("\n"); + sb.append(" multifactorAuthApp: ").append(toIndentedString(multifactorAuthApp)).append("\n"); + sb.append(" multifactorAuthSms: ").append(toIndentedString(multifactorAuthSms)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) || + company.getClass().equals(Integer.class) || + company.getClass().equals(String.class) || + company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for(int i = 0; i< getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } + else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) || + customSigningRedirectEnabled.getClass().equals(Integer.class) || + customSigningRedirectEnabled.getClass().equals(String.class) || + customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for(int i = 0; i< getListSize(customSigningRedirectEnabled); i++) { + map.put("custom_signing_redirect_enabled[" + i + "]", getFromList(customSigningRedirectEnabled, i)); + } + } + else { + map.put("custom_signing_redirect_enabled", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) || + customSigningRedirectUrl.getClass().equals(Integer.class) || + customSigningRedirectUrl.getClass().equals(String.class) || + customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for(int i = 0; i< getListSize(customSigningRedirectUrl); i++) { + map.put("custom_signing_redirect_url[" + i + "]", getFromList(customSigningRedirectUrl, i)); + } + } + else { + map.put("custom_signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) || + customTagline.getClass().equals(Integer.class) || + customTagline.getClass().equals(String.class) || + customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for(int i = 0; i< getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } + else { + map.put("custom_tagline", JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) || + dateFormat.getClass().equals(Integer.class) || + dateFormat.getClass().equals(String.class) || + dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for(int i = 0; i< getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } + else { + map.put("date_format", JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) || + isSignatureRemindersEnabled.getClass().equals(Integer.class) || + isSignatureRemindersEnabled.getClass().equals(String.class) || + isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for(int i = 0; i< getListSize(isSignatureRemindersEnabled); i++) { + map.put("is_signature_reminders_enabled[" + i + "]", getFromList(isSignatureRemindersEnabled, i)); + } + } + else { + map.put("is_signature_reminders_enabled", JSON.getDefault().getMapper().writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) || + requestEmailFrom.getClass().equals(Integer.class) || + requestEmailFrom.getClass().equals(String.class) || + requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for(int i = 0; i< getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } + else { + map.put("request_email_from", JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) || + requestEmailSignature.getClass().equals(Integer.class) || + requestEmailSignature.getClass().equals(String.class) || + requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for(int i = 0; i< getListSize(requestEmailSignature); i++) { + map.put("request_email_signature[" + i + "]", getFromList(requestEmailSignature, i)); + } + } + else { + map.put("request_email_signature", JSON.getDefault().getMapper().writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) || + requiredSignatureTypes.getClass().equals(Integer.class) || + requiredSignatureTypes.getClass().equals(String.class) || + requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for(int i = 0; i< getListSize(requiredSignatureTypes); i++) { + map.put("required_signature_types[" + i + "]", getFromList(requiredSignatureTypes, i)); + } + } + else { + map.put("required_signature_types", JSON.getDefault().getMapper().writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) || + shouldEnableTamperProof.getClass().equals(Integer.class) || + shouldEnableTamperProof.getClass().equals(String.class) || + shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for(int i = 0; i< getListSize(shouldEnableTamperProof); i++) { + map.put("should_enable_tamper_proof[" + i + "]", getFromList(shouldEnableTamperProof, i)); + } + } + else { + map.put("should_enable_tamper_proof", JSON.getDefault().getMapper().writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) || + shouldIncludeDistinctPdfs.getClass().equals(Integer.class) || + shouldIncludeDistinctPdfs.getClass().equals(String.class) || + shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeDistinctPdfs); i++) { + map.put("should_include_distinct_pdfs[" + i + "]", getFromList(shouldIncludeDistinctPdfs, i)); + } + } + else { + map.put("should_include_distinct_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) || + shouldOfferSignerAccessCode.getClass().equals(Integer.class) || + shouldOfferSignerAccessCode.getClass().equals(String.class) || + shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for(int i = 0; i< getListSize(shouldOfferSignerAccessCode); i++) { + map.put("should_offer_signer_access_code[" + i + "]", getFromList(shouldOfferSignerAccessCode, i)); + } + } + else { + map.put("should_offer_signer_access_code", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(String.class) || + shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put("should_offer_signer_sms_authentication", shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for(int i = 0; i< getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put("should_offer_signer_sms_authentication[" + i + "]", getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } + else { + map.put("should_offer_signer_sms_authentication", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) || + shouldRemoveDocumentId.getClass().equals(Integer.class) || + shouldRemoveDocumentId.getClass().equals(String.class) || + shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for(int i = 0; i< getListSize(shouldRemoveDocumentId); i++) { + map.put("should_remove_document_id[" + i + "]", getFromList(shouldRemoveDocumentId, i)); + } + } + else { + map.put("should_remove_document_id", JSON.getDefault().getMapper().writeValueAsString(shouldRemoveDocumentId)); + } + } + if (dataResidency != null) { + if (isFileTypeOrListOfFiles(dataResidency)) { + fileTypeFound = true; + } + + if (dataResidency.getClass().equals(java.io.File.class) || + dataResidency.getClass().equals(Integer.class) || + dataResidency.getClass().equals(String.class) || + dataResidency.getClass().isEnum()) { + map.put("data_residency", dataResidency); + } else if (isListOfFile(dataResidency)) { + for(int i = 0; i< getListSize(dataResidency); i++) { + map.put("data_residency[" + i + "]", getFromList(dataResidency, i)); + } + } + else { + map.put("data_residency", JSON.getDefault().getMapper().writeValueAsString(dataResidency)); + } + } + if (allowTeamDeleteDocumentForEveryone != null) { + if (isFileTypeOrListOfFiles(allowTeamDeleteDocumentForEveryone)) { + fileTypeFound = true; + } + + if (allowTeamDeleteDocumentForEveryone.getClass().equals(java.io.File.class) || + allowTeamDeleteDocumentForEveryone.getClass().equals(Integer.class) || + allowTeamDeleteDocumentForEveryone.getClass().equals(String.class) || + allowTeamDeleteDocumentForEveryone.getClass().isEnum()) { + map.put("allow_team_delete_document_for_everyone", allowTeamDeleteDocumentForEveryone); + } else if (isListOfFile(allowTeamDeleteDocumentForEveryone)) { + for(int i = 0; i< getListSize(allowTeamDeleteDocumentForEveryone); i++) { + map.put("allow_team_delete_document_for_everyone[" + i + "]", getFromList(allowTeamDeleteDocumentForEveryone, i)); + } + } + else { + map.put("allow_team_delete_document_for_everyone", JSON.getDefault().getMapper().writeValueAsString(allowTeamDeleteDocumentForEveryone)); + } + } + if (allowTeamDownloadCsv != null) { + if (isFileTypeOrListOfFiles(allowTeamDownloadCsv)) { + fileTypeFound = true; + } + + if (allowTeamDownloadCsv.getClass().equals(java.io.File.class) || + allowTeamDownloadCsv.getClass().equals(Integer.class) || + allowTeamDownloadCsv.getClass().equals(String.class) || + allowTeamDownloadCsv.getClass().isEnum()) { + map.put("allow_team_download_csv", allowTeamDownloadCsv); + } else if (isListOfFile(allowTeamDownloadCsv)) { + for(int i = 0; i< getListSize(allowTeamDownloadCsv); i++) { + map.put("allow_team_download_csv[" + i + "]", getFromList(allowTeamDownloadCsv, i)); + } + } + else { + map.put("allow_team_download_csv", JSON.getDefault().getMapper().writeValueAsString(allowTeamDownloadCsv)); + } + } + if (lockTeamTemplateCreation != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateCreation)) { + fileTypeFound = true; + } + + if (lockTeamTemplateCreation.getClass().equals(java.io.File.class) || + lockTeamTemplateCreation.getClass().equals(Integer.class) || + lockTeamTemplateCreation.getClass().equals(String.class) || + lockTeamTemplateCreation.getClass().isEnum()) { + map.put("lock_team_template_creation", lockTeamTemplateCreation); + } else if (isListOfFile(lockTeamTemplateCreation)) { + for(int i = 0; i< getListSize(lockTeamTemplateCreation); i++) { + map.put("lock_team_template_creation[" + i + "]", getFromList(lockTeamTemplateCreation, i)); + } + } + else { + map.put("lock_team_template_creation", JSON.getDefault().getMapper().writeValueAsString(lockTeamTemplateCreation)); + } + } + if (lockTeamTemplateGallery != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateGallery)) { + fileTypeFound = true; + } + + if (lockTeamTemplateGallery.getClass().equals(java.io.File.class) || + lockTeamTemplateGallery.getClass().equals(Integer.class) || + lockTeamTemplateGallery.getClass().equals(String.class) || + lockTeamTemplateGallery.getClass().isEnum()) { + map.put("lock_team_template_gallery", lockTeamTemplateGallery); + } else if (isListOfFile(lockTeamTemplateGallery)) { + for(int i = 0; i< getListSize(lockTeamTemplateGallery); i++) { + map.put("lock_team_template_gallery[" + i + "]", getFromList(lockTeamTemplateGallery, i)); + } + } + else { + map.put("lock_team_template_gallery", JSON.getDefault().getMapper().writeValueAsString(lockTeamTemplateGallery)); + } + } + if (selfSignMessage != null) { + if (isFileTypeOrListOfFiles(selfSignMessage)) { + fileTypeFound = true; + } + + if (selfSignMessage.getClass().equals(java.io.File.class) || + selfSignMessage.getClass().equals(Integer.class) || + selfSignMessage.getClass().equals(String.class) || + selfSignMessage.getClass().isEnum()) { + map.put("self_sign_message", selfSignMessage); + } else if (isListOfFile(selfSignMessage)) { + for(int i = 0; i< getListSize(selfSignMessage); i++) { + map.put("self_sign_message[" + i + "]", getFromList(selfSignMessage, i)); + } + } + else { + map.put("self_sign_message", JSON.getDefault().getMapper().writeValueAsString(selfSignMessage)); + } + } + if (selfSignTitle != null) { + if (isFileTypeOrListOfFiles(selfSignTitle)) { + fileTypeFound = true; + } + + if (selfSignTitle.getClass().equals(java.io.File.class) || + selfSignTitle.getClass().equals(Integer.class) || + selfSignTitle.getClass().equals(String.class) || + selfSignTitle.getClass().isEnum()) { + map.put("self_sign_title", selfSignTitle); + } else if (isListOfFile(selfSignTitle)) { + for(int i = 0; i< getListSize(selfSignTitle); i++) { + map.put("self_sign_title[" + i + "]", getFromList(selfSignTitle, i)); + } + } + else { + map.put("self_sign_title", JSON.getDefault().getMapper().writeValueAsString(selfSignTitle)); + } + } + if (signatureRequestMessage != null) { + if (isFileTypeOrListOfFiles(signatureRequestMessage)) { + fileTypeFound = true; + } + + if (signatureRequestMessage.getClass().equals(java.io.File.class) || + signatureRequestMessage.getClass().equals(Integer.class) || + signatureRequestMessage.getClass().equals(String.class) || + signatureRequestMessage.getClass().isEnum()) { + map.put("signature_request_message", signatureRequestMessage); + } else if (isListOfFile(signatureRequestMessage)) { + for(int i = 0; i< getListSize(signatureRequestMessage); i++) { + map.put("signature_request_message[" + i + "]", getFromList(signatureRequestMessage, i)); + } + } + else { + map.put("signature_request_message", JSON.getDefault().getMapper().writeValueAsString(signatureRequestMessage)); + } + } + if (signatureRequestTitle != null) { + if (isFileTypeOrListOfFiles(signatureRequestTitle)) { + fileTypeFound = true; + } + + if (signatureRequestTitle.getClass().equals(java.io.File.class) || + signatureRequestTitle.getClass().equals(Integer.class) || + signatureRequestTitle.getClass().equals(String.class) || + signatureRequestTitle.getClass().isEnum()) { + map.put("signature_request_title", signatureRequestTitle); + } else if (isListOfFile(signatureRequestTitle)) { + for(int i = 0; i< getListSize(signatureRequestTitle); i++) { + map.put("signature_request_title[" + i + "]", getFromList(signatureRequestTitle, i)); + } + } + else { + map.put("signature_request_title", JSON.getDefault().getMapper().writeValueAsString(signatureRequestTitle)); + } + } + if (multifactorAuthApp != null) { + if (isFileTypeOrListOfFiles(multifactorAuthApp)) { + fileTypeFound = true; + } + + if (multifactorAuthApp.getClass().equals(java.io.File.class) || + multifactorAuthApp.getClass().equals(Integer.class) || + multifactorAuthApp.getClass().equals(String.class) || + multifactorAuthApp.getClass().isEnum()) { + map.put("multifactor_auth_app", multifactorAuthApp); + } else if (isListOfFile(multifactorAuthApp)) { + for(int i = 0; i< getListSize(multifactorAuthApp); i++) { + map.put("multifactor_auth_app[" + i + "]", getFromList(multifactorAuthApp, i)); + } + } + else { + map.put("multifactor_auth_app", JSON.getDefault().getMapper().writeValueAsString(multifactorAuthApp)); + } + } + if (multifactorAuthSms != null) { + if (isFileTypeOrListOfFiles(multifactorAuthSms)) { + fileTypeFound = true; + } + + if (multifactorAuthSms.getClass().equals(java.io.File.class) || + multifactorAuthSms.getClass().equals(Integer.class) || + multifactorAuthSms.getClass().equals(String.class) || + multifactorAuthSms.getClass().isEnum()) { + map.put("multifactor_auth_sms", multifactorAuthSms); + } else if (isListOfFile(multifactorAuthSms)) { + for(int i = 0; i< getListSize(multifactorAuthSms); i++) { + map.put("multifactor_auth_sms[" + i + "]", getFromList(multifactorAuthSms, i)); + } + } + else { + map.put("multifactor_auth_sms", JSON.getDefault().getMapper().writeValueAsString(multifactorAuthSms)); + } + } + } 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/TeamSettingsUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsUpdateRequest.java new file mode 100644 index 000000000..54bea29e1 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSettingsUpdateRequest.java @@ -0,0 +1,1552 @@ +/* + * 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.BooleanSettingUpdate; +import com.dropbox.sign.model.DataResidencySettingUpdate; +import com.dropbox.sign.model.DateFormatSettingUpdate; +import com.dropbox.sign.model.RequiredSignatureTypesSettingUpdate; +import com.dropbox.sign.model.StringSettingUpdate; +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +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; +/** + * TeamSettingsUpdateRequest + */ +@JsonPropertyOrder({ + TeamSettingsUpdateRequest.JSON_PROPERTY_COMPANY, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL, + TeamSettingsUpdateRequest.JSON_PROPERTY_CUSTOM_TAGLINE, + TeamSettingsUpdateRequest.JSON_PROPERTY_DATE_FORMAT, + TeamSettingsUpdateRequest.JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_FROM, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE, + TeamSettingsUpdateRequest.JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + TeamSettingsUpdateRequest.JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID, + TeamSettingsUpdateRequest.JSON_PROPERTY_DATA_RESIDENCY, + TeamSettingsUpdateRequest.JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE, + TeamSettingsUpdateRequest.JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV, + TeamSettingsUpdateRequest.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION, + TeamSettingsUpdateRequest.JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY, + TeamSettingsUpdateRequest.JSON_PROPERTY_SELF_SIGN_MESSAGE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SELF_SIGN_TITLE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE, + TeamSettingsUpdateRequest.JSON_PROPERTY_SIGNATURE_REQUEST_TITLE, + TeamSettingsUpdateRequest.JSON_PROPERTY_MULTIFACTOR_AUTH_APP, + TeamSettingsUpdateRequest.JSON_PROPERTY_MULTIFACTOR_AUTH_SMS, + TeamSettingsUpdateRequest.JSON_PROPERTY_UNSET +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class TeamSettingsUpdateRequest { + public static final String JSON_PROPERTY_COMPANY = "company"; + @jakarta.annotation.Nullable + private StringSettingUpdate company; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED = "custom_signing_redirect_enabled"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate customSigningRedirectEnabled; + + public static final String JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL = "custom_signing_redirect_url"; + @jakarta.annotation.Nullable + private StringSettingUpdate customSigningRedirectUrl; + + public static final String JSON_PROPERTY_CUSTOM_TAGLINE = "custom_tagline"; + @jakarta.annotation.Nullable + private StringSettingUpdate customTagline; + + public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @jakarta.annotation.Nullable + private DateFormatSettingUpdate dateFormat; + + public static final String JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED = "is_signature_reminders_enabled"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate isSignatureRemindersEnabled; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_FROM = "request_email_from"; + @jakarta.annotation.Nullable + private StringSettingUpdate requestEmailFrom; + + public static final String JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE = "request_email_signature"; + @jakarta.annotation.Nullable + private StringSettingUpdate requestEmailSignature; + + public static final String JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES = "required_signature_types"; + @jakarta.annotation.Nullable + private RequiredSignatureTypesSettingUpdate requiredSignatureTypes; + + public static final String JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF = "should_enable_tamper_proof"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate shouldEnableTamperProof; + + public static final String JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS = "should_include_distinct_pdfs"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate shouldIncludeDistinctPdfs; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE = "should_offer_signer_access_code"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate shouldOfferSignerAccessCode; + + public static final String JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = "should_offer_signer_sms_authentication"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate shouldOfferSignerSmsAuthentication; + + public static final String JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID = "should_remove_document_id"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate shouldRemoveDocumentId; + + public static final String JSON_PROPERTY_DATA_RESIDENCY = "data_residency"; + @jakarta.annotation.Nullable + private DataResidencySettingUpdate dataResidency; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE = "allow_team_delete_document_for_everyone"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate allowTeamDeleteDocumentForEveryone; + + public static final String JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV = "allow_team_download_csv"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate allowTeamDownloadCsv; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION = "lock_team_template_creation"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate lockTeamTemplateCreation; + + public static final String JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY = "lock_team_template_gallery"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate lockTeamTemplateGallery; + + public static final String JSON_PROPERTY_SELF_SIGN_MESSAGE = "self_sign_message"; + @jakarta.annotation.Nullable + private StringSettingUpdate selfSignMessage; + + public static final String JSON_PROPERTY_SELF_SIGN_TITLE = "self_sign_title"; + @jakarta.annotation.Nullable + private StringSettingUpdate selfSignTitle; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE = "signature_request_message"; + @jakarta.annotation.Nullable + private StringSettingUpdate signatureRequestMessage; + + public static final String JSON_PROPERTY_SIGNATURE_REQUEST_TITLE = "signature_request_title"; + @jakarta.annotation.Nullable + private StringSettingUpdate signatureRequestTitle; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_APP = "multifactor_auth_app"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate multifactorAuthApp; + + public static final String JSON_PROPERTY_MULTIFACTOR_AUTH_SMS = "multifactor_auth_sms"; + @jakarta.annotation.Nullable + private BooleanSettingUpdate multifactorAuthSms; + + /** + * Gets or Sets unset + */ + public enum UnsetEnum { + COMPANY(String.valueOf("company")), + + CUSTOM_SIGNING_REDIRECT_ENABLED(String.valueOf("custom_signing_redirect_enabled")), + + CUSTOM_SIGNING_REDIRECT_URL(String.valueOf("custom_signing_redirect_url")), + + CUSTOM_TAGLINE(String.valueOf("custom_tagline")), + + DATE_FORMAT(String.valueOf("date_format")), + + IS_SIGNATURE_REMINDERS_ENABLED(String.valueOf("is_signature_reminders_enabled")), + + REQUEST_EMAIL_FROM(String.valueOf("request_email_from")), + + REQUEST_EMAIL_SIGNATURE(String.valueOf("request_email_signature")), + + REQUIRED_SIGNATURE_TYPES(String.valueOf("required_signature_types")), + + SHOULD_ENABLE_TAMPER_PROOF(String.valueOf("should_enable_tamper_proof")), + + SHOULD_INCLUDE_DISTINCT_PDFS(String.valueOf("should_include_distinct_pdfs")), + + SHOULD_OFFER_SIGNER_ACCESS_CODE(String.valueOf("should_offer_signer_access_code")), + + SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION(String.valueOf("should_offer_signer_sms_authentication")), + + SHOULD_REMOVE_DOCUMENT_ID(String.valueOf("should_remove_document_id")), + + DATA_RESIDENCY(String.valueOf("data_residency")), + + ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE(String.valueOf("allow_team_delete_document_for_everyone")), + + ALLOW_TEAM_DOWNLOAD_CSV(String.valueOf("allow_team_download_csv")), + + LOCK_TEAM_TEMPLATE_CREATION(String.valueOf("lock_team_template_creation")), + + LOCK_TEAM_TEMPLATE_GALLERY(String.valueOf("lock_team_template_gallery")), + + SELF_SIGN_MESSAGE(String.valueOf("self_sign_message")), + + SELF_SIGN_TITLE(String.valueOf("self_sign_title")), + + SIGNATURE_REQUEST_MESSAGE(String.valueOf("signature_request_message")), + + SIGNATURE_REQUEST_TITLE(String.valueOf("signature_request_title")), + + MULTIFACTOR_AUTH_APP(String.valueOf("multifactor_auth_app")), + + MULTIFACTOR_AUTH_SMS(String.valueOf("multifactor_auth_sms")); + + private String value; + + UnsetEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static UnsetEnum fromValue(String value) { + for (UnsetEnum b : UnsetEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_UNSET = "unset"; + @jakarta.annotation.Nullable + private Set unset = null; + + public TeamSettingsUpdateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public TeamSettingsUpdateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, TeamSettingsUpdateRequest.class); + } + + static public TeamSettingsUpdateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + TeamSettingsUpdateRequest.class + ); + } + + public TeamSettingsUpdateRequest company(@jakarta.annotation.Nullable StringSettingUpdate company) { + this.company = company; + return this; + } + + /** + * Company name associated with this account or team. + * @return company + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getCompany() { + return company; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompany(@jakarta.annotation.Nullable StringSettingUpdate company) { + this.company = company; + } + + + public TeamSettingsUpdateRequest customSigningRedirectEnabled(@jakarta.annotation.Nullable BooleanSettingUpdate customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + return this; + } + + /** + * Whether signers are redirected to a custom URL after completing a signature request. + * @return customSigningRedirectEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getCustomSigningRedirectEnabled() { + return customSigningRedirectEnabled; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectEnabled(@jakarta.annotation.Nullable BooleanSettingUpdate customSigningRedirectEnabled) { + this.customSigningRedirectEnabled = customSigningRedirectEnabled; + } + + + public TeamSettingsUpdateRequest customSigningRedirectUrl(@jakarta.annotation.Nullable StringSettingUpdate customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + return this; + } + + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + * @return customSigningRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getCustomSigningRedirectUrl() { + return customSigningRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomSigningRedirectUrl(@jakarta.annotation.Nullable StringSettingUpdate customSigningRedirectUrl) { + this.customSigningRedirectUrl = customSigningRedirectUrl; + } + + + public TeamSettingsUpdateRequest customTagline(@jakarta.annotation.Nullable StringSettingUpdate customTagline) { + this.customTagline = customTagline; + return this; + } + + /** + * Custom tagline displayed with the account or team branding. + * @return customTagline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getCustomTagline() { + return customTagline; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomTagline(@jakarta.annotation.Nullable StringSettingUpdate customTagline) { + this.customTagline = customTagline; + } + + + public TeamSettingsUpdateRequest dateFormat(@jakarta.annotation.Nullable DateFormatSettingUpdate dateFormat) { + this.dateFormat = dateFormat; + return this; + } + + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + * @return dateFormat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DateFormatSettingUpdate getDateFormat() { + return dateFormat; + } + + + @JsonProperty(JSON_PROPERTY_DATE_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateFormat(@jakarta.annotation.Nullable DateFormatSettingUpdate dateFormat) { + this.dateFormat = dateFormat; + } + + + public TeamSettingsUpdateRequest isSignatureRemindersEnabled(@jakarta.annotation.Nullable BooleanSettingUpdate isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + return this; + } + + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + * @return isSignatureRemindersEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getIsSignatureRemindersEnabled() { + return isSignatureRemindersEnabled; + } + + + @JsonProperty(JSON_PROPERTY_IS_SIGNATURE_REMINDERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsSignatureRemindersEnabled(@jakarta.annotation.Nullable BooleanSettingUpdate isSignatureRemindersEnabled) { + this.isSignatureRemindersEnabled = isSignatureRemindersEnabled; + } + + + public TeamSettingsUpdateRequest requestEmailFrom(@jakarta.annotation.Nullable StringSettingUpdate requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + return this; + } + + /** + * Sender name shown on signature request emails. + * @return requestEmailFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getRequestEmailFrom() { + return requestEmailFrom; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailFrom(@jakarta.annotation.Nullable StringSettingUpdate requestEmailFrom) { + this.requestEmailFrom = requestEmailFrom; + } + + + public TeamSettingsUpdateRequest requestEmailSignature(@jakarta.annotation.Nullable StringSettingUpdate requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + return this; + } + + /** + * Signature appended to signature request emails. + * @return requestEmailSignature + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getRequestEmailSignature() { + return requestEmailSignature; + } + + + @JsonProperty(JSON_PROPERTY_REQUEST_EMAIL_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestEmailSignature(@jakarta.annotation.Nullable StringSettingUpdate requestEmailSignature) { + this.requestEmailSignature = requestEmailSignature; + } + + + public TeamSettingsUpdateRequest requiredSignatureTypes(@jakarta.annotation.Nullable RequiredSignatureTypesSettingUpdate requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + return this; + } + + /** + * Signature creation methods signers may use. + * @return requiredSignatureTypes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RequiredSignatureTypesSettingUpdate getRequiredSignatureTypes() { + return requiredSignatureTypes; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_SIGNATURE_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredSignatureTypes(@jakarta.annotation.Nullable RequiredSignatureTypesSettingUpdate requiredSignatureTypes) { + this.requiredSignatureTypes = requiredSignatureTypes; + } + + + public TeamSettingsUpdateRequest shouldEnableTamperProof(@jakarta.annotation.Nullable BooleanSettingUpdate shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + return this; + } + + /** + * Whether completed documents include a digital tamper-proof seal. + * @return shouldEnableTamperProof + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getShouldEnableTamperProof() { + return shouldEnableTamperProof; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_ENABLE_TAMPER_PROOF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldEnableTamperProof(@jakarta.annotation.Nullable BooleanSettingUpdate shouldEnableTamperProof) { + this.shouldEnableTamperProof = shouldEnableTamperProof; + } + + + public TeamSettingsUpdateRequest shouldIncludeDistinctPdfs(@jakarta.annotation.Nullable BooleanSettingUpdate shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + return this; + } + + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + * @return shouldIncludeDistinctPdfs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getShouldIncludeDistinctPdfs() { + return shouldIncludeDistinctPdfs; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_INCLUDE_DISTINCT_PDFS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldIncludeDistinctPdfs(@jakarta.annotation.Nullable BooleanSettingUpdate shouldIncludeDistinctPdfs) { + this.shouldIncludeDistinctPdfs = shouldIncludeDistinctPdfs; + } + + + public TeamSettingsUpdateRequest shouldOfferSignerAccessCode(@jakarta.annotation.Nullable BooleanSettingUpdate shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + return this; + } + + /** + * Whether senders can require an access code to verify a signer. + * @return shouldOfferSignerAccessCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getShouldOfferSignerAccessCode() { + return shouldOfferSignerAccessCode; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_ACCESS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerAccessCode(@jakarta.annotation.Nullable BooleanSettingUpdate shouldOfferSignerAccessCode) { + this.shouldOfferSignerAccessCode = shouldOfferSignerAccessCode; + } + + + public TeamSettingsUpdateRequest shouldOfferSignerSmsAuthentication(@jakarta.annotation.Nullable BooleanSettingUpdate shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + return this; + } + + /** + * Whether senders can require SMS authentication to verify a signer. + * @return shouldOfferSignerSmsAuthentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getShouldOfferSignerSmsAuthentication() { + return shouldOfferSignerSmsAuthentication; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldOfferSignerSmsAuthentication(@jakarta.annotation.Nullable BooleanSettingUpdate shouldOfferSignerSmsAuthentication) { + this.shouldOfferSignerSmsAuthentication = shouldOfferSignerSmsAuthentication; + } + + + public TeamSettingsUpdateRequest shouldRemoveDocumentId(@jakarta.annotation.Nullable BooleanSettingUpdate shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + return this; + } + + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + * @return shouldRemoveDocumentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getShouldRemoveDocumentId() { + return shouldRemoveDocumentId; + } + + + @JsonProperty(JSON_PROPERTY_SHOULD_REMOVE_DOCUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShouldRemoveDocumentId(@jakarta.annotation.Nullable BooleanSettingUpdate shouldRemoveDocumentId) { + this.shouldRemoveDocumentId = shouldRemoveDocumentId; + } + + + public TeamSettingsUpdateRequest dataResidency(@jakarta.annotation.Nullable DataResidencySettingUpdate dataResidency) { + this.dataResidency = dataResidency; + return this; + } + + /** + * Storage region for team documents. + * @return dataResidency + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DataResidencySettingUpdate getDataResidency() { + return dataResidency; + } + + + @JsonProperty(JSON_PROPERTY_DATA_RESIDENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataResidency(@jakarta.annotation.Nullable DataResidencySettingUpdate dataResidency) { + this.dataResidency = dataResidency; + } + + + public TeamSettingsUpdateRequest allowTeamDeleteDocumentForEveryone(@jakarta.annotation.Nullable BooleanSettingUpdate allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + return this; + } + + /** + * Whether team members can delete a document for all participants. + * @return allowTeamDeleteDocumentForEveryone + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getAllowTeamDeleteDocumentForEveryone() { + return allowTeamDeleteDocumentForEveryone; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowTeamDeleteDocumentForEveryone(@jakarta.annotation.Nullable BooleanSettingUpdate allowTeamDeleteDocumentForEveryone) { + this.allowTeamDeleteDocumentForEveryone = allowTeamDeleteDocumentForEveryone; + } + + + public TeamSettingsUpdateRequest allowTeamDownloadCsv(@jakarta.annotation.Nullable BooleanSettingUpdate allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + return this; + } + + /** + * Whether team members can download CSV files. + * @return allowTeamDownloadCsv + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getAllowTeamDownloadCsv() { + return allowTeamDownloadCsv; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_TEAM_DOWNLOAD_CSV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowTeamDownloadCsv(@jakarta.annotation.Nullable BooleanSettingUpdate allowTeamDownloadCsv) { + this.allowTeamDownloadCsv = allowTeamDownloadCsv; + } + + + public TeamSettingsUpdateRequest lockTeamTemplateCreation(@jakarta.annotation.Nullable BooleanSettingUpdate lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + return this; + } + + /** + * Whether team members are prevented from creating templates. + * @return lockTeamTemplateCreation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getLockTeamTemplateCreation() { + return lockTeamTemplateCreation; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_CREATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockTeamTemplateCreation(@jakarta.annotation.Nullable BooleanSettingUpdate lockTeamTemplateCreation) { + this.lockTeamTemplateCreation = lockTeamTemplateCreation; + } + + + public TeamSettingsUpdateRequest lockTeamTemplateGallery(@jakarta.annotation.Nullable BooleanSettingUpdate lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + return this; + } + + /** + * Whether team members are prevented from using the template gallery. + * @return lockTeamTemplateGallery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getLockTeamTemplateGallery() { + return lockTeamTemplateGallery; + } + + + @JsonProperty(JSON_PROPERTY_LOCK_TEAM_TEMPLATE_GALLERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockTeamTemplateGallery(@jakarta.annotation.Nullable BooleanSettingUpdate lockTeamTemplateGallery) { + this.lockTeamTemplateGallery = lockTeamTemplateGallery; + } + + + public TeamSettingsUpdateRequest selfSignMessage(@jakarta.annotation.Nullable StringSettingUpdate selfSignMessage) { + this.selfSignMessage = selfSignMessage; + return this; + } + + /** + * Default message enforced for team members when they create self-signed documents. + * @return selfSignMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getSelfSignMessage() { + return selfSignMessage; + } + + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelfSignMessage(@jakarta.annotation.Nullable StringSettingUpdate selfSignMessage) { + this.selfSignMessage = selfSignMessage; + } + + + public TeamSettingsUpdateRequest selfSignTitle(@jakarta.annotation.Nullable StringSettingUpdate selfSignTitle) { + this.selfSignTitle = selfSignTitle; + return this; + } + + /** + * Default title enforced for team members when they create self-signed documents. + * @return selfSignTitle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getSelfSignTitle() { + return selfSignTitle; + } + + + @JsonProperty(JSON_PROPERTY_SELF_SIGN_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelfSignTitle(@jakarta.annotation.Nullable StringSettingUpdate selfSignTitle) { + this.selfSignTitle = selfSignTitle; + } + + + public TeamSettingsUpdateRequest signatureRequestMessage(@jakarta.annotation.Nullable StringSettingUpdate signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + return this; + } + + /** + * Default message enforced for team members when they create signature requests. + * @return signatureRequestMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getSignatureRequestMessage() { + return signatureRequestMessage; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatureRequestMessage(@jakarta.annotation.Nullable StringSettingUpdate signatureRequestMessage) { + this.signatureRequestMessage = signatureRequestMessage; + } + + + public TeamSettingsUpdateRequest signatureRequestTitle(@jakarta.annotation.Nullable StringSettingUpdate signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + return this; + } + + /** + * Default title enforced for team members when they create signature requests. + * @return signatureRequestTitle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StringSettingUpdate getSignatureRequestTitle() { + return signatureRequestTitle; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatureRequestTitle(@jakarta.annotation.Nullable StringSettingUpdate signatureRequestTitle) { + this.signatureRequestTitle = signatureRequestTitle; + } + + + public TeamSettingsUpdateRequest multifactorAuthApp(@jakarta.annotation.Nullable BooleanSettingUpdate multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + return this; + } + + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + * @return multifactorAuthApp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getMultifactorAuthApp() { + return multifactorAuthApp; + } + + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultifactorAuthApp(@jakarta.annotation.Nullable BooleanSettingUpdate multifactorAuthApp) { + this.multifactorAuthApp = multifactorAuthApp; + } + + + public TeamSettingsUpdateRequest multifactorAuthSms(@jakarta.annotation.Nullable BooleanSettingUpdate multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + return this; + } + + /** + * Whether SMS multifactor authentication is enabled for the team. + * @return multifactorAuthSms + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BooleanSettingUpdate getMultifactorAuthSms() { + return multifactorAuthSms; + } + + + @JsonProperty(JSON_PROPERTY_MULTIFACTOR_AUTH_SMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultifactorAuthSms(@jakarta.annotation.Nullable BooleanSettingUpdate multifactorAuthSms) { + this.multifactorAuthSms = multifactorAuthSms; + } + + + public TeamSettingsUpdateRequest unset(@jakarta.annotation.Nullable Set unset) { + this.unset = unset; + return this; + } + + public TeamSettingsUpdateRequest addUnsetItem(UnsetEnum unsetItem) { + if (this.unset == null) { + this.unset = new LinkedHashSet<>(); + } + this.unset.add(unsetItem); + return this; + } + + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + * @return unset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Set getUnset() { + return unset; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(JSON_PROPERTY_UNSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnset(@jakarta.annotation.Nullable Set unset) { + this.unset = unset; + } + + + /** + * Return true if this TeamSettingsUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TeamSettingsUpdateRequest teamSettingsUpdateRequest = (TeamSettingsUpdateRequest) o; + return Objects.equals(this.company, teamSettingsUpdateRequest.company) && + Objects.equals(this.customSigningRedirectEnabled, teamSettingsUpdateRequest.customSigningRedirectEnabled) && + Objects.equals(this.customSigningRedirectUrl, teamSettingsUpdateRequest.customSigningRedirectUrl) && + Objects.equals(this.customTagline, teamSettingsUpdateRequest.customTagline) && + Objects.equals(this.dateFormat, teamSettingsUpdateRequest.dateFormat) && + Objects.equals(this.isSignatureRemindersEnabled, teamSettingsUpdateRequest.isSignatureRemindersEnabled) && + Objects.equals(this.requestEmailFrom, teamSettingsUpdateRequest.requestEmailFrom) && + Objects.equals(this.requestEmailSignature, teamSettingsUpdateRequest.requestEmailSignature) && + Objects.equals(this.requiredSignatureTypes, teamSettingsUpdateRequest.requiredSignatureTypes) && + Objects.equals(this.shouldEnableTamperProof, teamSettingsUpdateRequest.shouldEnableTamperProof) && + Objects.equals(this.shouldIncludeDistinctPdfs, teamSettingsUpdateRequest.shouldIncludeDistinctPdfs) && + Objects.equals(this.shouldOfferSignerAccessCode, teamSettingsUpdateRequest.shouldOfferSignerAccessCode) && + Objects.equals(this.shouldOfferSignerSmsAuthentication, teamSettingsUpdateRequest.shouldOfferSignerSmsAuthentication) && + Objects.equals(this.shouldRemoveDocumentId, teamSettingsUpdateRequest.shouldRemoveDocumentId) && + Objects.equals(this.dataResidency, teamSettingsUpdateRequest.dataResidency) && + Objects.equals(this.allowTeamDeleteDocumentForEveryone, teamSettingsUpdateRequest.allowTeamDeleteDocumentForEveryone) && + Objects.equals(this.allowTeamDownloadCsv, teamSettingsUpdateRequest.allowTeamDownloadCsv) && + Objects.equals(this.lockTeamTemplateCreation, teamSettingsUpdateRequest.lockTeamTemplateCreation) && + Objects.equals(this.lockTeamTemplateGallery, teamSettingsUpdateRequest.lockTeamTemplateGallery) && + Objects.equals(this.selfSignMessage, teamSettingsUpdateRequest.selfSignMessage) && + Objects.equals(this.selfSignTitle, teamSettingsUpdateRequest.selfSignTitle) && + Objects.equals(this.signatureRequestMessage, teamSettingsUpdateRequest.signatureRequestMessage) && + Objects.equals(this.signatureRequestTitle, teamSettingsUpdateRequest.signatureRequestTitle) && + Objects.equals(this.multifactorAuthApp, teamSettingsUpdateRequest.multifactorAuthApp) && + Objects.equals(this.multifactorAuthSms, teamSettingsUpdateRequest.multifactorAuthSms) && + Objects.equals(this.unset, teamSettingsUpdateRequest.unset); + } + + @Override + public int hashCode() { + return Objects.hash(company, customSigningRedirectEnabled, customSigningRedirectUrl, customTagline, dateFormat, isSignatureRemindersEnabled, requestEmailFrom, requestEmailSignature, requiredSignatureTypes, shouldEnableTamperProof, shouldIncludeDistinctPdfs, shouldOfferSignerAccessCode, shouldOfferSignerSmsAuthentication, shouldRemoveDocumentId, dataResidency, allowTeamDeleteDocumentForEveryone, allowTeamDownloadCsv, lockTeamTemplateCreation, lockTeamTemplateGallery, selfSignMessage, selfSignTitle, signatureRequestMessage, signatureRequestTitle, multifactorAuthApp, multifactorAuthSms, unset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TeamSettingsUpdateRequest {\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" customSigningRedirectEnabled: ").append(toIndentedString(customSigningRedirectEnabled)).append("\n"); + sb.append(" customSigningRedirectUrl: ").append(toIndentedString(customSigningRedirectUrl)).append("\n"); + sb.append(" customTagline: ").append(toIndentedString(customTagline)).append("\n"); + sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); + sb.append(" isSignatureRemindersEnabled: ").append(toIndentedString(isSignatureRemindersEnabled)).append("\n"); + sb.append(" requestEmailFrom: ").append(toIndentedString(requestEmailFrom)).append("\n"); + sb.append(" requestEmailSignature: ").append(toIndentedString(requestEmailSignature)).append("\n"); + sb.append(" requiredSignatureTypes: ").append(toIndentedString(requiredSignatureTypes)).append("\n"); + sb.append(" shouldEnableTamperProof: ").append(toIndentedString(shouldEnableTamperProof)).append("\n"); + sb.append(" shouldIncludeDistinctPdfs: ").append(toIndentedString(shouldIncludeDistinctPdfs)).append("\n"); + sb.append(" shouldOfferSignerAccessCode: ").append(toIndentedString(shouldOfferSignerAccessCode)).append("\n"); + sb.append(" shouldOfferSignerSmsAuthentication: ").append(toIndentedString(shouldOfferSignerSmsAuthentication)).append("\n"); + sb.append(" shouldRemoveDocumentId: ").append(toIndentedString(shouldRemoveDocumentId)).append("\n"); + sb.append(" dataResidency: ").append(toIndentedString(dataResidency)).append("\n"); + sb.append(" allowTeamDeleteDocumentForEveryone: ").append(toIndentedString(allowTeamDeleteDocumentForEveryone)).append("\n"); + sb.append(" allowTeamDownloadCsv: ").append(toIndentedString(allowTeamDownloadCsv)).append("\n"); + sb.append(" lockTeamTemplateCreation: ").append(toIndentedString(lockTeamTemplateCreation)).append("\n"); + sb.append(" lockTeamTemplateGallery: ").append(toIndentedString(lockTeamTemplateGallery)).append("\n"); + sb.append(" selfSignMessage: ").append(toIndentedString(selfSignMessage)).append("\n"); + sb.append(" selfSignTitle: ").append(toIndentedString(selfSignTitle)).append("\n"); + sb.append(" signatureRequestMessage: ").append(toIndentedString(signatureRequestMessage)).append("\n"); + sb.append(" signatureRequestTitle: ").append(toIndentedString(signatureRequestTitle)).append("\n"); + sb.append(" multifactorAuthApp: ").append(toIndentedString(multifactorAuthApp)).append("\n"); + sb.append(" multifactorAuthSms: ").append(toIndentedString(multifactorAuthSms)).append("\n"); + sb.append(" unset: ").append(toIndentedString(unset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (company != null) { + if (isFileTypeOrListOfFiles(company)) { + fileTypeFound = true; + } + + if (company.getClass().equals(java.io.File.class) || + company.getClass().equals(Integer.class) || + company.getClass().equals(String.class) || + company.getClass().isEnum()) { + map.put("company", company); + } else if (isListOfFile(company)) { + for(int i = 0; i< getListSize(company); i++) { + map.put("company[" + i + "]", getFromList(company, i)); + } + } + else { + map.put("company", JSON.getDefault().getMapper().writeValueAsString(company)); + } + } + if (customSigningRedirectEnabled != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectEnabled)) { + fileTypeFound = true; + } + + if (customSigningRedirectEnabled.getClass().equals(java.io.File.class) || + customSigningRedirectEnabled.getClass().equals(Integer.class) || + customSigningRedirectEnabled.getClass().equals(String.class) || + customSigningRedirectEnabled.getClass().isEnum()) { + map.put("custom_signing_redirect_enabled", customSigningRedirectEnabled); + } else if (isListOfFile(customSigningRedirectEnabled)) { + for(int i = 0; i< getListSize(customSigningRedirectEnabled); i++) { + map.put("custom_signing_redirect_enabled[" + i + "]", getFromList(customSigningRedirectEnabled, i)); + } + } + else { + map.put("custom_signing_redirect_enabled", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectEnabled)); + } + } + if (customSigningRedirectUrl != null) { + if (isFileTypeOrListOfFiles(customSigningRedirectUrl)) { + fileTypeFound = true; + } + + if (customSigningRedirectUrl.getClass().equals(java.io.File.class) || + customSigningRedirectUrl.getClass().equals(Integer.class) || + customSigningRedirectUrl.getClass().equals(String.class) || + customSigningRedirectUrl.getClass().isEnum()) { + map.put("custom_signing_redirect_url", customSigningRedirectUrl); + } else if (isListOfFile(customSigningRedirectUrl)) { + for(int i = 0; i< getListSize(customSigningRedirectUrl); i++) { + map.put("custom_signing_redirect_url[" + i + "]", getFromList(customSigningRedirectUrl, i)); + } + } + else { + map.put("custom_signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(customSigningRedirectUrl)); + } + } + if (customTagline != null) { + if (isFileTypeOrListOfFiles(customTagline)) { + fileTypeFound = true; + } + + if (customTagline.getClass().equals(java.io.File.class) || + customTagline.getClass().equals(Integer.class) || + customTagline.getClass().equals(String.class) || + customTagline.getClass().isEnum()) { + map.put("custom_tagline", customTagline); + } else if (isListOfFile(customTagline)) { + for(int i = 0; i< getListSize(customTagline); i++) { + map.put("custom_tagline[" + i + "]", getFromList(customTagline, i)); + } + } + else { + map.put("custom_tagline", JSON.getDefault().getMapper().writeValueAsString(customTagline)); + } + } + if (dateFormat != null) { + if (isFileTypeOrListOfFiles(dateFormat)) { + fileTypeFound = true; + } + + if (dateFormat.getClass().equals(java.io.File.class) || + dateFormat.getClass().equals(Integer.class) || + dateFormat.getClass().equals(String.class) || + dateFormat.getClass().isEnum()) { + map.put("date_format", dateFormat); + } else if (isListOfFile(dateFormat)) { + for(int i = 0; i< getListSize(dateFormat); i++) { + map.put("date_format[" + i + "]", getFromList(dateFormat, i)); + } + } + else { + map.put("date_format", JSON.getDefault().getMapper().writeValueAsString(dateFormat)); + } + } + if (isSignatureRemindersEnabled != null) { + if (isFileTypeOrListOfFiles(isSignatureRemindersEnabled)) { + fileTypeFound = true; + } + + if (isSignatureRemindersEnabled.getClass().equals(java.io.File.class) || + isSignatureRemindersEnabled.getClass().equals(Integer.class) || + isSignatureRemindersEnabled.getClass().equals(String.class) || + isSignatureRemindersEnabled.getClass().isEnum()) { + map.put("is_signature_reminders_enabled", isSignatureRemindersEnabled); + } else if (isListOfFile(isSignatureRemindersEnabled)) { + for(int i = 0; i< getListSize(isSignatureRemindersEnabled); i++) { + map.put("is_signature_reminders_enabled[" + i + "]", getFromList(isSignatureRemindersEnabled, i)); + } + } + else { + map.put("is_signature_reminders_enabled", JSON.getDefault().getMapper().writeValueAsString(isSignatureRemindersEnabled)); + } + } + if (requestEmailFrom != null) { + if (isFileTypeOrListOfFiles(requestEmailFrom)) { + fileTypeFound = true; + } + + if (requestEmailFrom.getClass().equals(java.io.File.class) || + requestEmailFrom.getClass().equals(Integer.class) || + requestEmailFrom.getClass().equals(String.class) || + requestEmailFrom.getClass().isEnum()) { + map.put("request_email_from", requestEmailFrom); + } else if (isListOfFile(requestEmailFrom)) { + for(int i = 0; i< getListSize(requestEmailFrom); i++) { + map.put("request_email_from[" + i + "]", getFromList(requestEmailFrom, i)); + } + } + else { + map.put("request_email_from", JSON.getDefault().getMapper().writeValueAsString(requestEmailFrom)); + } + } + if (requestEmailSignature != null) { + if (isFileTypeOrListOfFiles(requestEmailSignature)) { + fileTypeFound = true; + } + + if (requestEmailSignature.getClass().equals(java.io.File.class) || + requestEmailSignature.getClass().equals(Integer.class) || + requestEmailSignature.getClass().equals(String.class) || + requestEmailSignature.getClass().isEnum()) { + map.put("request_email_signature", requestEmailSignature); + } else if (isListOfFile(requestEmailSignature)) { + for(int i = 0; i< getListSize(requestEmailSignature); i++) { + map.put("request_email_signature[" + i + "]", getFromList(requestEmailSignature, i)); + } + } + else { + map.put("request_email_signature", JSON.getDefault().getMapper().writeValueAsString(requestEmailSignature)); + } + } + if (requiredSignatureTypes != null) { + if (isFileTypeOrListOfFiles(requiredSignatureTypes)) { + fileTypeFound = true; + } + + if (requiredSignatureTypes.getClass().equals(java.io.File.class) || + requiredSignatureTypes.getClass().equals(Integer.class) || + requiredSignatureTypes.getClass().equals(String.class) || + requiredSignatureTypes.getClass().isEnum()) { + map.put("required_signature_types", requiredSignatureTypes); + } else if (isListOfFile(requiredSignatureTypes)) { + for(int i = 0; i< getListSize(requiredSignatureTypes); i++) { + map.put("required_signature_types[" + i + "]", getFromList(requiredSignatureTypes, i)); + } + } + else { + map.put("required_signature_types", JSON.getDefault().getMapper().writeValueAsString(requiredSignatureTypes)); + } + } + if (shouldEnableTamperProof != null) { + if (isFileTypeOrListOfFiles(shouldEnableTamperProof)) { + fileTypeFound = true; + } + + if (shouldEnableTamperProof.getClass().equals(java.io.File.class) || + shouldEnableTamperProof.getClass().equals(Integer.class) || + shouldEnableTamperProof.getClass().equals(String.class) || + shouldEnableTamperProof.getClass().isEnum()) { + map.put("should_enable_tamper_proof", shouldEnableTamperProof); + } else if (isListOfFile(shouldEnableTamperProof)) { + for(int i = 0; i< getListSize(shouldEnableTamperProof); i++) { + map.put("should_enable_tamper_proof[" + i + "]", getFromList(shouldEnableTamperProof, i)); + } + } + else { + map.put("should_enable_tamper_proof", JSON.getDefault().getMapper().writeValueAsString(shouldEnableTamperProof)); + } + } + if (shouldIncludeDistinctPdfs != null) { + if (isFileTypeOrListOfFiles(shouldIncludeDistinctPdfs)) { + fileTypeFound = true; + } + + if (shouldIncludeDistinctPdfs.getClass().equals(java.io.File.class) || + shouldIncludeDistinctPdfs.getClass().equals(Integer.class) || + shouldIncludeDistinctPdfs.getClass().equals(String.class) || + shouldIncludeDistinctPdfs.getClass().isEnum()) { + map.put("should_include_distinct_pdfs", shouldIncludeDistinctPdfs); + } else if (isListOfFile(shouldIncludeDistinctPdfs)) { + for(int i = 0; i< getListSize(shouldIncludeDistinctPdfs); i++) { + map.put("should_include_distinct_pdfs[" + i + "]", getFromList(shouldIncludeDistinctPdfs, i)); + } + } + else { + map.put("should_include_distinct_pdfs", JSON.getDefault().getMapper().writeValueAsString(shouldIncludeDistinctPdfs)); + } + } + if (shouldOfferSignerAccessCode != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerAccessCode)) { + fileTypeFound = true; + } + + if (shouldOfferSignerAccessCode.getClass().equals(java.io.File.class) || + shouldOfferSignerAccessCode.getClass().equals(Integer.class) || + shouldOfferSignerAccessCode.getClass().equals(String.class) || + shouldOfferSignerAccessCode.getClass().isEnum()) { + map.put("should_offer_signer_access_code", shouldOfferSignerAccessCode); + } else if (isListOfFile(shouldOfferSignerAccessCode)) { + for(int i = 0; i< getListSize(shouldOfferSignerAccessCode); i++) { + map.put("should_offer_signer_access_code[" + i + "]", getFromList(shouldOfferSignerAccessCode, i)); + } + } + else { + map.put("should_offer_signer_access_code", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerAccessCode)); + } + } + if (shouldOfferSignerSmsAuthentication != null) { + if (isFileTypeOrListOfFiles(shouldOfferSignerSmsAuthentication)) { + fileTypeFound = true; + } + + if (shouldOfferSignerSmsAuthentication.getClass().equals(java.io.File.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(Integer.class) || + shouldOfferSignerSmsAuthentication.getClass().equals(String.class) || + shouldOfferSignerSmsAuthentication.getClass().isEnum()) { + map.put("should_offer_signer_sms_authentication", shouldOfferSignerSmsAuthentication); + } else if (isListOfFile(shouldOfferSignerSmsAuthentication)) { + for(int i = 0; i< getListSize(shouldOfferSignerSmsAuthentication); i++) { + map.put("should_offer_signer_sms_authentication[" + i + "]", getFromList(shouldOfferSignerSmsAuthentication, i)); + } + } + else { + map.put("should_offer_signer_sms_authentication", JSON.getDefault().getMapper().writeValueAsString(shouldOfferSignerSmsAuthentication)); + } + } + if (shouldRemoveDocumentId != null) { + if (isFileTypeOrListOfFiles(shouldRemoveDocumentId)) { + fileTypeFound = true; + } + + if (shouldRemoveDocumentId.getClass().equals(java.io.File.class) || + shouldRemoveDocumentId.getClass().equals(Integer.class) || + shouldRemoveDocumentId.getClass().equals(String.class) || + shouldRemoveDocumentId.getClass().isEnum()) { + map.put("should_remove_document_id", shouldRemoveDocumentId); + } else if (isListOfFile(shouldRemoveDocumentId)) { + for(int i = 0; i< getListSize(shouldRemoveDocumentId); i++) { + map.put("should_remove_document_id[" + i + "]", getFromList(shouldRemoveDocumentId, i)); + } + } + else { + map.put("should_remove_document_id", JSON.getDefault().getMapper().writeValueAsString(shouldRemoveDocumentId)); + } + } + if (dataResidency != null) { + if (isFileTypeOrListOfFiles(dataResidency)) { + fileTypeFound = true; + } + + if (dataResidency.getClass().equals(java.io.File.class) || + dataResidency.getClass().equals(Integer.class) || + dataResidency.getClass().equals(String.class) || + dataResidency.getClass().isEnum()) { + map.put("data_residency", dataResidency); + } else if (isListOfFile(dataResidency)) { + for(int i = 0; i< getListSize(dataResidency); i++) { + map.put("data_residency[" + i + "]", getFromList(dataResidency, i)); + } + } + else { + map.put("data_residency", JSON.getDefault().getMapper().writeValueAsString(dataResidency)); + } + } + if (allowTeamDeleteDocumentForEveryone != null) { + if (isFileTypeOrListOfFiles(allowTeamDeleteDocumentForEveryone)) { + fileTypeFound = true; + } + + if (allowTeamDeleteDocumentForEveryone.getClass().equals(java.io.File.class) || + allowTeamDeleteDocumentForEveryone.getClass().equals(Integer.class) || + allowTeamDeleteDocumentForEveryone.getClass().equals(String.class) || + allowTeamDeleteDocumentForEveryone.getClass().isEnum()) { + map.put("allow_team_delete_document_for_everyone", allowTeamDeleteDocumentForEveryone); + } else if (isListOfFile(allowTeamDeleteDocumentForEveryone)) { + for(int i = 0; i< getListSize(allowTeamDeleteDocumentForEveryone); i++) { + map.put("allow_team_delete_document_for_everyone[" + i + "]", getFromList(allowTeamDeleteDocumentForEveryone, i)); + } + } + else { + map.put("allow_team_delete_document_for_everyone", JSON.getDefault().getMapper().writeValueAsString(allowTeamDeleteDocumentForEveryone)); + } + } + if (allowTeamDownloadCsv != null) { + if (isFileTypeOrListOfFiles(allowTeamDownloadCsv)) { + fileTypeFound = true; + } + + if (allowTeamDownloadCsv.getClass().equals(java.io.File.class) || + allowTeamDownloadCsv.getClass().equals(Integer.class) || + allowTeamDownloadCsv.getClass().equals(String.class) || + allowTeamDownloadCsv.getClass().isEnum()) { + map.put("allow_team_download_csv", allowTeamDownloadCsv); + } else if (isListOfFile(allowTeamDownloadCsv)) { + for(int i = 0; i< getListSize(allowTeamDownloadCsv); i++) { + map.put("allow_team_download_csv[" + i + "]", getFromList(allowTeamDownloadCsv, i)); + } + } + else { + map.put("allow_team_download_csv", JSON.getDefault().getMapper().writeValueAsString(allowTeamDownloadCsv)); + } + } + if (lockTeamTemplateCreation != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateCreation)) { + fileTypeFound = true; + } + + if (lockTeamTemplateCreation.getClass().equals(java.io.File.class) || + lockTeamTemplateCreation.getClass().equals(Integer.class) || + lockTeamTemplateCreation.getClass().equals(String.class) || + lockTeamTemplateCreation.getClass().isEnum()) { + map.put("lock_team_template_creation", lockTeamTemplateCreation); + } else if (isListOfFile(lockTeamTemplateCreation)) { + for(int i = 0; i< getListSize(lockTeamTemplateCreation); i++) { + map.put("lock_team_template_creation[" + i + "]", getFromList(lockTeamTemplateCreation, i)); + } + } + else { + map.put("lock_team_template_creation", JSON.getDefault().getMapper().writeValueAsString(lockTeamTemplateCreation)); + } + } + if (lockTeamTemplateGallery != null) { + if (isFileTypeOrListOfFiles(lockTeamTemplateGallery)) { + fileTypeFound = true; + } + + if (lockTeamTemplateGallery.getClass().equals(java.io.File.class) || + lockTeamTemplateGallery.getClass().equals(Integer.class) || + lockTeamTemplateGallery.getClass().equals(String.class) || + lockTeamTemplateGallery.getClass().isEnum()) { + map.put("lock_team_template_gallery", lockTeamTemplateGallery); + } else if (isListOfFile(lockTeamTemplateGallery)) { + for(int i = 0; i< getListSize(lockTeamTemplateGallery); i++) { + map.put("lock_team_template_gallery[" + i + "]", getFromList(lockTeamTemplateGallery, i)); + } + } + else { + map.put("lock_team_template_gallery", JSON.getDefault().getMapper().writeValueAsString(lockTeamTemplateGallery)); + } + } + if (selfSignMessage != null) { + if (isFileTypeOrListOfFiles(selfSignMessage)) { + fileTypeFound = true; + } + + if (selfSignMessage.getClass().equals(java.io.File.class) || + selfSignMessage.getClass().equals(Integer.class) || + selfSignMessage.getClass().equals(String.class) || + selfSignMessage.getClass().isEnum()) { + map.put("self_sign_message", selfSignMessage); + } else if (isListOfFile(selfSignMessage)) { + for(int i = 0; i< getListSize(selfSignMessage); i++) { + map.put("self_sign_message[" + i + "]", getFromList(selfSignMessage, i)); + } + } + else { + map.put("self_sign_message", JSON.getDefault().getMapper().writeValueAsString(selfSignMessage)); + } + } + if (selfSignTitle != null) { + if (isFileTypeOrListOfFiles(selfSignTitle)) { + fileTypeFound = true; + } + + if (selfSignTitle.getClass().equals(java.io.File.class) || + selfSignTitle.getClass().equals(Integer.class) || + selfSignTitle.getClass().equals(String.class) || + selfSignTitle.getClass().isEnum()) { + map.put("self_sign_title", selfSignTitle); + } else if (isListOfFile(selfSignTitle)) { + for(int i = 0; i< getListSize(selfSignTitle); i++) { + map.put("self_sign_title[" + i + "]", getFromList(selfSignTitle, i)); + } + } + else { + map.put("self_sign_title", JSON.getDefault().getMapper().writeValueAsString(selfSignTitle)); + } + } + if (signatureRequestMessage != null) { + if (isFileTypeOrListOfFiles(signatureRequestMessage)) { + fileTypeFound = true; + } + + if (signatureRequestMessage.getClass().equals(java.io.File.class) || + signatureRequestMessage.getClass().equals(Integer.class) || + signatureRequestMessage.getClass().equals(String.class) || + signatureRequestMessage.getClass().isEnum()) { + map.put("signature_request_message", signatureRequestMessage); + } else if (isListOfFile(signatureRequestMessage)) { + for(int i = 0; i< getListSize(signatureRequestMessage); i++) { + map.put("signature_request_message[" + i + "]", getFromList(signatureRequestMessage, i)); + } + } + else { + map.put("signature_request_message", JSON.getDefault().getMapper().writeValueAsString(signatureRequestMessage)); + } + } + if (signatureRequestTitle != null) { + if (isFileTypeOrListOfFiles(signatureRequestTitle)) { + fileTypeFound = true; + } + + if (signatureRequestTitle.getClass().equals(java.io.File.class) || + signatureRequestTitle.getClass().equals(Integer.class) || + signatureRequestTitle.getClass().equals(String.class) || + signatureRequestTitle.getClass().isEnum()) { + map.put("signature_request_title", signatureRequestTitle); + } else if (isListOfFile(signatureRequestTitle)) { + for(int i = 0; i< getListSize(signatureRequestTitle); i++) { + map.put("signature_request_title[" + i + "]", getFromList(signatureRequestTitle, i)); + } + } + else { + map.put("signature_request_title", JSON.getDefault().getMapper().writeValueAsString(signatureRequestTitle)); + } + } + if (multifactorAuthApp != null) { + if (isFileTypeOrListOfFiles(multifactorAuthApp)) { + fileTypeFound = true; + } + + if (multifactorAuthApp.getClass().equals(java.io.File.class) || + multifactorAuthApp.getClass().equals(Integer.class) || + multifactorAuthApp.getClass().equals(String.class) || + multifactorAuthApp.getClass().isEnum()) { + map.put("multifactor_auth_app", multifactorAuthApp); + } else if (isListOfFile(multifactorAuthApp)) { + for(int i = 0; i< getListSize(multifactorAuthApp); i++) { + map.put("multifactor_auth_app[" + i + "]", getFromList(multifactorAuthApp, i)); + } + } + else { + map.put("multifactor_auth_app", JSON.getDefault().getMapper().writeValueAsString(multifactorAuthApp)); + } + } + if (multifactorAuthSms != null) { + if (isFileTypeOrListOfFiles(multifactorAuthSms)) { + fileTypeFound = true; + } + + if (multifactorAuthSms.getClass().equals(java.io.File.class) || + multifactorAuthSms.getClass().equals(Integer.class) || + multifactorAuthSms.getClass().equals(String.class) || + multifactorAuthSms.getClass().isEnum()) { + map.put("multifactor_auth_sms", multifactorAuthSms); + } else if (isListOfFile(multifactorAuthSms)) { + for(int i = 0; i< getListSize(multifactorAuthSms); i++) { + map.put("multifactor_auth_sms[" + i + "]", getFromList(multifactorAuthSms, i)); + } + } + else { + map.put("multifactor_auth_sms", JSON.getDefault().getMapper().writeValueAsString(multifactorAuthSms)); + } + } + if (unset != null) { + if (isFileTypeOrListOfFiles(unset)) { + fileTypeFound = true; + } + + if (unset.getClass().equals(java.io.File.class) || + unset.getClass().equals(Integer.class) || + unset.getClass().equals(String.class) || + unset.getClass().isEnum()) { + map.put("unset", unset); + } else if (isListOfFile(unset)) { + for(int i = 0; i< getListSize(unset); i++) { + map.put("unset[" + i + "]", getFromList(unset, i)); + } + } + else { + map.put("unset", JSON.getDefault().getMapper().writeValueAsString(unset)); + } + } + } 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/node/README.md b/sdks/node/README.md index c66edb433..d6a335fee 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -81,6 +81,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | ---------- | ------------- | ------------- | ------------- | | *AccountApi* | [**accountCreate**](./docs/api/AccountApi.md#accountcreate) | **POST** /account/create | Create Account | | *AccountApi* | [**accountGet**](./docs/api/AccountApi.md#accountget) | **GET** /account | Get Account | +| *AccountApi* | [**accountSettingsGet**](./docs/api/AccountApi.md#accountsettingsget) | **GET** /account/settings | Get account settings | +| *AccountApi* | [**accountSettingsUpdate**](./docs/api/AccountApi.md#accountsettingsupdate) | **POST** /account/settings | Modify account settings | | *AccountApi* | [**accountUpdate**](./docs/api/AccountApi.md#accountupdate) | **PUT** /account | Update Account | | *AccountApi* | [**accountVerify**](./docs/api/AccountApi.md#accountverify) | **POST** /account/verify | Verify Account | | *ApiAppApi* | [**apiAppCreate**](./docs/api/ApiAppApi.md#apiappcreate) | **POST** /api_app | Create API App | @@ -136,6 +138,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TeamApi* | [**teamInvites**](./docs/api/TeamApi.md#teaminvites) | **GET** /team/invites | List Team Invites | | *TeamApi* | [**teamMembers**](./docs/api/TeamApi.md#teammembers) | **GET** /team/members/{team_id} | List Team Members | | *TeamApi* | [**teamRemoveMember**](./docs/api/TeamApi.md#teamremovemember) | **POST** /team/remove_member | Remove User from Team | +| *TeamApi* | [**teamSettingsGet**](./docs/api/TeamApi.md#teamsettingsget) | **GET** /team/settings | Get team settings | +| *TeamApi* | [**teamSettingsUpdate**](./docs/api/TeamApi.md#teamsettingsupdate) | **POST** /team/settings | Modify team settings | | *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 | @@ -163,6 +167,9 @@ All URIs are relative to *https://api.hellosign.com/v3* - [AccountResponseQuotas](./docs/model/AccountResponseQuotas.md) - [AccountResponseSettings](./docs/model/AccountResponseSettings.md) - [AccountResponseUsage](./docs/model/AccountResponseUsage.md) +- [AccountSettingsResponse](./docs/model/AccountSettingsResponse.md) +- [AccountSettingsResponseSettings](./docs/model/AccountSettingsResponseSettings.md) +- [AccountSettingsUpdateRequest](./docs/model/AccountSettingsUpdateRequest.md) - [AccountUpdateRequest](./docs/model/AccountUpdateRequest.md) - [AccountVerifyRequest](./docs/model/AccountVerifyRequest.md) - [AccountVerifyResponse](./docs/model/AccountVerifyResponse.md) @@ -176,11 +183,16 @@ All URIs are relative to *https://api.hellosign.com/v3* - [ApiAppResponseOwnerAccount](./docs/model/ApiAppResponseOwnerAccount.md) - [ApiAppResponseWhiteLabelingOptions](./docs/model/ApiAppResponseWhiteLabelingOptions.md) - [ApiAppUpdateRequest](./docs/model/ApiAppUpdateRequest.md) +- [BooleanSettingUpdate](./docs/model/BooleanSettingUpdate.md) - [BulkSendJobGetResponse](./docs/model/BulkSendJobGetResponse.md) - [BulkSendJobGetResponseSignatureRequests](./docs/model/BulkSendJobGetResponseSignatureRequests.md) - [BulkSendJobListResponse](./docs/model/BulkSendJobListResponse.md) - [BulkSendJobResponse](./docs/model/BulkSendJobResponse.md) - [BulkSendJobSendResponse](./docs/model/BulkSendJobSendResponse.md) +- [DataResidency](./docs/model/DataResidency.md) +- [DataResidencySettingUpdate](./docs/model/DataResidencySettingUpdate.md) +- [DateFormat](./docs/model/DateFormat.md) +- [DateFormatSettingUpdate](./docs/model/DateFormatSettingUpdate.md) - [DocumentFieldDetectionRequest](./docs/model/DocumentFieldDetectionRequest.md) - [DocumentFieldDetectionResponse](./docs/model/DocumentFieldDetectionResponse.md) - [DocumentFieldDetectionResponseDetectionResult](./docs/model/DocumentFieldDetectionResponseDetectionResult.md) @@ -219,6 +231,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [ReportCreateRequest](./docs/model/ReportCreateRequest.md) - [ReportCreateResponse](./docs/model/ReportCreateResponse.md) - [ReportResponse](./docs/model/ReportResponse.md) +- [RequiredSignatureType](./docs/model/RequiredSignatureType.md) +- [RequiredSignatureTypesSettingUpdate](./docs/model/RequiredSignatureTypesSettingUpdate.md) +- [SettingLockResponse](./docs/model/SettingLockResponse.md) +- [SettingResponse](./docs/model/SettingResponse.md) - [SignatureRequestBulkCreateEmbeddedWithTemplateRequest](./docs/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [SignatureRequestBulkSendWithTemplateRequest](./docs/model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](./docs/model/SignatureRequestCreateEmbeddedRequest.md) @@ -251,6 +267,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestSendRequest](./docs/model/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](./docs/model/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](./docs/model/SignatureRequestUpdateRequest.md) +- [StringSettingUpdate](./docs/model/StringSettingUpdate.md) - [SubAttachment](./docs/model/SubAttachment.md) - [SubBulkSignerList](./docs/model/SubBulkSignerList.md) - [SubBulkSignerListCustomField](./docs/model/SubBulkSignerListCustomField.md) @@ -299,6 +316,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [TeamParentResponse](./docs/model/TeamParentResponse.md) - [TeamRemoveMemberRequest](./docs/model/TeamRemoveMemberRequest.md) - [TeamResponse](./docs/model/TeamResponse.md) +- [TeamSettingLock](./docs/model/TeamSettingLock.md) +- [TeamSettingsResponse](./docs/model/TeamSettingsResponse.md) +- [TeamSettingsResponseSettings](./docs/model/TeamSettingsResponseSettings.md) +- [TeamSettingsUpdateRequest](./docs/model/TeamSettingsUpdateRequest.md) - [TeamSubTeamsResponse](./docs/model/TeamSubTeamsResponse.md) - [TeamUpdateRequest](./docs/model/TeamUpdateRequest.md) - [TemplateAddUserRequest](./docs/model/TemplateAddUserRequest.md) diff --git a/sdks/node/api/accountApi.ts b/sdks/node/api/accountApi.ts index 829eba59d..7242a1518 100644 --- a/sdks/node/api/accountApi.ts +++ b/sdks/node/api/accountApi.ts @@ -28,6 +28,8 @@ import { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, + AccountSettingsResponse, + AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, @@ -393,6 +395,284 @@ export class AccountApi { }); }); } + /** + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @summary Get account settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/AccountSettingsGetExample.ts + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @param options + */ + public async accountSettingsGet( + accountId?: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/account/settings"; + 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 (accountId !== undefined) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + + (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) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountSettingsResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountSettingsResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @summary Modify account settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/AccountSettingsUpdateExample.ts + * @param accountSettingsUpdateRequest + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @param options + */ + public async accountSettingsUpdate( + accountSettingsUpdateRequest: AccountSettingsUpdateRequest, + accountId?: string, + options: optionsI = { headers: {} } + ): Promise> { + accountSettingsUpdateRequest = deserializeIfNeeded( + accountSettingsUpdateRequest, + "AccountSettingsUpdateRequest" + ); + const localVarPath = this.basePath + "/account/settings"; + 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 'accountSettingsUpdateRequest' is not null or undefined + if ( + accountSettingsUpdateRequest === null || + accountSettingsUpdateRequest === undefined + ) { + throw new Error( + "Required parameter accountSettingsUpdateRequest was null or undefined when calling accountSettingsUpdate." + ); + } + + if (accountId !== undefined) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + accountSettingsUpdateRequest, + AccountSettingsUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + accountSettingsUpdateRequest, + "AccountSettingsUpdateRequest" + ); + } + + 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) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountSettingsResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountSettingsResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } /** * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * @summary Update Account diff --git a/sdks/node/api/teamApi.ts b/sdks/node/api/teamApi.ts index 455a54c17..191f5e9c9 100644 --- a/sdks/node/api/teamApi.ts +++ b/sdks/node/api/teamApi.ts @@ -37,6 +37,8 @@ import { TeamInvitesResponse, TeamMembersResponse, TeamRemoveMemberRequest, + TeamSettingsResponse, + TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest, VoidAuth, @@ -1150,6 +1152,284 @@ export class TeamApi { }); }); } + /** + * team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @summary Get team settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/TeamSettingsGetExample.ts + * @param teamId Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @param options + */ + public async teamSettingsGet( + teamId?: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/team/settings"; + 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 (teamId !== undefined) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" + ); + } + + (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) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "TeamSettingsResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "TeamSettingsResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @summary Modify team settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/TeamSettingsUpdateExample.ts + * @param teamSettingsUpdateRequest + * @param teamId Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @param options + */ + public async teamSettingsUpdate( + teamSettingsUpdateRequest: TeamSettingsUpdateRequest, + teamId?: string, + options: optionsI = { headers: {} } + ): Promise> { + teamSettingsUpdateRequest = deserializeIfNeeded( + teamSettingsUpdateRequest, + "TeamSettingsUpdateRequest" + ); + const localVarPath = this.basePath + "/team/settings"; + 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 'teamSettingsUpdateRequest' is not null or undefined + if ( + teamSettingsUpdateRequest === null || + teamSettingsUpdateRequest === undefined + ) { + throw new Error( + "Required parameter teamSettingsUpdateRequest was null or undefined when calling teamSettingsUpdate." + ); + } + + if (teamId !== undefined) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + teamSettingsUpdateRequest, + TeamSettingsUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + teamSettingsUpdateRequest, + "TeamSettingsUpdateRequest" + ); + } + + 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) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "TeamSettingsResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "TeamSettingsResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } /** * Provides a paginated list of sub teams that belong to a given team. * @summary List Sub Teams diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 2acb8bb12..e769906cb 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -13845,6 +13845,9 @@ __export(api_exports, { AccountResponseQuotas: () => AccountResponseQuotas, AccountResponseSettings: () => AccountResponseSettings, AccountResponseUsage: () => AccountResponseUsage, + AccountSettingsResponse: () => AccountSettingsResponse, + AccountSettingsResponseSettings: () => AccountSettingsResponseSettings, + AccountSettingsUpdateRequest: () => AccountSettingsUpdateRequest, AccountUpdateRequest: () => AccountUpdateRequest, AccountVerifyRequest: () => AccountVerifyRequest, AccountVerifyResponse: () => AccountVerifyResponse, @@ -13860,12 +13863,17 @@ __export(api_exports, { ApiAppResponseWhiteLabelingOptions: () => ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest: () => ApiAppUpdateRequest, ApiKeyAuth: () => ApiKeyAuth, + BooleanSettingUpdate: () => BooleanSettingUpdate, BulkSendJobApi: () => BulkSendJobApi, BulkSendJobGetResponse: () => BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests: () => BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse: () => BulkSendJobListResponse, BulkSendJobResponse: () => BulkSendJobResponse, BulkSendJobSendResponse: () => BulkSendJobSendResponse, + DataResidency: () => DataResidency, + DataResidencySettingUpdate: () => DataResidencySettingUpdate, + DateFormat: () => DateFormat, + DateFormatSettingUpdate: () => DateFormatSettingUpdate, DocumentApi: () => DocumentApi, DocumentFieldDetectionRequest: () => DocumentFieldDetectionRequest, DocumentFieldDetectionResponse: () => DocumentFieldDetectionResponse, @@ -13916,6 +13924,10 @@ __export(api_exports, { ReportCreateRequest: () => ReportCreateRequest, ReportCreateResponse: () => ReportCreateResponse, ReportResponse: () => ReportResponse, + RequiredSignatureType: () => RequiredSignatureType, + RequiredSignatureTypesSettingUpdate: () => RequiredSignatureTypesSettingUpdate, + SettingLockResponse: () => SettingLockResponse, + SettingResponse: () => SettingResponse, SignatureRequestApi: () => SignatureRequestApi, SignatureRequestBulkCreateEmbeddedWithTemplateRequest: () => SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest: () => SignatureRequestBulkSendWithTemplateRequest, @@ -13949,6 +13961,7 @@ __export(api_exports, { SignatureRequestSendRequest: () => SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest: () => SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest: () => SignatureRequestUpdateRequest, + StringSettingUpdate: () => StringSettingUpdate, SubAttachment: () => SubAttachment, SubBulkSignerList: () => SubBulkSignerList, SubBulkSignerListCustomField: () => SubBulkSignerListCustomField, @@ -13998,6 +14011,10 @@ __export(api_exports, { TeamParentResponse: () => TeamParentResponse, TeamRemoveMemberRequest: () => TeamRemoveMemberRequest, TeamResponse: () => TeamResponse, + TeamSettingLock: () => TeamSettingLock, + TeamSettingsResponse: () => TeamSettingsResponse, + TeamSettingsResponseSettings: () => TeamSettingsResponseSettings, + TeamSettingsUpdateRequest: () => TeamSettingsUpdateRequest, TeamSubTeamsResponse: () => TeamSubTeamsResponse, TeamUpdateRequest: () => TeamUpdateRequest, TemplateAddUserRequest: () => TemplateAddUserRequest, @@ -19965,6 +19982,374 @@ var AccountResponseUsage = class _AccountResponseUsage { } }; +// model/accountSettingsResponse.ts +var AccountSettingsResponse = class _AccountSettingsResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "settings", + baseName: "settings", + type: "AccountSettingsResponseSettings" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } + static getAttributeTypeMap() { + return _AccountSettingsResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "AccountSettingsResponse"); + } +}; + +// model/accountSettingsResponseSettings.ts +var AccountSettingsResponseSettings = class _AccountSettingsResponseSettings { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "SettingResponse" + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "SettingResponse" + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "SettingResponse" + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "SettingResponse" + }, + { + name: "dateFormat", + baseName: "date_format", + type: "SettingResponse" + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "SettingResponse" + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "SettingResponse" + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "SettingResponse" + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "SettingResponse" + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "SettingResponse" + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "SettingResponse" + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "SettingResponse" + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "SettingResponse" + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "SettingResponse" + }, + { + name: "isNotifyOnSignEnabled", + baseName: "is_notify_on_sign_enabled", + type: "SettingResponse" + }, + { + name: "isNotifyOnViewEnabled", + baseName: "is_notify_on_view_enabled", + type: "SettingResponse" + }, + { + name: "shouldAutocomplete", + baseName: "should_autocomplete", + type: "SettingResponse" + }, + { + name: "shouldIncludeRequestedPdfs", + baseName: "should_include_requested_pdfs", + type: "SettingResponse" + }, + { + name: "shouldIncludeRequestedPdfsForOthers", + baseName: "should_include_requested_pdfs_for_others", + type: "SettingResponse" + }, + { + name: "shouldIncludeSentDocPdfs", + baseName: "should_include_sent_doc_pdfs", + type: "SettingResponse" + }, + { + name: "shouldIncludeSentDocPdfsForOthers", + baseName: "should_include_sent_doc_pdfs_for_others", + type: "SettingResponse" + }, + { + name: "shouldSendDailySummary", + baseName: "should_send_daily_summary", + type: "SettingResponse" + }, + { + name: "shouldSendEmbeddedSignatureConfEmails", + baseName: "should_send_embedded_signature_conf_emails", + type: "SettingResponse" + }, + { + name: "shouldSendOrderedSrEmail", + baseName: "should_send_ordered_sr_email", + type: "SettingResponse" + }, + { + name: "shouldSendOutboundConfEmails", + baseName: "should_send_outbound_conf_emails", + type: "SettingResponse" + }, + { + name: "templateLinkSignatureEmailsEnabled", + baseName: "template_link_signature_emails_enabled", + type: "SettingResponse" + } + ]; + } + static getAttributeTypeMap() { + return _AccountSettingsResponseSettings.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "AccountSettingsResponseSettings" + ); + } +}; + +// model/accountSettingsUpdateRequest.ts +var AccountSettingsUpdateRequest = class _AccountSettingsUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "string" + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "boolean" + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "string" + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "string" + }, + { + name: "dateFormat", + baseName: "date_format", + type: "DateFormat" + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "boolean" + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "string" + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "string" + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "Set" + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "boolean" + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "boolean" + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "boolean" + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "boolean" + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "boolean" + }, + { + name: "isNotifyOnSignEnabled", + baseName: "is_notify_on_sign_enabled", + type: "boolean" + }, + { + name: "isNotifyOnViewEnabled", + baseName: "is_notify_on_view_enabled", + type: "boolean" + }, + { + name: "shouldAutocomplete", + baseName: "should_autocomplete", + type: "boolean" + }, + { + name: "shouldIncludeRequestedPdfs", + baseName: "should_include_requested_pdfs", + type: "boolean" + }, + { + name: "shouldIncludeRequestedPdfsForOthers", + baseName: "should_include_requested_pdfs_for_others", + type: "boolean" + }, + { + name: "shouldIncludeSentDocPdfs", + baseName: "should_include_sent_doc_pdfs", + type: "boolean" + }, + { + name: "shouldIncludeSentDocPdfsForOthers", + baseName: "should_include_sent_doc_pdfs_for_others", + type: "boolean" + }, + { + name: "shouldSendDailySummary", + baseName: "should_send_daily_summary", + type: "boolean" + }, + { + name: "shouldSendEmbeddedSignatureConfEmails", + baseName: "should_send_embedded_signature_conf_emails", + type: "boolean" + }, + { + name: "shouldSendOrderedSrEmail", + baseName: "should_send_ordered_sr_email", + type: "boolean" + }, + { + name: "shouldSendOutboundConfEmails", + baseName: "should_send_outbound_conf_emails", + type: "boolean" + }, + { + name: "templateLinkSignatureEmailsEnabled", + baseName: "template_link_signature_emails_enabled", + type: "boolean" + }, + { + name: "unset", + baseName: "unset", + type: "Set" + } + ]; + } + static getAttributeTypeMap() { + return _AccountSettingsUpdateRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "AccountSettingsUpdateRequest"); + } +}; +((AccountSettingsUpdateRequest2) => { + let UnsetEnum; + ((UnsetEnum2) => { + UnsetEnum2["Company"] = "company"; + UnsetEnum2["CustomSigningRedirectEnabled"] = "custom_signing_redirect_enabled"; + UnsetEnum2["CustomSigningRedirectUrl"] = "custom_signing_redirect_url"; + UnsetEnum2["CustomTagline"] = "custom_tagline"; + UnsetEnum2["DateFormat"] = "date_format"; + UnsetEnum2["IsSignatureRemindersEnabled"] = "is_signature_reminders_enabled"; + UnsetEnum2["RequestEmailFrom"] = "request_email_from"; + UnsetEnum2["RequestEmailSignature"] = "request_email_signature"; + UnsetEnum2["RequiredSignatureTypes"] = "required_signature_types"; + UnsetEnum2["ShouldEnableTamperProof"] = "should_enable_tamper_proof"; + UnsetEnum2["ShouldIncludeDistinctPdfs"] = "should_include_distinct_pdfs"; + UnsetEnum2["ShouldOfferSignerAccessCode"] = "should_offer_signer_access_code"; + UnsetEnum2["ShouldOfferSignerSmsAuthentication"] = "should_offer_signer_sms_authentication"; + UnsetEnum2["ShouldRemoveDocumentId"] = "should_remove_document_id"; + UnsetEnum2["IsNotifyOnSignEnabled"] = "is_notify_on_sign_enabled"; + UnsetEnum2["IsNotifyOnViewEnabled"] = "is_notify_on_view_enabled"; + UnsetEnum2["ShouldAutocomplete"] = "should_autocomplete"; + UnsetEnum2["ShouldIncludeRequestedPdfs"] = "should_include_requested_pdfs"; + UnsetEnum2["ShouldIncludeRequestedPdfsForOthers"] = "should_include_requested_pdfs_for_others"; + UnsetEnum2["ShouldIncludeSentDocPdfs"] = "should_include_sent_doc_pdfs"; + UnsetEnum2["ShouldIncludeSentDocPdfsForOthers"] = "should_include_sent_doc_pdfs_for_others"; + UnsetEnum2["ShouldSendDailySummary"] = "should_send_daily_summary"; + UnsetEnum2["ShouldSendEmbeddedSignatureConfEmails"] = "should_send_embedded_signature_conf_emails"; + UnsetEnum2["ShouldSendOrderedSrEmail"] = "should_send_ordered_sr_email"; + UnsetEnum2["ShouldSendOutboundConfEmails"] = "should_send_outbound_conf_emails"; + UnsetEnum2["TemplateLinkSignatureEmailsEnabled"] = "template_link_signature_emails_enabled"; + })(UnsetEnum = AccountSettingsUpdateRequest2.UnsetEnum || (AccountSettingsUpdateRequest2.UnsetEnum = {})); +})(AccountSettingsUpdateRequest || (AccountSettingsUpdateRequest = {})); + // model/accountUpdateRequest.ts var AccountUpdateRequest = class _AccountUpdateRequest { static { @@ -20487,6 +20872,34 @@ var ApiAppUpdateRequest = class _ApiAppUpdateRequest { } }; +// model/booleanSettingUpdate.ts +var BooleanSettingUpdate = class _BooleanSettingUpdate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "boolean" + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock" + } + ]; + } + static getAttributeTypeMap() { + return _BooleanSettingUpdate.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "BooleanSettingUpdate"); + } +}; + // model/bulkSendJobGetResponse.ts var BulkSendJobGetResponse = class _BulkSendJobGetResponse { static { @@ -20776,6 +21189,81 @@ var BulkSendJobSendResponse = class _BulkSendJobSendResponse { } }; +// model/dataResidency.ts +var DataResidency = /* @__PURE__ */ ((DataResidency2) => { + DataResidency2["Us"] = "us"; + DataResidency2["Eu"] = "eu"; + DataResidency2["Au"] = "au"; + DataResidency2["Jp"] = "jp"; + DataResidency2["Uk"] = "uk"; + DataResidency2["Ca"] = "ca"; + return DataResidency2; +})(DataResidency || {}); + +// model/dataResidencySettingUpdate.ts +var DataResidencySettingUpdate = class _DataResidencySettingUpdate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "DataResidency" + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock" + } + ]; + } + static getAttributeTypeMap() { + return _DataResidencySettingUpdate.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "DataResidencySettingUpdate"); + } +}; + +// model/dateFormat.ts +var DateFormat = /* @__PURE__ */ ((DateFormat2) => { + DateFormat2["MmDdYyyy"] = "MM/DD/YYYY"; + DateFormat2["DdMmYyyy"] = "DD/MM/YYYY"; + DateFormat2["YyyyMmDd"] = "YYYY/MM/DD"; + return DateFormat2; +})(DateFormat || {}); + +// model/dateFormatSettingUpdate.ts +var DateFormatSettingUpdate = class _DateFormatSettingUpdate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "DateFormat" + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock" + } + ]; + } + static getAttributeTypeMap() { + return _DateFormatSettingUpdate.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "DateFormatSettingUpdate"); + } +}; + // model/documentFieldDetectionRequest.ts var DocumentFieldDetectionRequest = class _DocumentFieldDetectionRequest { static { @@ -22533,6 +23021,146 @@ var ReportResponse = class _ReportResponse { })(ReportTypeEnum = ReportResponse2.ReportTypeEnum || (ReportResponse2.ReportTypeEnum = {})); })(ReportResponse || (ReportResponse = {})); +// model/requiredSignatureType.ts +var RequiredSignatureType = /* @__PURE__ */ ((RequiredSignatureType2) => { + RequiredSignatureType2["Draw"] = "draw"; + RequiredSignatureType2["Phone"] = "phone"; + RequiredSignatureType2["Type"] = "type"; + RequiredSignatureType2["Upload"] = "upload"; + return RequiredSignatureType2; +})(RequiredSignatureType || {}); + +// model/requiredSignatureTypesSettingUpdate.ts +var RequiredSignatureTypesSettingUpdate = class _RequiredSignatureTypesSettingUpdate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "Set" + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock" + } + ]; + } + static getAttributeTypeMap() { + return _RequiredSignatureTypesSettingUpdate.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "RequiredSignatureTypesSettingUpdate" + ); + } +}; + +// model/settingLockResponse.ts +var SettingLockResponse = class _SettingLockResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "mode", + baseName: "mode", + type: "TeamSettingLock" + }, + { + name: "source", + baseName: "source", + type: "SettingLockResponse.SourceEnum" + } + ]; + } + static getAttributeTypeMap() { + return _SettingLockResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "SettingLockResponse"); + } +}; +((SettingLockResponse2) => { + let SourceEnum; + ((SourceEnum2) => { + SourceEnum2["Team"] = "team"; + SourceEnum2["ParentTeam"] = "parent_team"; + SourceEnum2["Default"] = "default"; + })(SourceEnum = SettingLockResponse2.SourceEnum || (SettingLockResponse2.SourceEnum = {})); +})(SettingLockResponse || (SettingLockResponse = {})); + +// model/settingResponse.ts +var SettingResponse = class _SettingResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "any" + }, + { + name: "isInherited", + baseName: "is_inherited", + type: "boolean" + }, + { + name: "source", + baseName: "source", + type: "SettingResponse.SourceEnum" + }, + { + name: "type", + baseName: "type", + type: "SettingResponse.TypeEnum" + }, + { + name: "writable", + baseName: "writable", + type: "boolean" + }, + { + name: "lock", + baseName: "lock", + type: "SettingLockResponse" + } + ]; + } + static getAttributeTypeMap() { + return _SettingResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "SettingResponse"); + } +}; +((SettingResponse2) => { + let SourceEnum; + ((SourceEnum2) => { + SourceEnum2["Account"] = "account"; + SourceEnum2["Team"] = "team"; + SourceEnum2["ParentTeam"] = "parent_team"; + SourceEnum2["Default"] = "default"; + })(SourceEnum = SettingResponse2.SourceEnum || (SettingResponse2.SourceEnum = {})); + let TypeEnum; + ((TypeEnum2) => { + TypeEnum2["Boolean"] = "boolean"; + TypeEnum2["Integer"] = "integer"; + TypeEnum2["String"] = "string"; + TypeEnum2["Array"] = "array"; + })(TypeEnum = SettingResponse2.TypeEnum || (SettingResponse2.TypeEnum = {})); +})(SettingResponse || (SettingResponse = {})); + // model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class _SignatureRequestBulkCreateEmbeddedWithTemplateRequest { constructor() { @@ -24940,6 +25568,34 @@ var SignatureRequestUpdateRequest = class _SignatureRequestUpdateRequest { } }; +// model/stringSettingUpdate.ts +var StringSettingUpdate = class _StringSettingUpdate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock" + } + ]; + } + static getAttributeTypeMap() { + return _StringSettingUpdate.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "StringSettingUpdate"); + } +}; + // model/subAttachment.ts var SubAttachment = class _SubAttachment { constructor() { @@ -25000,6 +25656,11 @@ var SubBulkSignerList = class _SubBulkSignerList { name: "signers", baseName: "signers", type: "Array" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" } ]; } @@ -26722,6 +27383,11 @@ var TeamCreateRequest = class _TeamCreateRequest { name: "name", baseName: "name", type: "string" + }, + { + name: "parentTeamId", + baseName: "parent_team_id", + type: "string" } ]; } @@ -27011,87 +27677,459 @@ var TeamRemoveMemberRequest = class _TeamRemoveMemberRequest { static { this.attributeTypeMap = [ { - name: "accountId", - baseName: "account_id", - type: "string" + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "newOwnerEmailAddress", + baseName: "new_owner_email_address", + type: "string" + }, + { + name: "newTeamId", + baseName: "new_team_id", + type: "string" + }, + { + name: "newRole", + baseName: "new_role", + type: "TeamRemoveMemberRequest.NewRoleEnum" + } + ]; + } + static getAttributeTypeMap() { + return _TeamRemoveMemberRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "TeamRemoveMemberRequest"); + } +}; +((TeamRemoveMemberRequest2) => { + let NewRoleEnum; + ((NewRoleEnum2) => { + NewRoleEnum2["Member"] = "Member"; + NewRoleEnum2["Developer"] = "Developer"; + NewRoleEnum2["TeamManager"] = "Team Manager"; + NewRoleEnum2["Admin"] = "Admin"; + })(NewRoleEnum = TeamRemoveMemberRequest2.NewRoleEnum || (TeamRemoveMemberRequest2.NewRoleEnum = {})); +})(TeamRemoveMemberRequest || (TeamRemoveMemberRequest = {})); + +// model/teamResponse.ts +var TeamResponse = class _TeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "parentTeamId", + baseName: "parent_team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "invitedAccounts", + baseName: "invited_accounts", + type: "Array" + }, + { + name: "invitedEmails", + baseName: "invited_emails", + type: "Array" + } + ]; + } + static getAttributeTypeMap() { + return _TeamResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "TeamResponse"); + } +}; + +// model/teamSettingLock.ts +var TeamSettingLock = /* @__PURE__ */ ((TeamSettingLock2) => { + TeamSettingLock2["OrganizationAdmins"] = "organization_admins"; + TeamSettingLock2["TeamAdmins"] = "team_admins"; + TeamSettingLock2["Members"] = "members"; + return TeamSettingLock2; +})(TeamSettingLock || {}); + +// model/teamSettingsResponse.ts +var TeamSettingsResponse = class _TeamSettingsResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "settings", + baseName: "settings", + type: "TeamSettingsResponseSettings" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } + static getAttributeTypeMap() { + return _TeamSettingsResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "TeamSettingsResponse"); + } +}; + +// model/teamSettingsResponseSettings.ts +var TeamSettingsResponseSettings = class _TeamSettingsResponseSettings { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "SettingResponse" + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "SettingResponse" + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "SettingResponse" + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "SettingResponse" + }, + { + name: "dateFormat", + baseName: "date_format", + type: "SettingResponse" + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "SettingResponse" + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "SettingResponse" + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "SettingResponse" + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "SettingResponse" + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "SettingResponse" + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "SettingResponse" + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "SettingResponse" + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "SettingResponse" + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "SettingResponse" + }, + { + name: "dataResidency", + baseName: "data_residency", + type: "SettingResponse" + }, + { + name: "allowTeamDeleteDocumentForEveryone", + baseName: "allow_team_delete_document_for_everyone", + type: "SettingResponse" + }, + { + name: "allowTeamDownloadCsv", + baseName: "allow_team_download_csv", + type: "SettingResponse" + }, + { + name: "lockTeamTemplateCreation", + baseName: "lock_team_template_creation", + type: "SettingResponse" + }, + { + name: "lockTeamTemplateGallery", + baseName: "lock_team_template_gallery", + type: "SettingResponse" + }, + { + name: "selfSignMessage", + baseName: "self_sign_message", + type: "SettingResponse" + }, + { + name: "selfSignTitle", + baseName: "self_sign_title", + type: "SettingResponse" + }, + { + name: "signatureRequestMessage", + baseName: "signature_request_message", + type: "SettingResponse" + }, + { + name: "signatureRequestTitle", + baseName: "signature_request_title", + type: "SettingResponse" + }, + { + name: "multifactorAuthApp", + baseName: "multifactor_auth_app", + type: "SettingResponse" + }, + { + name: "multifactorAuthSms", + baseName: "multifactor_auth_sms", + type: "SettingResponse" + } + ]; + } + static getAttributeTypeMap() { + return _TeamSettingsResponseSettings.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "TeamSettingsResponseSettings"); + } +}; + +// model/teamSettingsUpdateRequest.ts +var TeamSettingsUpdateRequest = class _TeamSettingsUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "StringSettingUpdate" + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "BooleanSettingUpdate" + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "StringSettingUpdate" + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "StringSettingUpdate" + }, + { + name: "dateFormat", + baseName: "date_format", + type: "DateFormatSettingUpdate" + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "BooleanSettingUpdate" + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "StringSettingUpdate" + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "StringSettingUpdate" + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "RequiredSignatureTypesSettingUpdate" + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "BooleanSettingUpdate" + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "BooleanSettingUpdate" + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "BooleanSettingUpdate" + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "BooleanSettingUpdate" + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "BooleanSettingUpdate" + }, + { + name: "dataResidency", + baseName: "data_residency", + type: "DataResidencySettingUpdate" + }, + { + name: "allowTeamDeleteDocumentForEveryone", + baseName: "allow_team_delete_document_for_everyone", + type: "BooleanSettingUpdate" + }, + { + name: "allowTeamDownloadCsv", + baseName: "allow_team_download_csv", + type: "BooleanSettingUpdate" }, { - name: "emailAddress", - baseName: "email_address", - type: "string" + name: "lockTeamTemplateCreation", + baseName: "lock_team_template_creation", + type: "BooleanSettingUpdate" }, { - name: "newOwnerEmailAddress", - baseName: "new_owner_email_address", - type: "string" + name: "lockTeamTemplateGallery", + baseName: "lock_team_template_gallery", + type: "BooleanSettingUpdate" }, { - name: "newTeamId", - baseName: "new_team_id", - type: "string" + name: "selfSignMessage", + baseName: "self_sign_message", + type: "StringSettingUpdate" }, { - name: "newRole", - baseName: "new_role", - type: "TeamRemoveMemberRequest.NewRoleEnum" - } - ]; - } - static getAttributeTypeMap() { - return _TeamRemoveMemberRequest.attributeTypeMap; - } - /** Attempt to instantiate and hydrate a new instance of this class */ - static init(data) { - return ObjectSerializer.deserialize(data, "TeamRemoveMemberRequest"); - } -}; -((TeamRemoveMemberRequest2) => { - let NewRoleEnum; - ((NewRoleEnum2) => { - NewRoleEnum2["Member"] = "Member"; - NewRoleEnum2["Developer"] = "Developer"; - NewRoleEnum2["TeamManager"] = "Team Manager"; - NewRoleEnum2["Admin"] = "Admin"; - })(NewRoleEnum = TeamRemoveMemberRequest2.NewRoleEnum || (TeamRemoveMemberRequest2.NewRoleEnum = {})); -})(TeamRemoveMemberRequest || (TeamRemoveMemberRequest = {})); - -// model/teamResponse.ts -var TeamResponse = class _TeamResponse { - static { - this.discriminator = void 0; - } - static { - this.attributeTypeMap = [ + name: "selfSignTitle", + baseName: "self_sign_title", + type: "StringSettingUpdate" + }, { - name: "name", - baseName: "name", - type: "string" + name: "signatureRequestMessage", + baseName: "signature_request_message", + type: "StringSettingUpdate" }, { - name: "accounts", - baseName: "accounts", - type: "Array" + name: "signatureRequestTitle", + baseName: "signature_request_title", + type: "StringSettingUpdate" }, { - name: "invitedAccounts", - baseName: "invited_accounts", - type: "Array" + name: "multifactorAuthApp", + baseName: "multifactor_auth_app", + type: "BooleanSettingUpdate" }, { - name: "invitedEmails", - baseName: "invited_emails", - type: "Array" + name: "multifactorAuthSms", + baseName: "multifactor_auth_sms", + type: "BooleanSettingUpdate" + }, + { + name: "unset", + baseName: "unset", + type: "Set" } ]; } static getAttributeTypeMap() { - return _TeamResponse.attributeTypeMap; + return _TeamSettingsUpdateRequest.attributeTypeMap; } /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { - return ObjectSerializer.deserialize(data, "TeamResponse"); - } -}; + return ObjectSerializer.deserialize(data, "TeamSettingsUpdateRequest"); + } +}; +((TeamSettingsUpdateRequest2) => { + let UnsetEnum; + ((UnsetEnum2) => { + UnsetEnum2["Company"] = "company"; + UnsetEnum2["CustomSigningRedirectEnabled"] = "custom_signing_redirect_enabled"; + UnsetEnum2["CustomSigningRedirectUrl"] = "custom_signing_redirect_url"; + UnsetEnum2["CustomTagline"] = "custom_tagline"; + UnsetEnum2["DateFormat"] = "date_format"; + UnsetEnum2["IsSignatureRemindersEnabled"] = "is_signature_reminders_enabled"; + UnsetEnum2["RequestEmailFrom"] = "request_email_from"; + UnsetEnum2["RequestEmailSignature"] = "request_email_signature"; + UnsetEnum2["RequiredSignatureTypes"] = "required_signature_types"; + UnsetEnum2["ShouldEnableTamperProof"] = "should_enable_tamper_proof"; + UnsetEnum2["ShouldIncludeDistinctPdfs"] = "should_include_distinct_pdfs"; + UnsetEnum2["ShouldOfferSignerAccessCode"] = "should_offer_signer_access_code"; + UnsetEnum2["ShouldOfferSignerSmsAuthentication"] = "should_offer_signer_sms_authentication"; + UnsetEnum2["ShouldRemoveDocumentId"] = "should_remove_document_id"; + UnsetEnum2["DataResidency"] = "data_residency"; + UnsetEnum2["AllowTeamDeleteDocumentForEveryone"] = "allow_team_delete_document_for_everyone"; + UnsetEnum2["AllowTeamDownloadCsv"] = "allow_team_download_csv"; + UnsetEnum2["LockTeamTemplateCreation"] = "lock_team_template_creation"; + UnsetEnum2["LockTeamTemplateGallery"] = "lock_team_template_gallery"; + UnsetEnum2["SelfSignMessage"] = "self_sign_message"; + UnsetEnum2["SelfSignTitle"] = "self_sign_title"; + UnsetEnum2["SignatureRequestMessage"] = "signature_request_message"; + UnsetEnum2["SignatureRequestTitle"] = "signature_request_title"; + UnsetEnum2["MultifactorAuthApp"] = "multifactor_auth_app"; + UnsetEnum2["MultifactorAuthSms"] = "multifactor_auth_sms"; + })(UnsetEnum = TeamSettingsUpdateRequest2.UnsetEnum || (TeamSettingsUpdateRequest2.UnsetEnum = {})); +})(TeamSettingsUpdateRequest || (TeamSettingsUpdateRequest = {})); // model/teamSubTeamsResponse.ts var TeamSubTeamsResponse = class _TeamSubTeamsResponse { @@ -30063,6 +31101,9 @@ var WarningResponse = class _WarningResponse { // model/index.ts var enumsMap = { + "AccountSettingsUpdateRequest.UnsetEnum": AccountSettingsUpdateRequest.UnsetEnum, + DataResidency, + DateFormat, "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, @@ -30071,6 +31112,10 @@ var enumsMap = { "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, + RequiredSignatureType, + "SettingLockResponse.SourceEnum": SettingLockResponse.SourceEnum, + "SettingResponse.SourceEnum": SettingResponse.SourceEnum, + "SettingResponse.TypeEnum": SettingResponse.TypeEnum, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataTypeEnum, "SubFieldOptions.DateFormatEnum": SubFieldOptions.DateFormatEnum, @@ -30092,6 +31137,8 @@ var enumsMap = { "SubWhiteLabelingOptions.LegalVersionEnum": SubWhiteLabelingOptions.LegalVersionEnum, "TeamAddMemberRequest.RoleEnum": TeamAddMemberRequest.RoleEnum, "TeamRemoveMemberRequest.NewRoleEnum": TeamRemoveMemberRequest.NewRoleEnum, + TeamSettingLock, + "TeamSettingsUpdateRequest.UnsetEnum": TeamSettingsUpdateRequest.UnsetEnum, "TemplateResponseDocumentFormFieldText.ValidationTypeEnum": TemplateResponseDocumentFormFieldText.ValidationTypeEnum, "UnclaimedDraftCreateEmbeddedRequest.TypeEnum": UnclaimedDraftCreateEmbeddedRequest.TypeEnum, "UnclaimedDraftCreateRequest.TypeEnum": UnclaimedDraftCreateRequest.TypeEnum @@ -30104,6 +31151,9 @@ var typeMap = { AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, + AccountSettingsResponse, + AccountSettingsResponseSettings, + AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, @@ -30117,11 +31167,14 @@ var typeMap = { ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, + BooleanSettingUpdate, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, + DataResidencySettingUpdate, + DateFormatSettingUpdate, DocumentFieldDetectionRequest, DocumentFieldDetectionResponse, DocumentFieldDetectionResponseDetectionResult, @@ -30157,6 +31210,9 @@ var typeMap = { ReportCreateRequest, ReportCreateResponse, ReportResponse, + RequiredSignatureTypesSettingUpdate, + SettingLockResponse, + SettingResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, @@ -30187,6 +31243,7 @@ var typeMap = { SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, + StringSettingUpdate, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, @@ -30233,6 +31290,9 @@ var typeMap = { TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, + TeamSettingsResponse, + TeamSettingsResponseSettings, + TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, @@ -30541,28 +31601,258 @@ var AccountApi = class { (error) => { if (error.response == null) { reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountGetResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @summary Get account settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/AccountSettingsGetExample.ts + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @param options + */ + async accountSettingsGet(accountId, options = { headers: {} }) { + const localVarPath = this.basePath + "/account/settings"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountSettingsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountSettingsResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @summary Modify account settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/AccountSettingsUpdateExample.ts + * @param accountSettingsUpdateRequest + * @param accountId Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + * @param options + */ + async accountSettingsUpdate(accountSettingsUpdateRequest, accountId, options = { headers: {} }) { + accountSettingsUpdateRequest = deserializeIfNeeded( + accountSettingsUpdateRequest, + "AccountSettingsUpdateRequest" + ); + const localVarPath = this.basePath + "/account/settings"; + 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 (accountSettingsUpdateRequest === null || accountSettingsUpdateRequest === void 0) { + throw new Error( + "Required parameter accountSettingsUpdateRequest was null or undefined when calling accountSettingsUpdate." + ); + } + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountSettingsUpdateRequest, + AccountSettingsUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + accountSettingsUpdateRequest, + "AccountSettingsUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountSettingsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountSettingsResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } - reject(error); - } - ); - }); + ); + } + ); }); } /** @@ -37591,6 +38881,236 @@ var TeamApi = class { }); }); } + /** + * team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @summary Get team settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/TeamSettingsGetExample.ts + * @param teamId Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @param options + */ + async teamSettingsGet(teamId, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/settings"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TeamSettingsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TeamSettingsResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @summary Modify team settings + * Example: https://github.com/hellosign/dropbox-sign-node/blob/main/examples/TeamSettingsUpdateExample.ts + * @param teamSettingsUpdateRequest + * @param teamId Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. + * @param options + */ + async teamSettingsUpdate(teamSettingsUpdateRequest, teamId, options = { headers: {} }) { + teamSettingsUpdateRequest = deserializeIfNeeded10( + teamSettingsUpdateRequest, + "TeamSettingsUpdateRequest" + ); + const localVarPath = this.basePath + "/team/settings"; + 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 (teamSettingsUpdateRequest === null || teamSettingsUpdateRequest === void 0) { + throw new Error( + "Required parameter teamSettingsUpdateRequest was null or undefined when calling teamSettingsUpdate." + ); + } + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamSettingsUpdateRequest, + TeamSettingsUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + teamSettingsUpdateRequest, + "TeamSettingsUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TeamSettingsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TeamSettingsResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } /** * Provides a paginated list of sub teams that belong to a given team. * @summary List Sub Teams @@ -39904,6 +41424,9 @@ var APIS = [ AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, + AccountSettingsResponse, + AccountSettingsResponseSettings, + AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, @@ -39919,12 +41442,17 @@ var APIS = [ ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, + BooleanSettingUpdate, BulkSendJobApi, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, + DataResidency, + DataResidencySettingUpdate, + DateFormat, + DateFormatSettingUpdate, DocumentApi, DocumentFieldDetectionRequest, DocumentFieldDetectionResponse, @@ -39975,6 +41503,10 @@ var APIS = [ ReportCreateRequest, ReportCreateResponse, ReportResponse, + RequiredSignatureType, + RequiredSignatureTypesSettingUpdate, + SettingLockResponse, + SettingResponse, SignatureRequestApi, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, @@ -40008,6 +41540,7 @@ var APIS = [ SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, + StringSettingUpdate, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, @@ -40057,6 +41590,10 @@ var APIS = [ TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, + TeamSettingLock, + TeamSettingsResponse, + TeamSettingsResponseSettings, + TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, diff --git a/sdks/node/docs/api/AccountApi.md b/sdks/node/docs/api/AccountApi.md index cb57cf6ee..7dda50b8b 100644 --- a/sdks/node/docs/api/AccountApi.md +++ b/sdks/node/docs/api/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to https://api.hellosign.com/v3. | ------------- | ------------- | ------------- | | [**accountCreate()**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account | | [**accountGet()**](AccountApi.md#accountGet) | **GET** /account | Get Account | +| [**accountSettingsGet()**](AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings | +| [**accountSettingsUpdate()**](AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings | | [**accountUpdate()**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account | | [**accountVerify()**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account | @@ -123,6 +125,138 @@ apiCaller.accountGet().then(response => { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `accountSettingsGet()` + +```typescript +accountSettingsGet(accountId: string): AccountSettingsResponse +``` + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### TypeScript Example + +```typescript +import api from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountSettingsGet().then(response => { + const company = response.body.settings.company; + console.log(response.body); + console.log({ + accountId: response.body.accountId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsGet:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **accountId** | **string**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](../model/AccountSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### 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) + +## `accountSettingsUpdate()` + +```typescript +accountSettingsUpdate(accountSettingsUpdateRequest: AccountSettingsUpdateRequest, accountId: string): AccountSettingsResponse +``` + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### TypeScript Example + +```typescript +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountSettingsUpdateRequest: models.AccountSettingsUpdateRequest = { + dateFormat: models.DateFormat.MmDdYyyy, + requiredSignatureTypes: [ + models.RequiredSignatureType.Draw, + models.RequiredSignatureType.Type, + ], + shouldEnableTamperProof: false, + unset: ["company"], +}; + +apiCaller.accountSettingsUpdate( + accountSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountSettingsUpdate:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **accountSettingsUpdateRequest** | [**AccountSettingsUpdateRequest**](../model/AccountSettingsUpdateRequest.md)| | | +| **accountId** | **string**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](../model/AccountSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **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) + ## `accountUpdate()` ```typescript diff --git a/sdks/node/docs/api/TeamApi.md b/sdks/node/docs/api/TeamApi.md index 959d4cc46..559bbdfbd 100644 --- a/sdks/node/docs/api/TeamApi.md +++ b/sdks/node/docs/api/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to https://api.hellosign.com/v3. | [**teamInvites()**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites | | [**teamMembers()**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members | | [**teamRemoveMember()**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team | +| [**teamSettingsGet()**](TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings | +| [**teamSettingsUpdate()**](TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings | | [**teamSubTeams()**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | [**teamUpdate()**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team | @@ -463,6 +465,150 @@ apiCaller.teamRemoveMember( [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `teamSettingsGet()` + +```typescript +teamSettingsGet(teamId: string): TeamSettingsResponse +``` + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + +### TypeScript Example + +```typescript +import api from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSettingsGet().then(response => { + const company = response.body.settings.company; + const dataResidency = response.body.settings.dataResidency; + console.log(response.body); + console.log({ + teamId: response.body.teamId, + company: { + value: company.value, + isInherited: company.isInherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + dataResidency: { + value: dataResidency.value, + isInherited: dataResidency.isInherited, + source: dataResidency.source, + type: dataResidency.type, + writable: dataResidency.writable, + lock: { + mode: dataResidency.lock.mode, + source: dataResidency.lock.source, + }, + }, + warnings: response.body.warnings, + }); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsGet:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **teamId** | **string**| Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](../model/TeamSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### 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) + +## `teamSettingsUpdate()` + +```typescript +teamSettingsUpdate(teamSettingsUpdateRequest: TeamSettingsUpdateRequest, teamId: string): TeamSettingsResponse +``` + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account\'s team. An organization admin can specify a subteam. + +### TypeScript Example + +```typescript +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamSettingsUpdateRequest: models.TeamSettingsUpdateRequest = { + dataResidency: { + value: models.DataResidency.Eu, + }, + company: { + value: "Northwind", + lockMode: models.TeamSettingLock.OrganizationAdmins, + }, +}; + +apiCaller.teamSettingsUpdate( + teamSettingsUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSettingsUpdate:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **teamSettingsUpdateRequest** | [**TeamSettingsUpdateRequest**](../model/TeamSettingsUpdateRequest.md)| | | +| **teamId** | **string**| Optional team ID. Defaults to the authenticated account\'s team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](../model/TeamSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **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) + ## `teamSubTeams()` ```typescript diff --git a/sdks/node/docs/model/AccountSettingsResponse.md b/sdks/node/docs/model/AccountSettingsResponse.md new file mode 100644 index 000000000..2d2f48b5c --- /dev/null +++ b/sdks/node/docs/model/AccountSettingsResponse.md @@ -0,0 +1,13 @@ +# # AccountSettingsResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `accountId`*_required_ | ```string``` | | | +| `settings`*_required_ | [```AccountSettingsResponseSettings```](AccountSettingsResponseSettings.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/AccountSettingsResponseSettings.md b/sdks/node/docs/model/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..bdc5189df --- /dev/null +++ b/sdks/node/docs/model/AccountSettingsResponseSettings.md @@ -0,0 +1,36 @@ +# # AccountSettingsResponseSettings + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + +[[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/AccountSettingsUpdateRequest.md b/sdks/node/docs/model/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..22c8d211a --- /dev/null +++ b/sdks/node/docs/model/AccountSettingsUpdateRequest.md @@ -0,0 +1,37 @@ +# # AccountSettingsUpdateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | ```string``` | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | ```boolean``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | ```string``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | ```string``` | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | [```DateFormat```](DateFormat.md) | | | +| `isSignatureRemindersEnabled` | ```boolean``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | ```string``` | Sender name shown on signature request emails. | | +| `requestEmailSignature` | ```string``` | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | [```Set```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | ```boolean``` | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | ```boolean``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | ```boolean``` | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | ```boolean``` | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | ```boolean``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `isNotifyOnSignEnabled` | ```boolean``` | Whether to notify the account when someone signs a document it sent. | | +| `isNotifyOnViewEnabled` | ```boolean``` | Whether to notify the account when someone opens a document it sent. | | +| `shouldAutocomplete` | ```boolean``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `shouldIncludeRequestedPdfs` | ```boolean``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `shouldIncludeRequestedPdfsForOthers` | ```boolean``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `shouldIncludeSentDocPdfs` | ```boolean``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `shouldIncludeSentDocPdfsForOthers` | ```boolean``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `shouldSendDailySummary` | ```boolean``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `shouldSendEmbeddedSignatureConfEmails` | ```boolean``` | Whether to notify the account when it signs a document on a third-party site. | | +| `shouldSendOrderedSrEmail` | ```boolean``` | Whether to notify all parties when an ordered signature request starts. | | +| `shouldSendOutboundConfEmails` | ```boolean``` | Whether to notify the account when it signs and sends a document. | | +| `templateLinkSignatureEmailsEnabled` | ```boolean``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | ```Set``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[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/BooleanSettingUpdate.md b/sdks/node/docs/model/BooleanSettingUpdate.md new file mode 100644 index 000000000..7405c7eee --- /dev/null +++ b/sdks/node/docs/model/BooleanSettingUpdate.md @@ -0,0 +1,12 @@ +# # BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```boolean``` | Boolean value to store. | | +| `lockMode` | [```TeamSettingLock```](TeamSettingLock.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/DataResidency.md b/sdks/node/docs/model/DataResidency.md new file mode 100644 index 000000000..1be0f2b8f --- /dev/null +++ b/sdks/node/docs/model/DataResidency.md @@ -0,0 +1,10 @@ +# # DataResidency + +Storage region for team documents. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/DataResidencySettingUpdate.md b/sdks/node/docs/model/DataResidencySettingUpdate.md new file mode 100644 index 000000000..303d18e72 --- /dev/null +++ b/sdks/node/docs/model/DataResidencySettingUpdate.md @@ -0,0 +1,12 @@ +# # DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```DataResidency```](DataResidency.md) | | | +| `lockMode` | [```TeamSettingLock```](TeamSettingLock.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/DateFormat.md b/sdks/node/docs/model/DateFormat.md new file mode 100644 index 000000000..19d3b236c --- /dev/null +++ b/sdks/node/docs/model/DateFormat.md @@ -0,0 +1,10 @@ +# # DateFormat + +Date format used to display dates. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/DateFormatSettingUpdate.md b/sdks/node/docs/model/DateFormatSettingUpdate.md new file mode 100644 index 000000000..afd49257e --- /dev/null +++ b/sdks/node/docs/model/DateFormatSettingUpdate.md @@ -0,0 +1,12 @@ +# # DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```DateFormat```](DateFormat.md) | | | +| `lockMode` | [```TeamSettingLock```](TeamSettingLock.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/RequiredSignatureType.md b/sdks/node/docs/model/RequiredSignatureType.md new file mode 100644 index 000000000..3906cb58e --- /dev/null +++ b/sdks/node/docs/model/RequiredSignatureType.md @@ -0,0 +1,10 @@ +# # RequiredSignatureType + +A signature creation method a signer may use. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/RequiredSignatureTypesSettingUpdate.md b/sdks/node/docs/model/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..4f4b60f49 --- /dev/null +++ b/sdks/node/docs/model/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,12 @@ +# # RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```Set```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `lockMode` | [```TeamSettingLock```](TeamSettingLock.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/SettingLockResponse.md b/sdks/node/docs/model/SettingLockResponse.md new file mode 100644 index 000000000..e23b40763 --- /dev/null +++ b/sdks/node/docs/model/SettingLockResponse.md @@ -0,0 +1,12 @@ +# # SettingLockResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `mode`*_required_ | [```TeamSettingLock```](TeamSettingLock.md) | | | +| `source`*_required_ | ```string``` | | | + +[[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/SettingResponse.md b/sdks/node/docs/model/SettingResponse.md new file mode 100644 index 000000000..5dfb60a3a --- /dev/null +++ b/sdks/node/docs/model/SettingResponse.md @@ -0,0 +1,16 @@ +# # SettingResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value`*_required_ | ```any``` | Current value of the setting. Null when the setting has no value. | | +| `isInherited`*_required_ | ```boolean``` | | | +| `source`*_required_ | ```string``` | | | +| `type`*_required_ | ```string``` | | | +| `writable`*_required_ | ```boolean``` | | | +| `lock`*_required_ | [```SettingLockResponse```](SettingLockResponse.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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/node/docs/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index eeed3331f..545d4868a 100644 --- a/sdks/node/docs/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/node/docs/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes | `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```string``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```{ [key: string]: any; }``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```string``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/node/docs/model/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/node/docs/model/SignatureRequestBulkSendWithTemplateRequest.md index b00013e0f..d1bd79790 100644 --- a/sdks/node/docs/model/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/node/docs/model/SignatureRequestBulkSendWithTemplateRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes | `clientId` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```string``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```{ [key: string]: any; }``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```string``` | The subject in the email that will be sent to the signers. | | | `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/node/docs/model/StringSettingUpdate.md b/sdks/node/docs/model/StringSettingUpdate.md new file mode 100644 index 000000000..25bd86d08 --- /dev/null +++ b/sdks/node/docs/model/StringSettingUpdate.md @@ -0,0 +1,12 @@ +# # StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```string``` | String value to store. | | +| `lockMode` | [```TeamSettingLock```](TeamSettingLock.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/SubBulkSignerList.md b/sdks/node/docs/model/SubBulkSignerList.md index 38606dea6..83110a825 100644 --- a/sdks/node/docs/model/SubBulkSignerList.md +++ b/sdks/node/docs/model/SubBulkSignerList.md @@ -8,5 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `customFields` | [```Array```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```{ [key: string]: any; }``` | _t__Sub::BulkSigner::METADATA | | [[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/TeamCreateRequest.md b/sdks/node/docs/model/TeamCreateRequest.md index 29c05f9a3..d70d180dd 100644 --- a/sdks/node/docs/model/TeamCreateRequest.md +++ b/sdks/node/docs/model/TeamCreateRequest.md @@ -7,5 +7,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `name` | ```string``` | The name of your Team. | [default to 'Untitled Team'] | +| `parentTeamId` | ```string``` | _t__TeamCreate::PARENT_TEAM_ID | | [[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/TeamResponse.md b/sdks/node/docs/model/TeamResponse.md index 39f6ae7fb..f60fd5e7a 100644 --- a/sdks/node/docs/model/TeamResponse.md +++ b/sdks/node/docs/model/TeamResponse.md @@ -6,6 +6,8 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +| `teamId` | ```string``` | The id of a team | | +| `parentTeamId` | ```string``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```string``` | The name of your Team | | | `accounts` | [```Array```](AccountResponse.md) | | | | `invitedAccounts` | [```Array```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/node/docs/model/TeamSettingLock.md b/sdks/node/docs/model/TeamSettingLock.md new file mode 100644 index 000000000..8a534c75d --- /dev/null +++ b/sdks/node/docs/model/TeamSettingLock.md @@ -0,0 +1,10 @@ +# # TeamSettingLock + +Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/TeamSettingsResponse.md b/sdks/node/docs/model/TeamSettingsResponse.md new file mode 100644 index 000000000..75595ed21 --- /dev/null +++ b/sdks/node/docs/model/TeamSettingsResponse.md @@ -0,0 +1,13 @@ +# # TeamSettingsResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `teamId`*_required_ | ```string``` | | | +| `settings`*_required_ | [```TeamSettingsResponseSettings```](TeamSettingsResponseSettings.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/TeamSettingsResponseSettings.md b/sdks/node/docs/model/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..2ad5738f5 --- /dev/null +++ b/sdks/node/docs/model/TeamSettingsResponseSettings.md @@ -0,0 +1,35 @@ +# # TeamSettingsResponseSettings + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency`*_required_ | [```SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + +[[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/TeamSettingsUpdateRequest.md b/sdks/node/docs/model/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..20b9d3289 --- /dev/null +++ b/sdks/node/docs/model/TeamSettingsUpdateRequest.md @@ -0,0 +1,36 @@ +# # TeamSettingsUpdateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | [```StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `customSigningRedirectEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `customSigningRedirectUrl` | [```StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `customTagline` | [```StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `dateFormat` | [```DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `isSignatureRemindersEnabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `requestEmailFrom` | [```StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `requestEmailSignature` | [```StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `requiredSignatureTypes` | [```RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `shouldEnableTamperProof` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `shouldIncludeDistinctPdfs` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `shouldOfferSignerAccessCode` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `shouldOfferSignerSmsAuthentication` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `shouldRemoveDocumentId` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `dataResidency` | [```DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allowTeamDeleteDocumentForEveryone` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allowTeamDownloadCsv` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lockTeamTemplateCreation` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lockTeamTemplateGallery` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `selfSignMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `selfSignTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signatureRequestMessage` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signatureRequestTitle` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactorAuthApp` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactorAuthSms` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | ```Set``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[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/accountSettingsResponse.ts b/sdks/node/model/accountSettingsResponse.ts new file mode 100644 index 000000000..b6358f4ff --- /dev/null +++ b/sdks/node/model/accountSettingsResponse.ts @@ -0,0 +1,65 @@ +/** + * 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 { AccountSettingsResponseSettings } from "./accountSettingsResponseSettings"; +import { WarningResponse } from "./warningResponse"; + +export class AccountSettingsResponse { + "accountId": string; + "settings": AccountSettingsResponseSettings; + /** + * A list of warnings. + */ + "warnings"?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string", + }, + { + name: "settings", + baseName: "settings", + type: "AccountSettingsResponseSettings", + }, + { + name: "warnings", + baseName: "warnings", + type: "Array", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return AccountSettingsResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): AccountSettingsResponse { + return ObjectSerializer.deserialize(data, "AccountSettingsResponse"); + } +} diff --git a/sdks/node/model/accountSettingsResponseSettings.ts b/sdks/node/model/accountSettingsResponseSettings.ts new file mode 100644 index 000000000..d072551e7 --- /dev/null +++ b/sdks/node/model/accountSettingsResponseSettings.ts @@ -0,0 +1,280 @@ +/** + * 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 { SettingResponse } from "./settingResponse"; + +export class AccountSettingsResponseSettings { + /** + * Company name associated with this account or team. + */ + "company": SettingResponse; + /** + * Whether signers are redirected to a custom URL after completing a signature request. + */ + "customSigningRedirectEnabled": SettingResponse; + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + */ + "customSigningRedirectUrl": SettingResponse; + /** + * Custom tagline displayed with the account or team branding. + */ + "customTagline": SettingResponse; + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + */ + "dateFormat": SettingResponse; + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + */ + "isSignatureRemindersEnabled": SettingResponse; + /** + * Sender name shown on signature request emails. + */ + "requestEmailFrom": SettingResponse; + /** + * Signature appended to signature request emails. + */ + "requestEmailSignature": SettingResponse; + /** + * Signature creation methods signers may use. + */ + "requiredSignatureTypes": SettingResponse; + /** + * Whether completed documents include a digital tamper-proof seal. + */ + "shouldEnableTamperProof": SettingResponse; + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + */ + "shouldIncludeDistinctPdfs": SettingResponse; + /** + * Whether senders can require an access code to verify a signer. + */ + "shouldOfferSignerAccessCode": SettingResponse; + /** + * Whether senders can require SMS authentication to verify a signer. + */ + "shouldOfferSignerSmsAuthentication": SettingResponse; + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + */ + "shouldRemoveDocumentId": SettingResponse; + /** + * Whether to notify the account when someone signs a document it sent. + */ + "isNotifyOnSignEnabled": SettingResponse; + /** + * Whether to notify the account when someone opens a document it sent. + */ + "isNotifyOnViewEnabled": SettingResponse; + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + */ + "shouldAutocomplete": SettingResponse; + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + */ + "shouldIncludeRequestedPdfs": SettingResponse; + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + */ + "shouldIncludeRequestedPdfsForOthers": SettingResponse; + /** + * Whether emails sent to the account include PDF copies of documents it sends. + */ + "shouldIncludeSentDocPdfs": SettingResponse; + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + */ + "shouldIncludeSentDocPdfsForOthers": SettingResponse; + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + */ + "shouldSendDailySummary": SettingResponse; + /** + * Whether to notify the account when it signs a document on a third-party site. + */ + "shouldSendEmbeddedSignatureConfEmails": SettingResponse; + /** + * Whether to notify all parties when an ordered signature request starts. + */ + "shouldSendOrderedSrEmail": SettingResponse; + /** + * Whether to notify the account when it signs and sends a document. + */ + "shouldSendOutboundConfEmails": SettingResponse; + /** + * Whether to notify the account when someone signs a document sent by its team through a template link. + */ + "templateLinkSignatureEmailsEnabled": SettingResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "SettingResponse", + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "SettingResponse", + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "SettingResponse", + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "SettingResponse", + }, + { + name: "dateFormat", + baseName: "date_format", + type: "SettingResponse", + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "SettingResponse", + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "SettingResponse", + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "SettingResponse", + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "SettingResponse", + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "SettingResponse", + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "SettingResponse", + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "SettingResponse", + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "SettingResponse", + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "SettingResponse", + }, + { + name: "isNotifyOnSignEnabled", + baseName: "is_notify_on_sign_enabled", + type: "SettingResponse", + }, + { + name: "isNotifyOnViewEnabled", + baseName: "is_notify_on_view_enabled", + type: "SettingResponse", + }, + { + name: "shouldAutocomplete", + baseName: "should_autocomplete", + type: "SettingResponse", + }, + { + name: "shouldIncludeRequestedPdfs", + baseName: "should_include_requested_pdfs", + type: "SettingResponse", + }, + { + name: "shouldIncludeRequestedPdfsForOthers", + baseName: "should_include_requested_pdfs_for_others", + type: "SettingResponse", + }, + { + name: "shouldIncludeSentDocPdfs", + baseName: "should_include_sent_doc_pdfs", + type: "SettingResponse", + }, + { + name: "shouldIncludeSentDocPdfsForOthers", + baseName: "should_include_sent_doc_pdfs_for_others", + type: "SettingResponse", + }, + { + name: "shouldSendDailySummary", + baseName: "should_send_daily_summary", + type: "SettingResponse", + }, + { + name: "shouldSendEmbeddedSignatureConfEmails", + baseName: "should_send_embedded_signature_conf_emails", + type: "SettingResponse", + }, + { + name: "shouldSendOrderedSrEmail", + baseName: "should_send_ordered_sr_email", + type: "SettingResponse", + }, + { + name: "shouldSendOutboundConfEmails", + baseName: "should_send_outbound_conf_emails", + type: "SettingResponse", + }, + { + name: "templateLinkSignatureEmailsEnabled", + baseName: "template_link_signature_emails_enabled", + type: "SettingResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return AccountSettingsResponseSettings.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): AccountSettingsResponseSettings { + return ObjectSerializer.deserialize( + data, + "AccountSettingsResponseSettings" + ); + } +} diff --git a/sdks/node/model/accountSettingsUpdateRequest.ts b/sdks/node/model/accountSettingsUpdateRequest.ts new file mode 100644 index 000000000..9b6415efa --- /dev/null +++ b/sdks/node/model/accountSettingsUpdateRequest.ts @@ -0,0 +1,315 @@ +/** + * 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 { DateFormat } from "./dateFormat"; +import { RequiredSignatureType } from "./requiredSignatureType"; + +export class AccountSettingsUpdateRequest { + /** + * Company name associated with this account or team. + */ + "company"?: string; + /** + * Whether signers are redirected to a custom URL after completing a signature request. + */ + "customSigningRedirectEnabled"?: boolean; + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + */ + "customSigningRedirectUrl"?: string; + /** + * Custom tagline displayed with the account or team branding. + */ + "customTagline"?: string; + "dateFormat"?: DateFormat; + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + */ + "isSignatureRemindersEnabled"?: boolean; + /** + * Sender name shown on signature request emails. + */ + "requestEmailFrom"?: string; + /** + * Signature appended to signature request emails. + */ + "requestEmailSignature"?: string; + /** + * Signature creation methods signers may use. + */ + "requiredSignatureTypes"?: Set; + /** + * Whether completed documents include a digital tamper-proof seal. + */ + "shouldEnableTamperProof"?: boolean; + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + */ + "shouldIncludeDistinctPdfs"?: boolean; + /** + * Whether senders can require an access code to verify a signer. + */ + "shouldOfferSignerAccessCode"?: boolean; + /** + * Whether senders can require SMS authentication to verify a signer. + */ + "shouldOfferSignerSmsAuthentication"?: boolean; + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + */ + "shouldRemoveDocumentId"?: boolean; + /** + * Whether to notify the account when someone signs a document it sent. + */ + "isNotifyOnSignEnabled"?: boolean; + /** + * Whether to notify the account when someone opens a document it sent. + */ + "isNotifyOnViewEnabled"?: boolean; + /** + * Whether values entered in text fields are saved and suggested for future signature requests. + */ + "shouldAutocomplete"?: boolean; + /** + * Whether completed signature requests include PDF copies in emails sent to the account. + */ + "shouldIncludeRequestedPdfs"?: boolean; + /** + * Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + */ + "shouldIncludeRequestedPdfsForOthers"?: boolean; + /** + * Whether emails sent to the account include PDF copies of documents it sends. + */ + "shouldIncludeSentDocPdfs"?: boolean; + /** + * Whether emails sent to recipients include PDF copies of documents the account sends. + */ + "shouldIncludeSentDocPdfsForOthers"?: boolean; + /** + * Whether to send the account a daily email summarizing outstanding signature requests. + */ + "shouldSendDailySummary"?: boolean; + /** + * Whether to notify the account when it signs a document on a third-party site. + */ + "shouldSendEmbeddedSignatureConfEmails"?: boolean; + /** + * Whether to notify all parties when an ordered signature request starts. + */ + "shouldSendOrderedSrEmail"?: boolean; + /** + * Whether to notify the account when it signs and sends a document. + */ + "shouldSendOutboundConfEmails"?: boolean; + /** + * Whether to notify the account when someone signs a document sent by its team through a template link. + */ + "templateLinkSignatureEmailsEnabled"?: boolean; + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + */ + "unset"?: Set; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "string", + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "boolean", + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "string", + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "string", + }, + { + name: "dateFormat", + baseName: "date_format", + type: "DateFormat", + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "boolean", + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "string", + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "string", + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "Set", + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "boolean", + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "boolean", + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "boolean", + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "boolean", + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "boolean", + }, + { + name: "isNotifyOnSignEnabled", + baseName: "is_notify_on_sign_enabled", + type: "boolean", + }, + { + name: "isNotifyOnViewEnabled", + baseName: "is_notify_on_view_enabled", + type: "boolean", + }, + { + name: "shouldAutocomplete", + baseName: "should_autocomplete", + type: "boolean", + }, + { + name: "shouldIncludeRequestedPdfs", + baseName: "should_include_requested_pdfs", + type: "boolean", + }, + { + name: "shouldIncludeRequestedPdfsForOthers", + baseName: "should_include_requested_pdfs_for_others", + type: "boolean", + }, + { + name: "shouldIncludeSentDocPdfs", + baseName: "should_include_sent_doc_pdfs", + type: "boolean", + }, + { + name: "shouldIncludeSentDocPdfsForOthers", + baseName: "should_include_sent_doc_pdfs_for_others", + type: "boolean", + }, + { + name: "shouldSendDailySummary", + baseName: "should_send_daily_summary", + type: "boolean", + }, + { + name: "shouldSendEmbeddedSignatureConfEmails", + baseName: "should_send_embedded_signature_conf_emails", + type: "boolean", + }, + { + name: "shouldSendOrderedSrEmail", + baseName: "should_send_ordered_sr_email", + type: "boolean", + }, + { + name: "shouldSendOutboundConfEmails", + baseName: "should_send_outbound_conf_emails", + type: "boolean", + }, + { + name: "templateLinkSignatureEmailsEnabled", + baseName: "template_link_signature_emails_enabled", + type: "boolean", + }, + { + name: "unset", + baseName: "unset", + type: "Set", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return AccountSettingsUpdateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): AccountSettingsUpdateRequest { + return ObjectSerializer.deserialize(data, "AccountSettingsUpdateRequest"); + } +} + +export namespace AccountSettingsUpdateRequest { + export enum UnsetEnum { + Company = "company", + CustomSigningRedirectEnabled = "custom_signing_redirect_enabled", + CustomSigningRedirectUrl = "custom_signing_redirect_url", + CustomTagline = "custom_tagline", + DateFormat = "date_format", + IsSignatureRemindersEnabled = "is_signature_reminders_enabled", + RequestEmailFrom = "request_email_from", + RequestEmailSignature = "request_email_signature", + RequiredSignatureTypes = "required_signature_types", + ShouldEnableTamperProof = "should_enable_tamper_proof", + ShouldIncludeDistinctPdfs = "should_include_distinct_pdfs", + ShouldOfferSignerAccessCode = "should_offer_signer_access_code", + ShouldOfferSignerSmsAuthentication = "should_offer_signer_sms_authentication", + ShouldRemoveDocumentId = "should_remove_document_id", + IsNotifyOnSignEnabled = "is_notify_on_sign_enabled", + IsNotifyOnViewEnabled = "is_notify_on_view_enabled", + ShouldAutocomplete = "should_autocomplete", + ShouldIncludeRequestedPdfs = "should_include_requested_pdfs", + ShouldIncludeRequestedPdfsForOthers = "should_include_requested_pdfs_for_others", + ShouldIncludeSentDocPdfs = "should_include_sent_doc_pdfs", + ShouldIncludeSentDocPdfsForOthers = "should_include_sent_doc_pdfs_for_others", + ShouldSendDailySummary = "should_send_daily_summary", + ShouldSendEmbeddedSignatureConfEmails = "should_send_embedded_signature_conf_emails", + ShouldSendOrderedSrEmail = "should_send_ordered_sr_email", + ShouldSendOutboundConfEmails = "should_send_outbound_conf_emails", + TemplateLinkSignatureEmailsEnabled = "template_link_signature_emails_enabled", + } +} diff --git a/sdks/node/model/booleanSettingUpdate.ts b/sdks/node/model/booleanSettingUpdate.ts new file mode 100644 index 000000000..d5afcd3aa --- /dev/null +++ b/sdks/node/model/booleanSettingUpdate.ts @@ -0,0 +1,63 @@ +/** + * 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 { TeamSettingLock } from "./teamSettingLock"; + +/** + * Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + */ +export class BooleanSettingUpdate { + /** + * Boolean value to store. + */ + "value"?: boolean; + "lockMode"?: TeamSettingLock; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "boolean", + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return BooleanSettingUpdate.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): BooleanSettingUpdate { + return ObjectSerializer.deserialize(data, "BooleanSettingUpdate"); + } +} + +export namespace BooleanSettingUpdate {} diff --git a/sdks/node/model/dataResidency.ts b/sdks/node/model/dataResidency.ts new file mode 100644 index 000000000..97cfa0de2 --- /dev/null +++ b/sdks/node/model/dataResidency.ts @@ -0,0 +1,35 @@ +/** + * 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. + */ + +/** + * Storage region for team documents. + */ +export enum DataResidency { + Us = "us", + Eu = "eu", + Au = "au", + Jp = "jp", + Uk = "uk", + Ca = "ca", +} diff --git a/sdks/node/model/dataResidencySettingUpdate.ts b/sdks/node/model/dataResidencySettingUpdate.ts new file mode 100644 index 000000000..44e2ab721 --- /dev/null +++ b/sdks/node/model/dataResidencySettingUpdate.ts @@ -0,0 +1,61 @@ +/** + * 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 { DataResidency } from "./dataResidency"; +import { TeamSettingLock } from "./teamSettingLock"; + +/** + * Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + */ +export class DataResidencySettingUpdate { + "value"?: DataResidency; + "lockMode"?: TeamSettingLock; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "DataResidency", + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return DataResidencySettingUpdate.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): DataResidencySettingUpdate { + return ObjectSerializer.deserialize(data, "DataResidencySettingUpdate"); + } +} + +export namespace DataResidencySettingUpdate {} diff --git a/sdks/node/model/dateFormat.ts b/sdks/node/model/dateFormat.ts new file mode 100644 index 000000000..9515a03a4 --- /dev/null +++ b/sdks/node/model/dateFormat.ts @@ -0,0 +1,32 @@ +/** + * 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. + */ + +/** + * Date format used to display dates. + */ +export enum DateFormat { + MmDdYyyy = "MM/DD/YYYY", + DdMmYyyy = "DD/MM/YYYY", + YyyyMmDd = "YYYY/MM/DD", +} diff --git a/sdks/node/model/dateFormatSettingUpdate.ts b/sdks/node/model/dateFormatSettingUpdate.ts new file mode 100644 index 000000000..e2ee4c625 --- /dev/null +++ b/sdks/node/model/dateFormatSettingUpdate.ts @@ -0,0 +1,61 @@ +/** + * 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 { DateFormat } from "./dateFormat"; +import { TeamSettingLock } from "./teamSettingLock"; + +/** + * Updates a date format team setting. Provide `value`, `lock_mode`, or both. + */ +export class DateFormatSettingUpdate { + "value"?: DateFormat; + "lockMode"?: TeamSettingLock; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "DateFormat", + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return DateFormatSettingUpdate.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): DateFormatSettingUpdate { + return ObjectSerializer.deserialize(data, "DateFormatSettingUpdate"); + } +} + +export namespace DateFormatSettingUpdate {} diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 9aa90a2b0..3cf998e6a 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -5,6 +5,9 @@ import { AccountResponse } from "./accountResponse"; import { AccountResponseQuotas } from "./accountResponseQuotas"; import { AccountResponseSettings } from "./accountResponseSettings"; import { AccountResponseUsage } from "./accountResponseUsage"; +import { AccountSettingsResponse } from "./accountSettingsResponse"; +import { AccountSettingsResponseSettings } from "./accountSettingsResponseSettings"; +import { AccountSettingsUpdateRequest } from "./accountSettingsUpdateRequest"; import { AccountUpdateRequest } from "./accountUpdateRequest"; import { AccountVerifyRequest } from "./accountVerifyRequest"; import { AccountVerifyResponse } from "./accountVerifyResponse"; @@ -18,11 +21,16 @@ import { ApiAppResponseOptions } from "./apiAppResponseOptions"; import { ApiAppResponseOwnerAccount } from "./apiAppResponseOwnerAccount"; import { ApiAppResponseWhiteLabelingOptions } from "./apiAppResponseWhiteLabelingOptions"; import { ApiAppUpdateRequest } from "./apiAppUpdateRequest"; +import { BooleanSettingUpdate } from "./booleanSettingUpdate"; import { BulkSendJobGetResponse } from "./bulkSendJobGetResponse"; import { BulkSendJobGetResponseSignatureRequests } from "./bulkSendJobGetResponseSignatureRequests"; import { BulkSendJobListResponse } from "./bulkSendJobListResponse"; import { BulkSendJobResponse } from "./bulkSendJobResponse"; import { BulkSendJobSendResponse } from "./bulkSendJobSendResponse"; +import { DataResidency } from "./dataResidency"; +import { DataResidencySettingUpdate } from "./dataResidencySettingUpdate"; +import { DateFormat } from "./dateFormat"; +import { DateFormatSettingUpdate } from "./dateFormatSettingUpdate"; import { DocumentFieldDetectionRequest } from "./documentFieldDetectionRequest"; import { DocumentFieldDetectionResponse } from "./documentFieldDetectionResponse"; import { DocumentFieldDetectionResponseDetectionResult } from "./documentFieldDetectionResponseDetectionResult"; @@ -75,6 +83,10 @@ import { OAuthTokenResponse } from "./oAuthTokenResponse"; import { ReportCreateRequest } from "./reportCreateRequest"; import { ReportCreateResponse } from "./reportCreateResponse"; import { ReportResponse } from "./reportResponse"; +import { RequiredSignatureType } from "./requiredSignatureType"; +import { RequiredSignatureTypesSettingUpdate } from "./requiredSignatureTypesSettingUpdate"; +import { SettingLockResponse } from "./settingLockResponse"; +import { SettingResponse } from "./settingResponse"; import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatureRequestBulkCreateEmbeddedWithTemplateRequest"; import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; @@ -107,6 +119,7 @@ import { SignatureRequestResponseSignatures } from "./signatureRequestResponseSi import { SignatureRequestSendRequest } from "./signatureRequestSendRequest"; import { SignatureRequestSendWithTemplateRequest } from "./signatureRequestSendWithTemplateRequest"; import { SignatureRequestUpdateRequest } from "./signatureRequestUpdateRequest"; +import { StringSettingUpdate } from "./stringSettingUpdate"; import { SubAttachment } from "./subAttachment"; import { SubBulkSignerList } from "./subBulkSignerList"; import { SubBulkSignerListCustomField } from "./subBulkSignerListCustomField"; @@ -155,6 +168,10 @@ import { TeamMembersResponse } from "./teamMembersResponse"; import { TeamParentResponse } from "./teamParentResponse"; import { TeamRemoveMemberRequest } from "./teamRemoveMemberRequest"; import { TeamResponse } from "./teamResponse"; +import { TeamSettingLock } from "./teamSettingLock"; +import { TeamSettingsResponse } from "./teamSettingsResponse"; +import { TeamSettingsResponseSettings } from "./teamSettingsResponseSettings"; +import { TeamSettingsUpdateRequest } from "./teamSettingsUpdateRequest"; import { TeamSubTeamsResponse } from "./teamSubTeamsResponse"; import { TeamUpdateRequest } from "./teamUpdateRequest"; import { TemplateAddUserRequest } from "./templateAddUserRequest"; @@ -209,6 +226,10 @@ import { UnclaimedDraftResponse } from "./unclaimedDraftResponse"; import { WarningResponse } from "./warningResponse"; export let enumsMap: { [index: string]: any } = { + "AccountSettingsUpdateRequest.UnsetEnum": + AccountSettingsUpdateRequest.UnsetEnum, + DataResidency: DataResidency, + DateFormat: DateFormat, "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, FaxLineAreaCodeGetCountryEnum: FaxLineAreaCodeGetCountryEnum, @@ -219,6 +240,10 @@ export let enumsMap: { [index: string]: any } = { FaxResponseTransmission.StatusCodeEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, + RequiredSignatureType: RequiredSignatureType, + "SettingLockResponse.SourceEnum": SettingLockResponse.SourceEnum, + "SettingResponse.SourceEnum": SettingResponse.SourceEnum, + "SettingResponse.TypeEnum": SettingResponse.TypeEnum, SignatureRequestResponseCustomFieldTypeEnum: SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataTypeEnum: SignatureRequestResponseDataTypeEnum, @@ -250,6 +275,8 @@ export let enumsMap: { [index: string]: any } = { SubWhiteLabelingOptions.LegalVersionEnum, "TeamAddMemberRequest.RoleEnum": TeamAddMemberRequest.RoleEnum, "TeamRemoveMemberRequest.NewRoleEnum": TeamRemoveMemberRequest.NewRoleEnum, + TeamSettingLock: TeamSettingLock, + "TeamSettingsUpdateRequest.UnsetEnum": TeamSettingsUpdateRequest.UnsetEnum, "TemplateResponseDocumentFormFieldText.ValidationTypeEnum": TemplateResponseDocumentFormFieldText.ValidationTypeEnum, "UnclaimedDraftCreateEmbeddedRequest.TypeEnum": @@ -265,6 +292,9 @@ export let typeMap: { [index: string]: any } = { AccountResponseQuotas: AccountResponseQuotas, AccountResponseSettings: AccountResponseSettings, AccountResponseUsage: AccountResponseUsage, + AccountSettingsResponse: AccountSettingsResponse, + AccountSettingsResponseSettings: AccountSettingsResponseSettings, + AccountSettingsUpdateRequest: AccountSettingsUpdateRequest, AccountUpdateRequest: AccountUpdateRequest, AccountVerifyRequest: AccountVerifyRequest, AccountVerifyResponse: AccountVerifyResponse, @@ -278,12 +308,15 @@ export let typeMap: { [index: string]: any } = { ApiAppResponseOwnerAccount: ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions: ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest: ApiAppUpdateRequest, + BooleanSettingUpdate: BooleanSettingUpdate, BulkSendJobGetResponse: BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests: BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse: BulkSendJobListResponse, BulkSendJobResponse: BulkSendJobResponse, BulkSendJobSendResponse: BulkSendJobSendResponse, + DataResidencySettingUpdate: DataResidencySettingUpdate, + DateFormatSettingUpdate: DateFormatSettingUpdate, DocumentFieldDetectionRequest: DocumentFieldDetectionRequest, DocumentFieldDetectionResponse: DocumentFieldDetectionResponse, DocumentFieldDetectionResponseDetectionResult: @@ -320,6 +353,9 @@ export let typeMap: { [index: string]: any } = { ReportCreateRequest: ReportCreateRequest, ReportCreateResponse: ReportCreateResponse, ReportResponse: ReportResponse, + RequiredSignatureTypesSettingUpdate: RequiredSignatureTypesSettingUpdate, + SettingLockResponse: SettingLockResponse, + SettingResponse: SettingResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest: SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest: @@ -367,6 +403,7 @@ export let typeMap: { [index: string]: any } = { SignatureRequestSendWithTemplateRequest: SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest: SignatureRequestUpdateRequest, + StringSettingUpdate: StringSettingUpdate, SubAttachment: SubAttachment, SubBulkSignerList: SubBulkSignerList, SubBulkSignerListCustomField: SubBulkSignerListCustomField, @@ -413,6 +450,9 @@ export let typeMap: { [index: string]: any } = { TeamParentResponse: TeamParentResponse, TeamRemoveMemberRequest: TeamRemoveMemberRequest, TeamResponse: TeamResponse, + TeamSettingsResponse: TeamSettingsResponse, + TeamSettingsResponseSettings: TeamSettingsResponseSettings, + TeamSettingsUpdateRequest: TeamSettingsUpdateRequest, TeamSubTeamsResponse: TeamSubTeamsResponse, TeamUpdateRequest: TeamUpdateRequest, TemplateAddUserRequest: TemplateAddUserRequest, @@ -497,6 +537,9 @@ export { AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, + AccountSettingsResponse, + AccountSettingsResponseSettings, + AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, @@ -513,11 +556,16 @@ export { ApiKeyAuth, AttributeTypeMap, Authentication, + BooleanSettingUpdate, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, + DataResidency, + DataResidencySettingUpdate, + DateFormat, + DateFormatSettingUpdate, DocumentFieldDetectionRequest, DocumentFieldDetectionResponse, DocumentFieldDetectionResponseDetectionResult, @@ -564,6 +612,10 @@ export { ReportResponse, RequestDetailedFile, RequestFile, + RequiredSignatureType, + RequiredSignatureTypesSettingUpdate, + SettingLockResponse, + SettingResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, @@ -596,6 +648,7 @@ export { SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, + StringSettingUpdate, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, @@ -644,6 +697,10 @@ export { TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, + TeamSettingLock, + TeamSettingsResponse, + TeamSettingsResponseSettings, + TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, diff --git a/sdks/node/model/requiredSignatureType.ts b/sdks/node/model/requiredSignatureType.ts new file mode 100644 index 000000000..beb88cf49 --- /dev/null +++ b/sdks/node/model/requiredSignatureType.ts @@ -0,0 +1,33 @@ +/** + * 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. + */ + +/** + * A signature creation method a signer may use. + */ +export enum RequiredSignatureType { + Draw = "draw", + Phone = "phone", + Type = "type", + Upload = "upload", +} diff --git a/sdks/node/model/requiredSignatureTypesSettingUpdate.ts b/sdks/node/model/requiredSignatureTypesSettingUpdate.ts new file mode 100644 index 000000000..a9fbbc3b6 --- /dev/null +++ b/sdks/node/model/requiredSignatureTypesSettingUpdate.ts @@ -0,0 +1,67 @@ +/** + * 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 { RequiredSignatureType } from "./requiredSignatureType"; +import { TeamSettingLock } from "./teamSettingLock"; + +/** + * Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + */ +export class RequiredSignatureTypesSettingUpdate { + /** + * Signature creation methods signers may use. + */ + "value"?: Set; + "lockMode"?: TeamSettingLock; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "Set", + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return RequiredSignatureTypesSettingUpdate.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): RequiredSignatureTypesSettingUpdate { + return ObjectSerializer.deserialize( + data, + "RequiredSignatureTypesSettingUpdate" + ); + } +} + +export namespace RequiredSignatureTypesSettingUpdate {} diff --git a/sdks/node/model/settingLockResponse.ts b/sdks/node/model/settingLockResponse.ts new file mode 100644 index 000000000..d5a9af075 --- /dev/null +++ b/sdks/node/model/settingLockResponse.ts @@ -0,0 +1,63 @@ +/** + * 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 { TeamSettingLock } from "./teamSettingLock"; + +export class SettingLockResponse { + "mode": TeamSettingLock; + "source": SettingLockResponse.SourceEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "mode", + baseName: "mode", + type: "TeamSettingLock", + }, + { + name: "source", + baseName: "source", + type: "SettingLockResponse.SourceEnum", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SettingLockResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SettingLockResponse { + return ObjectSerializer.deserialize(data, "SettingLockResponse"); + } +} + +export namespace SettingLockResponse { + export enum SourceEnum { + Team = "team", + ParentTeam = "parent_team", + Default = "default", + } +} diff --git a/sdks/node/model/settingResponse.ts b/sdks/node/model/settingResponse.ts new file mode 100644 index 000000000..d21726890 --- /dev/null +++ b/sdks/node/model/settingResponse.ts @@ -0,0 +1,97 @@ +/** + * 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 { SettingLockResponse } from "./settingLockResponse"; + +export class SettingResponse { + /** + * Current value of the setting. Null when the setting has no value. + */ + "value": any | null; + "isInherited": boolean; + "source": SettingResponse.SourceEnum; + "type": SettingResponse.TypeEnum; + "writable": boolean; + "lock": SettingLockResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "any", + }, + { + name: "isInherited", + baseName: "is_inherited", + type: "boolean", + }, + { + name: "source", + baseName: "source", + type: "SettingResponse.SourceEnum", + }, + { + name: "type", + baseName: "type", + type: "SettingResponse.TypeEnum", + }, + { + name: "writable", + baseName: "writable", + type: "boolean", + }, + { + name: "lock", + baseName: "lock", + type: "SettingLockResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SettingResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SettingResponse { + return ObjectSerializer.deserialize(data, "SettingResponse"); + } +} + +export namespace SettingResponse { + export enum SourceEnum { + Account = "account", + Team = "team", + ParentTeam = "parent_team", + Default = "default", + } + export enum TypeEnum { + Boolean = "boolean", + Integer = "integer", + String = "string", + Array = "array", + } +} diff --git a/sdks/node/model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts b/sdks/node/model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts index 634a34210..b15e48d51 100644 --- a/sdks/node/model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts +++ b/sdks/node/model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts @@ -61,7 +61,7 @@ export class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { */ "message"?: string; /** - * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA */ "metadata"?: { [key: string]: any }; /** diff --git a/sdks/node/model/signatureRequestBulkSendWithTemplateRequest.ts b/sdks/node/model/signatureRequestBulkSendWithTemplateRequest.ts index 88344fe28..24a0bb8a3 100644 --- a/sdks/node/model/signatureRequestBulkSendWithTemplateRequest.ts +++ b/sdks/node/model/signatureRequestBulkSendWithTemplateRequest.ts @@ -61,7 +61,7 @@ export class SignatureRequestBulkSendWithTemplateRequest { */ "message"?: string; /** - * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * _t__SignatureRequestBulkSendWithTemplate::METADATA */ "metadata"?: { [key: string]: any }; /** diff --git a/sdks/node/model/stringSettingUpdate.ts b/sdks/node/model/stringSettingUpdate.ts new file mode 100644 index 000000000..24d6e0537 --- /dev/null +++ b/sdks/node/model/stringSettingUpdate.ts @@ -0,0 +1,63 @@ +/** + * 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 { TeamSettingLock } from "./teamSettingLock"; + +/** + * Updates a string team setting. Provide `value`, `lock_mode`, or both. + */ +export class StringSettingUpdate { + /** + * String value to store. + */ + "value"?: string; + "lockMode"?: TeamSettingLock; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "value", + baseName: "value", + type: "string", + }, + { + name: "lockMode", + baseName: "lock_mode", + type: "TeamSettingLock", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return StringSettingUpdate.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): StringSettingUpdate { + return ObjectSerializer.deserialize(data, "StringSettingUpdate"); + } +} + +export namespace StringSettingUpdate {} diff --git a/sdks/node/model/subBulkSignerList.ts b/sdks/node/model/subBulkSignerList.ts index 46a11d1e5..c7f15daa3 100644 --- a/sdks/node/model/subBulkSignerList.ts +++ b/sdks/node/model/subBulkSignerList.ts @@ -35,6 +35,10 @@ export class SubBulkSignerList { * Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value. */ "signers"?: Array; + /** + * _t__Sub::BulkSigner::METADATA + */ + "metadata"?: { [key: string]: any }; static discriminator: string | undefined = undefined; @@ -49,6 +53,11 @@ export class SubBulkSignerList { baseName: "signers", type: "Array", }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/teamCreateRequest.ts b/sdks/node/model/teamCreateRequest.ts index 7439b337d..edb4da7ed 100644 --- a/sdks/node/model/teamCreateRequest.ts +++ b/sdks/node/model/teamCreateRequest.ts @@ -29,6 +29,10 @@ export class TeamCreateRequest { * The name of your Team. */ "name"?: string = "Untitled Team"; + /** + * _t__TeamCreate::PARENT_TEAM_ID + */ + "parentTeamId"?: string; static discriminator: string | undefined = undefined; @@ -38,6 +42,11 @@ export class TeamCreateRequest { baseName: "name", type: "string", }, + { + name: "parentTeamId", + baseName: "parent_team_id", + type: "string", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/model/teamResponse.ts b/sdks/node/model/teamResponse.ts index 4d0a233d0..f778b6732 100644 --- a/sdks/node/model/teamResponse.ts +++ b/sdks/node/model/teamResponse.ts @@ -29,6 +29,14 @@ import { AccountResponse } from "./accountResponse"; * Contains information about your team and its members */ export class TeamResponse { + /** + * The id of a team + */ + "teamId"?: string; + /** + * _t__Team::PARENT_TEAM_ID + */ + "parentTeamId"?: string; /** * The name of your Team */ @@ -46,6 +54,16 @@ export class TeamResponse { static discriminator: string | undefined = undefined; static attributeTypeMap: AttributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string", + }, + { + name: "parentTeamId", + baseName: "parent_team_id", + type: "string", + }, { name: "name", baseName: "name", diff --git a/sdks/node/model/teamSettingLock.ts b/sdks/node/model/teamSettingLock.ts new file mode 100644 index 000000000..2d3c64270 --- /dev/null +++ b/sdks/node/model/teamSettingLock.ts @@ -0,0 +1,32 @@ +/** + * 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. + */ + +/** + * Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + */ +export enum TeamSettingLock { + OrganizationAdmins = "organization_admins", + TeamAdmins = "team_admins", + Members = "members", +} diff --git a/sdks/node/model/teamSettingsResponse.ts b/sdks/node/model/teamSettingsResponse.ts new file mode 100644 index 000000000..9f25c2d18 --- /dev/null +++ b/sdks/node/model/teamSettingsResponse.ts @@ -0,0 +1,65 @@ +/** + * 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 { TeamSettingsResponseSettings } from "./teamSettingsResponseSettings"; +import { WarningResponse } from "./warningResponse"; + +export class TeamSettingsResponse { + "teamId": string; + "settings": TeamSettingsResponseSettings; + /** + * A list of warnings. + */ + "warnings"?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string", + }, + { + name: "settings", + baseName: "settings", + type: "TeamSettingsResponseSettings", + }, + { + name: "warnings", + baseName: "warnings", + type: "Array", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return TeamSettingsResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): TeamSettingsResponse { + return ObjectSerializer.deserialize(data, "TeamSettingsResponse"); + } +} diff --git a/sdks/node/model/teamSettingsResponseSettings.ts b/sdks/node/model/teamSettingsResponseSettings.ts new file mode 100644 index 000000000..2ffb3fc77 --- /dev/null +++ b/sdks/node/model/teamSettingsResponseSettings.ts @@ -0,0 +1,268 @@ +/** + * 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 { SettingResponse } from "./settingResponse"; + +export class TeamSettingsResponseSettings { + /** + * Company name associated with this account or team. + */ + "company": SettingResponse; + /** + * Whether signers are redirected to a custom URL after completing a signature request. + */ + "customSigningRedirectEnabled": SettingResponse; + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + */ + "customSigningRedirectUrl": SettingResponse; + /** + * Custom tagline displayed with the account or team branding. + */ + "customTagline": SettingResponse; + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + */ + "dateFormat": SettingResponse; + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + */ + "isSignatureRemindersEnabled": SettingResponse; + /** + * Sender name shown on signature request emails. + */ + "requestEmailFrom": SettingResponse; + /** + * Signature appended to signature request emails. + */ + "requestEmailSignature": SettingResponse; + /** + * Signature creation methods signers may use. + */ + "requiredSignatureTypes": SettingResponse; + /** + * Whether completed documents include a digital tamper-proof seal. + */ + "shouldEnableTamperProof": SettingResponse; + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + */ + "shouldIncludeDistinctPdfs": SettingResponse; + /** + * Whether senders can require an access code to verify a signer. + */ + "shouldOfferSignerAccessCode": SettingResponse; + /** + * Whether senders can require SMS authentication to verify a signer. + */ + "shouldOfferSignerSmsAuthentication": SettingResponse; + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + */ + "shouldRemoveDocumentId": SettingResponse; + /** + * Storage region for team documents. + */ + "dataResidency": SettingResponse; + /** + * Whether team members can delete a document for all participants. + */ + "allowTeamDeleteDocumentForEveryone": SettingResponse; + /** + * Whether team members can download CSV files. + */ + "allowTeamDownloadCsv": SettingResponse; + /** + * Whether team members are prevented from creating templates. + */ + "lockTeamTemplateCreation": SettingResponse; + /** + * Whether team members are prevented from using the template gallery. + */ + "lockTeamTemplateGallery": SettingResponse; + /** + * Default message enforced for team members when they create self-signed documents. + */ + "selfSignMessage": SettingResponse; + /** + * Default title enforced for team members when they create self-signed documents. + */ + "selfSignTitle": SettingResponse; + /** + * Default message enforced for team members when they create signature requests. + */ + "signatureRequestMessage": SettingResponse; + /** + * Default title enforced for team members when they create signature requests. + */ + "signatureRequestTitle": SettingResponse; + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + */ + "multifactorAuthApp": SettingResponse; + /** + * Whether SMS multifactor authentication is enabled for the team. + */ + "multifactorAuthSms": SettingResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "SettingResponse", + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "SettingResponse", + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "SettingResponse", + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "SettingResponse", + }, + { + name: "dateFormat", + baseName: "date_format", + type: "SettingResponse", + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "SettingResponse", + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "SettingResponse", + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "SettingResponse", + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "SettingResponse", + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "SettingResponse", + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "SettingResponse", + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "SettingResponse", + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "SettingResponse", + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "SettingResponse", + }, + { + name: "dataResidency", + baseName: "data_residency", + type: "SettingResponse", + }, + { + name: "allowTeamDeleteDocumentForEveryone", + baseName: "allow_team_delete_document_for_everyone", + type: "SettingResponse", + }, + { + name: "allowTeamDownloadCsv", + baseName: "allow_team_download_csv", + type: "SettingResponse", + }, + { + name: "lockTeamTemplateCreation", + baseName: "lock_team_template_creation", + type: "SettingResponse", + }, + { + name: "lockTeamTemplateGallery", + baseName: "lock_team_template_gallery", + type: "SettingResponse", + }, + { + name: "selfSignMessage", + baseName: "self_sign_message", + type: "SettingResponse", + }, + { + name: "selfSignTitle", + baseName: "self_sign_title", + type: "SettingResponse", + }, + { + name: "signatureRequestMessage", + baseName: "signature_request_message", + type: "SettingResponse", + }, + { + name: "signatureRequestTitle", + baseName: "signature_request_title", + type: "SettingResponse", + }, + { + name: "multifactorAuthApp", + baseName: "multifactor_auth_app", + type: "SettingResponse", + }, + { + name: "multifactorAuthSms", + baseName: "multifactor_auth_sms", + type: "SettingResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return TeamSettingsResponseSettings.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): TeamSettingsResponseSettings { + return ObjectSerializer.deserialize(data, "TeamSettingsResponseSettings"); + } +} diff --git a/sdks/node/model/teamSettingsUpdateRequest.ts b/sdks/node/model/teamSettingsUpdateRequest.ts new file mode 100644 index 000000000..e37eca668 --- /dev/null +++ b/sdks/node/model/teamSettingsUpdateRequest.ts @@ -0,0 +1,311 @@ +/** + * 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 { BooleanSettingUpdate } from "./booleanSettingUpdate"; +import { DataResidencySettingUpdate } from "./dataResidencySettingUpdate"; +import { DateFormatSettingUpdate } from "./dateFormatSettingUpdate"; +import { RequiredSignatureTypesSettingUpdate } from "./requiredSignatureTypesSettingUpdate"; +import { StringSettingUpdate } from "./stringSettingUpdate"; + +export class TeamSettingsUpdateRequest { + /** + * Company name associated with this account or team. + */ + "company"?: StringSettingUpdate; + /** + * Whether signers are redirected to a custom URL after completing a signature request. + */ + "customSigningRedirectEnabled"?: BooleanSettingUpdate; + /** + * URL where signers are redirected after completing a signature request when custom redirects are enabled. + */ + "customSigningRedirectUrl"?: StringSettingUpdate; + /** + * Custom tagline displayed with the account or team branding. + */ + "customTagline"?: StringSettingUpdate; + /** + * Date format used to display dates. List the setting in `unset` to inherit the default. + */ + "dateFormat"?: DateFormatSettingUpdate; + /** + * Whether automatic reminder emails are enabled for incomplete signature requests. + */ + "isSignatureRemindersEnabled"?: BooleanSettingUpdate; + /** + * Sender name shown on signature request emails. + */ + "requestEmailFrom"?: StringSettingUpdate; + /** + * Signature appended to signature request emails. + */ + "requestEmailSignature"?: StringSettingUpdate; + /** + * Signature creation methods signers may use. + */ + "requiredSignatureTypes"?: RequiredSignatureTypesSettingUpdate; + /** + * Whether completed documents include a digital tamper-proof seal. + */ + "shouldEnableTamperProof"?: BooleanSettingUpdate; + /** + * Whether completed documents remain as separate PDF files instead of being merged into one PDF. + */ + "shouldIncludeDistinctPdfs"?: BooleanSettingUpdate; + /** + * Whether senders can require an access code to verify a signer. + */ + "shouldOfferSignerAccessCode"?: BooleanSettingUpdate; + /** + * Whether senders can require SMS authentication to verify a signer. + */ + "shouldOfferSignerSmsAuthentication"?: BooleanSettingUpdate; + /** + * Whether the Dropbox Sign document ID is hidden on sent documents. + */ + "shouldRemoveDocumentId"?: BooleanSettingUpdate; + /** + * Storage region for team documents. + */ + "dataResidency"?: DataResidencySettingUpdate; + /** + * Whether team members can delete a document for all participants. + */ + "allowTeamDeleteDocumentForEveryone"?: BooleanSettingUpdate; + /** + * Whether team members can download CSV files. + */ + "allowTeamDownloadCsv"?: BooleanSettingUpdate; + /** + * Whether team members are prevented from creating templates. + */ + "lockTeamTemplateCreation"?: BooleanSettingUpdate; + /** + * Whether team members are prevented from using the template gallery. + */ + "lockTeamTemplateGallery"?: BooleanSettingUpdate; + /** + * Default message enforced for team members when they create self-signed documents. + */ + "selfSignMessage"?: StringSettingUpdate; + /** + * Default title enforced for team members when they create self-signed documents. + */ + "selfSignTitle"?: StringSettingUpdate; + /** + * Default message enforced for team members when they create signature requests. + */ + "signatureRequestMessage"?: StringSettingUpdate; + /** + * Default title enforced for team members when they create signature requests. + */ + "signatureRequestTitle"?: StringSettingUpdate; + /** + * Whether authenticator-app multifactor authentication is enabled for the team. + */ + "multifactorAuthApp"?: BooleanSettingUpdate; + /** + * Whether SMS multifactor authentication is enabled for the team. + */ + "multifactorAuthSms"?: BooleanSettingUpdate; + /** + * Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + */ + "unset"?: Set; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "company", + baseName: "company", + type: "StringSettingUpdate", + }, + { + name: "customSigningRedirectEnabled", + baseName: "custom_signing_redirect_enabled", + type: "BooleanSettingUpdate", + }, + { + name: "customSigningRedirectUrl", + baseName: "custom_signing_redirect_url", + type: "StringSettingUpdate", + }, + { + name: "customTagline", + baseName: "custom_tagline", + type: "StringSettingUpdate", + }, + { + name: "dateFormat", + baseName: "date_format", + type: "DateFormatSettingUpdate", + }, + { + name: "isSignatureRemindersEnabled", + baseName: "is_signature_reminders_enabled", + type: "BooleanSettingUpdate", + }, + { + name: "requestEmailFrom", + baseName: "request_email_from", + type: "StringSettingUpdate", + }, + { + name: "requestEmailSignature", + baseName: "request_email_signature", + type: "StringSettingUpdate", + }, + { + name: "requiredSignatureTypes", + baseName: "required_signature_types", + type: "RequiredSignatureTypesSettingUpdate", + }, + { + name: "shouldEnableTamperProof", + baseName: "should_enable_tamper_proof", + type: "BooleanSettingUpdate", + }, + { + name: "shouldIncludeDistinctPdfs", + baseName: "should_include_distinct_pdfs", + type: "BooleanSettingUpdate", + }, + { + name: "shouldOfferSignerAccessCode", + baseName: "should_offer_signer_access_code", + type: "BooleanSettingUpdate", + }, + { + name: "shouldOfferSignerSmsAuthentication", + baseName: "should_offer_signer_sms_authentication", + type: "BooleanSettingUpdate", + }, + { + name: "shouldRemoveDocumentId", + baseName: "should_remove_document_id", + type: "BooleanSettingUpdate", + }, + { + name: "dataResidency", + baseName: "data_residency", + type: "DataResidencySettingUpdate", + }, + { + name: "allowTeamDeleteDocumentForEveryone", + baseName: "allow_team_delete_document_for_everyone", + type: "BooleanSettingUpdate", + }, + { + name: "allowTeamDownloadCsv", + baseName: "allow_team_download_csv", + type: "BooleanSettingUpdate", + }, + { + name: "lockTeamTemplateCreation", + baseName: "lock_team_template_creation", + type: "BooleanSettingUpdate", + }, + { + name: "lockTeamTemplateGallery", + baseName: "lock_team_template_gallery", + type: "BooleanSettingUpdate", + }, + { + name: "selfSignMessage", + baseName: "self_sign_message", + type: "StringSettingUpdate", + }, + { + name: "selfSignTitle", + baseName: "self_sign_title", + type: "StringSettingUpdate", + }, + { + name: "signatureRequestMessage", + baseName: "signature_request_message", + type: "StringSettingUpdate", + }, + { + name: "signatureRequestTitle", + baseName: "signature_request_title", + type: "StringSettingUpdate", + }, + { + name: "multifactorAuthApp", + baseName: "multifactor_auth_app", + type: "BooleanSettingUpdate", + }, + { + name: "multifactorAuthSms", + baseName: "multifactor_auth_sms", + type: "BooleanSettingUpdate", + }, + { + name: "unset", + baseName: "unset", + type: "Set", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return TeamSettingsUpdateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): TeamSettingsUpdateRequest { + return ObjectSerializer.deserialize(data, "TeamSettingsUpdateRequest"); + } +} + +export namespace TeamSettingsUpdateRequest { + export enum UnsetEnum { + Company = "company", + CustomSigningRedirectEnabled = "custom_signing_redirect_enabled", + CustomSigningRedirectUrl = "custom_signing_redirect_url", + CustomTagline = "custom_tagline", + DateFormat = "date_format", + IsSignatureRemindersEnabled = "is_signature_reminders_enabled", + RequestEmailFrom = "request_email_from", + RequestEmailSignature = "request_email_signature", + RequiredSignatureTypes = "required_signature_types", + ShouldEnableTamperProof = "should_enable_tamper_proof", + ShouldIncludeDistinctPdfs = "should_include_distinct_pdfs", + ShouldOfferSignerAccessCode = "should_offer_signer_access_code", + ShouldOfferSignerSmsAuthentication = "should_offer_signer_sms_authentication", + ShouldRemoveDocumentId = "should_remove_document_id", + DataResidency = "data_residency", + AllowTeamDeleteDocumentForEveryone = "allow_team_delete_document_for_everyone", + AllowTeamDownloadCsv = "allow_team_download_csv", + LockTeamTemplateCreation = "lock_team_template_creation", + LockTeamTemplateGallery = "lock_team_template_gallery", + SelfSignMessage = "self_sign_message", + SelfSignTitle = "self_sign_title", + SignatureRequestMessage = "signature_request_message", + SignatureRequestTitle = "signature_request_title", + MultifactorAuthApp = "multifactor_auth_app", + MultifactorAuthSms = "multifactor_auth_sms", + } +} diff --git a/sdks/node/types/api/accountApi.d.ts b/sdks/node/types/api/accountApi.d.ts index 21a0bc1c4..29d5efd2f 100644 --- a/sdks/node/types/api/accountApi.d.ts +++ b/sdks/node/types/api/accountApi.d.ts @@ -1,4 +1,4 @@ -import { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor } from "../model"; +import { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountSettingsResponse, AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor } from "../model"; import { optionsI, returnTypeT } from "./"; export declare enum AccountApiApiKeys { } @@ -26,6 +26,8 @@ export declare class AccountApi { addInterceptor(interceptor: Interceptor): void; accountCreate(accountCreateRequest: AccountCreateRequest, options?: optionsI): Promise>; accountGet(accountId?: string, emailAddress?: string, options?: optionsI): Promise>; + accountSettingsGet(accountId?: string, options?: optionsI): Promise>; + accountSettingsUpdate(accountSettingsUpdateRequest: AccountSettingsUpdateRequest, accountId?: string, options?: optionsI): Promise>; accountUpdate(accountUpdateRequest: AccountUpdateRequest, options?: optionsI): Promise>; accountVerify(accountVerifyRequest: AccountVerifyRequest, options?: optionsI): Promise>; } diff --git a/sdks/node/types/api/teamApi.d.ts b/sdks/node/types/api/teamApi.d.ts index 31b05a503..0c23f237d 100644 --- a/sdks/node/types/api/teamApi.d.ts +++ b/sdks/node/types/api/teamApi.d.ts @@ -1,4 +1,4 @@ -import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInvitesResponse, TeamMembersResponse, TeamRemoveMemberRequest, TeamSubTeamsResponse, TeamUpdateRequest } from "../model"; +import { Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInvitesResponse, TeamMembersResponse, TeamRemoveMemberRequest, TeamSettingsResponse, TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest } from "../model"; import { optionsI, returnTypeI, returnTypeT } from "./"; export declare enum TeamApiApiKeys { } @@ -32,6 +32,8 @@ export declare class TeamApi { teamInvites(emailAddress?: string, options?: optionsI): Promise>; teamMembers(teamId: string, page?: number, pageSize?: number, options?: optionsI): Promise>; teamRemoveMember(teamRemoveMemberRequest: TeamRemoveMemberRequest, options?: optionsI): Promise>; + teamSettingsGet(teamId?: string, options?: optionsI): Promise>; + teamSettingsUpdate(teamSettingsUpdateRequest: TeamSettingsUpdateRequest, teamId?: string, options?: optionsI): Promise>; teamSubTeams(teamId: string, page?: number, pageSize?: number, options?: optionsI): Promise>; teamUpdate(teamUpdateRequest: TeamUpdateRequest, options?: optionsI): Promise>; } diff --git a/sdks/node/types/model/accountSettingsResponse.d.ts b/sdks/node/types/model/accountSettingsResponse.d.ts new file mode 100644 index 000000000..bec03e0ba --- /dev/null +++ b/sdks/node/types/model/accountSettingsResponse.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { AccountSettingsResponseSettings } from "./accountSettingsResponseSettings"; +import { WarningResponse } from "./warningResponse"; +export declare class AccountSettingsResponse { + "accountId": string; + "settings": AccountSettingsResponseSettings; + "warnings"?: Array; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): AccountSettingsResponse; +} diff --git a/sdks/node/types/model/accountSettingsResponseSettings.d.ts b/sdks/node/types/model/accountSettingsResponseSettings.d.ts new file mode 100644 index 000000000..7de2d5564 --- /dev/null +++ b/sdks/node/types/model/accountSettingsResponseSettings.d.ts @@ -0,0 +1,34 @@ +import { AttributeTypeMap } from "./"; +import { SettingResponse } from "./settingResponse"; +export declare class AccountSettingsResponseSettings { + "company": SettingResponse; + "customSigningRedirectEnabled": SettingResponse; + "customSigningRedirectUrl": SettingResponse; + "customTagline": SettingResponse; + "dateFormat": SettingResponse; + "isSignatureRemindersEnabled": SettingResponse; + "requestEmailFrom": SettingResponse; + "requestEmailSignature": SettingResponse; + "requiredSignatureTypes": SettingResponse; + "shouldEnableTamperProof": SettingResponse; + "shouldIncludeDistinctPdfs": SettingResponse; + "shouldOfferSignerAccessCode": SettingResponse; + "shouldOfferSignerSmsAuthentication": SettingResponse; + "shouldRemoveDocumentId": SettingResponse; + "isNotifyOnSignEnabled": SettingResponse; + "isNotifyOnViewEnabled": SettingResponse; + "shouldAutocomplete": SettingResponse; + "shouldIncludeRequestedPdfs": SettingResponse; + "shouldIncludeRequestedPdfsForOthers": SettingResponse; + "shouldIncludeSentDocPdfs": SettingResponse; + "shouldIncludeSentDocPdfsForOthers": SettingResponse; + "shouldSendDailySummary": SettingResponse; + "shouldSendEmbeddedSignatureConfEmails": SettingResponse; + "shouldSendOrderedSrEmail": SettingResponse; + "shouldSendOutboundConfEmails": SettingResponse; + "templateLinkSignatureEmailsEnabled": SettingResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): AccountSettingsResponseSettings; +} diff --git a/sdks/node/types/model/accountSettingsUpdateRequest.d.ts b/sdks/node/types/model/accountSettingsUpdateRequest.d.ts new file mode 100644 index 000000000..b4b4607d7 --- /dev/null +++ b/sdks/node/types/model/accountSettingsUpdateRequest.d.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "./"; +import { DateFormat } from "./dateFormat"; +import { RequiredSignatureType } from "./requiredSignatureType"; +export declare class AccountSettingsUpdateRequest { + "company"?: string; + "customSigningRedirectEnabled"?: boolean; + "customSigningRedirectUrl"?: string; + "customTagline"?: string; + "dateFormat"?: DateFormat; + "isSignatureRemindersEnabled"?: boolean; + "requestEmailFrom"?: string; + "requestEmailSignature"?: string; + "requiredSignatureTypes"?: Set; + "shouldEnableTamperProof"?: boolean; + "shouldIncludeDistinctPdfs"?: boolean; + "shouldOfferSignerAccessCode"?: boolean; + "shouldOfferSignerSmsAuthentication"?: boolean; + "shouldRemoveDocumentId"?: boolean; + "isNotifyOnSignEnabled"?: boolean; + "isNotifyOnViewEnabled"?: boolean; + "shouldAutocomplete"?: boolean; + "shouldIncludeRequestedPdfs"?: boolean; + "shouldIncludeRequestedPdfsForOthers"?: boolean; + "shouldIncludeSentDocPdfs"?: boolean; + "shouldIncludeSentDocPdfsForOthers"?: boolean; + "shouldSendDailySummary"?: boolean; + "shouldSendEmbeddedSignatureConfEmails"?: boolean; + "shouldSendOrderedSrEmail"?: boolean; + "shouldSendOutboundConfEmails"?: boolean; + "templateLinkSignatureEmailsEnabled"?: boolean; + "unset"?: Set; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): AccountSettingsUpdateRequest; +} +export declare namespace AccountSettingsUpdateRequest { + enum UnsetEnum { + Company = "company", + CustomSigningRedirectEnabled = "custom_signing_redirect_enabled", + CustomSigningRedirectUrl = "custom_signing_redirect_url", + CustomTagline = "custom_tagline", + DateFormat = "date_format", + IsSignatureRemindersEnabled = "is_signature_reminders_enabled", + RequestEmailFrom = "request_email_from", + RequestEmailSignature = "request_email_signature", + RequiredSignatureTypes = "required_signature_types", + ShouldEnableTamperProof = "should_enable_tamper_proof", + ShouldIncludeDistinctPdfs = "should_include_distinct_pdfs", + ShouldOfferSignerAccessCode = "should_offer_signer_access_code", + ShouldOfferSignerSmsAuthentication = "should_offer_signer_sms_authentication", + ShouldRemoveDocumentId = "should_remove_document_id", + IsNotifyOnSignEnabled = "is_notify_on_sign_enabled", + IsNotifyOnViewEnabled = "is_notify_on_view_enabled", + ShouldAutocomplete = "should_autocomplete", + ShouldIncludeRequestedPdfs = "should_include_requested_pdfs", + ShouldIncludeRequestedPdfsForOthers = "should_include_requested_pdfs_for_others", + ShouldIncludeSentDocPdfs = "should_include_sent_doc_pdfs", + ShouldIncludeSentDocPdfsForOthers = "should_include_sent_doc_pdfs_for_others", + ShouldSendDailySummary = "should_send_daily_summary", + ShouldSendEmbeddedSignatureConfEmails = "should_send_embedded_signature_conf_emails", + ShouldSendOrderedSrEmail = "should_send_ordered_sr_email", + ShouldSendOutboundConfEmails = "should_send_outbound_conf_emails", + TemplateLinkSignatureEmailsEnabled = "template_link_signature_emails_enabled" + } +} diff --git a/sdks/node/types/model/booleanSettingUpdate.d.ts b/sdks/node/types/model/booleanSettingUpdate.d.ts new file mode 100644 index 000000000..e69b93bbe --- /dev/null +++ b/sdks/node/types/model/booleanSettingUpdate.d.ts @@ -0,0 +1,11 @@ +import { AttributeTypeMap } from "./"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class BooleanSettingUpdate { + "value"?: boolean; + "lockMode"?: TeamSettingLock; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): BooleanSettingUpdate; +} +export declare namespace BooleanSettingUpdate { } diff --git a/sdks/node/types/model/dataResidency.d.ts b/sdks/node/types/model/dataResidency.d.ts new file mode 100644 index 000000000..f3bc813c6 --- /dev/null +++ b/sdks/node/types/model/dataResidency.d.ts @@ -0,0 +1,8 @@ +export declare enum DataResidency { + Us = "us", + Eu = "eu", + Au = "au", + Jp = "jp", + Uk = "uk", + Ca = "ca" +} diff --git a/sdks/node/types/model/dataResidencySettingUpdate.d.ts b/sdks/node/types/model/dataResidencySettingUpdate.d.ts new file mode 100644 index 000000000..c5b27cb56 --- /dev/null +++ b/sdks/node/types/model/dataResidencySettingUpdate.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { DataResidency } from "./dataResidency"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class DataResidencySettingUpdate { + "value"?: DataResidency; + "lockMode"?: TeamSettingLock; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): DataResidencySettingUpdate; +} +export declare namespace DataResidencySettingUpdate { } diff --git a/sdks/node/types/model/dateFormat.d.ts b/sdks/node/types/model/dateFormat.d.ts new file mode 100644 index 000000000..6e91b6d1c --- /dev/null +++ b/sdks/node/types/model/dateFormat.d.ts @@ -0,0 +1,5 @@ +export declare enum DateFormat { + MmDdYyyy = "MM/DD/YYYY", + DdMmYyyy = "DD/MM/YYYY", + YyyyMmDd = "YYYY/MM/DD" +} diff --git a/sdks/node/types/model/dateFormatSettingUpdate.d.ts b/sdks/node/types/model/dateFormatSettingUpdate.d.ts new file mode 100644 index 000000000..3135598ad --- /dev/null +++ b/sdks/node/types/model/dateFormatSettingUpdate.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { DateFormat } from "./dateFormat"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class DateFormatSettingUpdate { + "value"?: DateFormat; + "lockMode"?: TeamSettingLock; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): DateFormatSettingUpdate; +} +export declare namespace DateFormatSettingUpdate { } diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index 9dd11e0b2..2b3ef517e 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -5,6 +5,9 @@ import { AccountResponse } from "./accountResponse"; import { AccountResponseQuotas } from "./accountResponseQuotas"; import { AccountResponseSettings } from "./accountResponseSettings"; import { AccountResponseUsage } from "./accountResponseUsage"; +import { AccountSettingsResponse } from "./accountSettingsResponse"; +import { AccountSettingsResponseSettings } from "./accountSettingsResponseSettings"; +import { AccountSettingsUpdateRequest } from "./accountSettingsUpdateRequest"; import { AccountUpdateRequest } from "./accountUpdateRequest"; import { AccountVerifyRequest } from "./accountVerifyRequest"; import { AccountVerifyResponse } from "./accountVerifyResponse"; @@ -18,11 +21,16 @@ import { ApiAppResponseOptions } from "./apiAppResponseOptions"; import { ApiAppResponseOwnerAccount } from "./apiAppResponseOwnerAccount"; import { ApiAppResponseWhiteLabelingOptions } from "./apiAppResponseWhiteLabelingOptions"; import { ApiAppUpdateRequest } from "./apiAppUpdateRequest"; +import { BooleanSettingUpdate } from "./booleanSettingUpdate"; import { BulkSendJobGetResponse } from "./bulkSendJobGetResponse"; import { BulkSendJobGetResponseSignatureRequests } from "./bulkSendJobGetResponseSignatureRequests"; import { BulkSendJobListResponse } from "./bulkSendJobListResponse"; import { BulkSendJobResponse } from "./bulkSendJobResponse"; import { BulkSendJobSendResponse } from "./bulkSendJobSendResponse"; +import { DataResidency } from "./dataResidency"; +import { DataResidencySettingUpdate } from "./dataResidencySettingUpdate"; +import { DateFormat } from "./dateFormat"; +import { DateFormatSettingUpdate } from "./dateFormatSettingUpdate"; import { DocumentFieldDetectionRequest } from "./documentFieldDetectionRequest"; import { DocumentFieldDetectionResponse } from "./documentFieldDetectionResponse"; import { DocumentFieldDetectionResponseDetectionResult } from "./documentFieldDetectionResponseDetectionResult"; @@ -63,6 +71,10 @@ import { OAuthTokenResponse } from "./oAuthTokenResponse"; import { ReportCreateRequest } from "./reportCreateRequest"; import { ReportCreateResponse } from "./reportCreateResponse"; import { ReportResponse } from "./reportResponse"; +import { RequiredSignatureType } from "./requiredSignatureType"; +import { RequiredSignatureTypesSettingUpdate } from "./requiredSignatureTypesSettingUpdate"; +import { SettingLockResponse } from "./settingLockResponse"; +import { SettingResponse } from "./settingResponse"; import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatureRequestBulkCreateEmbeddedWithTemplateRequest"; import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; @@ -95,6 +107,7 @@ import { SignatureRequestResponseSignatures } from "./signatureRequestResponseSi import { SignatureRequestSendRequest } from "./signatureRequestSendRequest"; import { SignatureRequestSendWithTemplateRequest } from "./signatureRequestSendWithTemplateRequest"; import { SignatureRequestUpdateRequest } from "./signatureRequestUpdateRequest"; +import { StringSettingUpdate } from "./stringSettingUpdate"; import { SubAttachment } from "./subAttachment"; import { SubBulkSignerList } from "./subBulkSignerList"; import { SubBulkSignerListCustomField } from "./subBulkSignerListCustomField"; @@ -143,6 +156,10 @@ import { TeamMembersResponse } from "./teamMembersResponse"; import { TeamParentResponse } from "./teamParentResponse"; import { TeamRemoveMemberRequest } from "./teamRemoveMemberRequest"; import { TeamResponse } from "./teamResponse"; +import { TeamSettingLock } from "./teamSettingLock"; +import { TeamSettingsResponse } from "./teamSettingsResponse"; +import { TeamSettingsResponseSettings } from "./teamSettingsResponseSettings"; +import { TeamSettingsUpdateRequest } from "./teamSettingsUpdateRequest"; import { TeamSubTeamsResponse } from "./teamSubTeamsResponse"; import { TeamUpdateRequest } from "./teamUpdateRequest"; import { TemplateAddUserRequest } from "./templateAddUserRequest"; @@ -201,4 +218,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, DocumentFieldDetectionRequest, DocumentFieldDetectionResponse, DocumentFieldDetectionResponseDetectionResult, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, 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, AccountResponseSettings, AccountResponseUsage, AccountSettingsResponse, AccountSettingsResponseSettings, AccountSettingsUpdateRequest, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BooleanSettingUpdate, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, DataResidency, DataResidencySettingUpdate, DateFormat, DateFormatSettingUpdate, DocumentFieldDetectionRequest, DocumentFieldDetectionResponse, DocumentFieldDetectionResponseDetectionResult, 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, RequiredSignatureType, RequiredSignatureTypesSettingUpdate, SettingLockResponse, SettingResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, StringSettingUpdate, 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, TeamSettingLock, TeamSettingsResponse, TeamSettingsResponseSettings, TeamSettingsUpdateRequest, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, 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/requiredSignatureType.d.ts b/sdks/node/types/model/requiredSignatureType.d.ts new file mode 100644 index 000000000..aaeeb42eb --- /dev/null +++ b/sdks/node/types/model/requiredSignatureType.d.ts @@ -0,0 +1,6 @@ +export declare enum RequiredSignatureType { + Draw = "draw", + Phone = "phone", + Type = "type", + Upload = "upload" +} diff --git a/sdks/node/types/model/requiredSignatureTypesSettingUpdate.d.ts b/sdks/node/types/model/requiredSignatureTypesSettingUpdate.d.ts new file mode 100644 index 000000000..34b00d665 --- /dev/null +++ b/sdks/node/types/model/requiredSignatureTypesSettingUpdate.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { RequiredSignatureType } from "./requiredSignatureType"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class RequiredSignatureTypesSettingUpdate { + "value"?: Set; + "lockMode"?: TeamSettingLock; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): RequiredSignatureTypesSettingUpdate; +} +export declare namespace RequiredSignatureTypesSettingUpdate { } diff --git a/sdks/node/types/model/settingLockResponse.d.ts b/sdks/node/types/model/settingLockResponse.d.ts new file mode 100644 index 000000000..320e4538d --- /dev/null +++ b/sdks/node/types/model/settingLockResponse.d.ts @@ -0,0 +1,17 @@ +import { AttributeTypeMap } from "./"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class SettingLockResponse { + "mode": TeamSettingLock; + "source": SettingLockResponse.SourceEnum; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SettingLockResponse; +} +export declare namespace SettingLockResponse { + enum SourceEnum { + Team = "team", + ParentTeam = "parent_team", + Default = "default" + } +} diff --git a/sdks/node/types/model/settingResponse.d.ts b/sdks/node/types/model/settingResponse.d.ts new file mode 100644 index 000000000..d6f72ebc2 --- /dev/null +++ b/sdks/node/types/model/settingResponse.d.ts @@ -0,0 +1,28 @@ +import { AttributeTypeMap } from "./"; +import { SettingLockResponse } from "./settingLockResponse"; +export declare class SettingResponse { + "value": any | null; + "isInherited": boolean; + "source": SettingResponse.SourceEnum; + "type": SettingResponse.TypeEnum; + "writable": boolean; + "lock": SettingLockResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SettingResponse; +} +export declare namespace SettingResponse { + enum SourceEnum { + Account = "account", + Team = "team", + ParentTeam = "parent_team", + Default = "default" + } + enum TypeEnum { + Boolean = "boolean", + Integer = "integer", + String = "string", + Array = "array" + } +} diff --git a/sdks/node/types/model/stringSettingUpdate.d.ts b/sdks/node/types/model/stringSettingUpdate.d.ts new file mode 100644 index 000000000..93dab25e6 --- /dev/null +++ b/sdks/node/types/model/stringSettingUpdate.d.ts @@ -0,0 +1,11 @@ +import { AttributeTypeMap } from "./"; +import { TeamSettingLock } from "./teamSettingLock"; +export declare class StringSettingUpdate { + "value"?: string; + "lockMode"?: TeamSettingLock; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): StringSettingUpdate; +} +export declare namespace StringSettingUpdate { } diff --git a/sdks/node/types/model/subBulkSignerList.d.ts b/sdks/node/types/model/subBulkSignerList.d.ts index 096e0464f..57556dda9 100644 --- a/sdks/node/types/model/subBulkSignerList.d.ts +++ b/sdks/node/types/model/subBulkSignerList.d.ts @@ -4,6 +4,9 @@ import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplate export declare class SubBulkSignerList { "customFields"?: Array; "signers"?: Array; + "metadata"?: { + [key: string]: any; + }; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/teamCreateRequest.d.ts b/sdks/node/types/model/teamCreateRequest.d.ts index 51c712ac8..ca07d1319 100644 --- a/sdks/node/types/model/teamCreateRequest.d.ts +++ b/sdks/node/types/model/teamCreateRequest.d.ts @@ -1,6 +1,7 @@ import { AttributeTypeMap } from "./"; export declare class TeamCreateRequest { "name"?: string; + "parentTeamId"?: string; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/node/types/model/teamResponse.d.ts b/sdks/node/types/model/teamResponse.d.ts index cb7861bd9..88b33de4b 100644 --- a/sdks/node/types/model/teamResponse.d.ts +++ b/sdks/node/types/model/teamResponse.d.ts @@ -1,6 +1,8 @@ import { AttributeTypeMap } from "./"; import { AccountResponse } from "./accountResponse"; export declare class TeamResponse { + "teamId"?: string; + "parentTeamId"?: string; "name"?: string; "accounts"?: Array; "invitedAccounts"?: Array; diff --git a/sdks/node/types/model/teamSettingLock.d.ts b/sdks/node/types/model/teamSettingLock.d.ts new file mode 100644 index 000000000..58bed31fb --- /dev/null +++ b/sdks/node/types/model/teamSettingLock.d.ts @@ -0,0 +1,5 @@ +export declare enum TeamSettingLock { + OrganizationAdmins = "organization_admins", + TeamAdmins = "team_admins", + Members = "members" +} diff --git a/sdks/node/types/model/teamSettingsResponse.d.ts b/sdks/node/types/model/teamSettingsResponse.d.ts new file mode 100644 index 000000000..a3886dc88 --- /dev/null +++ b/sdks/node/types/model/teamSettingsResponse.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { TeamSettingsResponseSettings } from "./teamSettingsResponseSettings"; +import { WarningResponse } from "./warningResponse"; +export declare class TeamSettingsResponse { + "teamId": string; + "settings": TeamSettingsResponseSettings; + "warnings"?: Array; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): TeamSettingsResponse; +} diff --git a/sdks/node/types/model/teamSettingsResponseSettings.d.ts b/sdks/node/types/model/teamSettingsResponseSettings.d.ts new file mode 100644 index 000000000..d1973ddb8 --- /dev/null +++ b/sdks/node/types/model/teamSettingsResponseSettings.d.ts @@ -0,0 +1,33 @@ +import { AttributeTypeMap } from "./"; +import { SettingResponse } from "./settingResponse"; +export declare class TeamSettingsResponseSettings { + "company": SettingResponse; + "customSigningRedirectEnabled": SettingResponse; + "customSigningRedirectUrl": SettingResponse; + "customTagline": SettingResponse; + "dateFormat": SettingResponse; + "isSignatureRemindersEnabled": SettingResponse; + "requestEmailFrom": SettingResponse; + "requestEmailSignature": SettingResponse; + "requiredSignatureTypes": SettingResponse; + "shouldEnableTamperProof": SettingResponse; + "shouldIncludeDistinctPdfs": SettingResponse; + "shouldOfferSignerAccessCode": SettingResponse; + "shouldOfferSignerSmsAuthentication": SettingResponse; + "shouldRemoveDocumentId": SettingResponse; + "dataResidency": SettingResponse; + "allowTeamDeleteDocumentForEveryone": SettingResponse; + "allowTeamDownloadCsv": SettingResponse; + "lockTeamTemplateCreation": SettingResponse; + "lockTeamTemplateGallery": SettingResponse; + "selfSignMessage": SettingResponse; + "selfSignTitle": SettingResponse; + "signatureRequestMessage": SettingResponse; + "signatureRequestTitle": SettingResponse; + "multifactorAuthApp": SettingResponse; + "multifactorAuthSms": SettingResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): TeamSettingsResponseSettings; +} diff --git a/sdks/node/types/model/teamSettingsUpdateRequest.d.ts b/sdks/node/types/model/teamSettingsUpdateRequest.d.ts new file mode 100644 index 000000000..6f03409c5 --- /dev/null +++ b/sdks/node/types/model/teamSettingsUpdateRequest.d.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "./"; +import { BooleanSettingUpdate } from "./booleanSettingUpdate"; +import { DataResidencySettingUpdate } from "./dataResidencySettingUpdate"; +import { DateFormatSettingUpdate } from "./dateFormatSettingUpdate"; +import { RequiredSignatureTypesSettingUpdate } from "./requiredSignatureTypesSettingUpdate"; +import { StringSettingUpdate } from "./stringSettingUpdate"; +export declare class TeamSettingsUpdateRequest { + "company"?: StringSettingUpdate; + "customSigningRedirectEnabled"?: BooleanSettingUpdate; + "customSigningRedirectUrl"?: StringSettingUpdate; + "customTagline"?: StringSettingUpdate; + "dateFormat"?: DateFormatSettingUpdate; + "isSignatureRemindersEnabled"?: BooleanSettingUpdate; + "requestEmailFrom"?: StringSettingUpdate; + "requestEmailSignature"?: StringSettingUpdate; + "requiredSignatureTypes"?: RequiredSignatureTypesSettingUpdate; + "shouldEnableTamperProof"?: BooleanSettingUpdate; + "shouldIncludeDistinctPdfs"?: BooleanSettingUpdate; + "shouldOfferSignerAccessCode"?: BooleanSettingUpdate; + "shouldOfferSignerSmsAuthentication"?: BooleanSettingUpdate; + "shouldRemoveDocumentId"?: BooleanSettingUpdate; + "dataResidency"?: DataResidencySettingUpdate; + "allowTeamDeleteDocumentForEveryone"?: BooleanSettingUpdate; + "allowTeamDownloadCsv"?: BooleanSettingUpdate; + "lockTeamTemplateCreation"?: BooleanSettingUpdate; + "lockTeamTemplateGallery"?: BooleanSettingUpdate; + "selfSignMessage"?: StringSettingUpdate; + "selfSignTitle"?: StringSettingUpdate; + "signatureRequestMessage"?: StringSettingUpdate; + "signatureRequestTitle"?: StringSettingUpdate; + "multifactorAuthApp"?: BooleanSettingUpdate; + "multifactorAuthSms"?: BooleanSettingUpdate; + "unset"?: Set; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): TeamSettingsUpdateRequest; +} +export declare namespace TeamSettingsUpdateRequest { + enum UnsetEnum { + Company = "company", + CustomSigningRedirectEnabled = "custom_signing_redirect_enabled", + CustomSigningRedirectUrl = "custom_signing_redirect_url", + CustomTagline = "custom_tagline", + DateFormat = "date_format", + IsSignatureRemindersEnabled = "is_signature_reminders_enabled", + RequestEmailFrom = "request_email_from", + RequestEmailSignature = "request_email_signature", + RequiredSignatureTypes = "required_signature_types", + ShouldEnableTamperProof = "should_enable_tamper_proof", + ShouldIncludeDistinctPdfs = "should_include_distinct_pdfs", + ShouldOfferSignerAccessCode = "should_offer_signer_access_code", + ShouldOfferSignerSmsAuthentication = "should_offer_signer_sms_authentication", + ShouldRemoveDocumentId = "should_remove_document_id", + DataResidency = "data_residency", + AllowTeamDeleteDocumentForEveryone = "allow_team_delete_document_for_everyone", + AllowTeamDownloadCsv = "allow_team_download_csv", + LockTeamTemplateCreation = "lock_team_template_creation", + LockTeamTemplateGallery = "lock_team_template_gallery", + SelfSignMessage = "self_sign_message", + SelfSignTitle = "self_sign_title", + SignatureRequestMessage = "signature_request_message", + SignatureRequestTitle = "signature_request_title", + MultifactorAuthApp = "multifactor_auth_app", + MultifactorAuthSms = "multifactor_auth_sms" + } +} diff --git a/sdks/php/README.md b/sdks/php/README.md index 57e6ab2f0..98f8afeb9 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -149,6 +149,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | ---------- | ------------- | ------------- | ------------- | | *AccountApi* | [**accountCreate**](docs/Api/AccountApi.md#accountcreate) | **POST** /account/create | Create Account | | *AccountApi* | [**accountGet**](docs/Api/AccountApi.md#accountget) | **GET** /account | Get Account | +| *AccountApi* | [**accountSettingsGet**](docs/Api/AccountApi.md#accountsettingsget) | **GET** /account/settings | Get account settings | +| *AccountApi* | [**accountSettingsUpdate**](docs/Api/AccountApi.md#accountsettingsupdate) | **POST** /account/settings | Modify account settings | | *AccountApi* | [**accountUpdate**](docs/Api/AccountApi.md#accountupdate) | **PUT** /account | Update Account | | *AccountApi* | [**accountVerify**](docs/Api/AccountApi.md#accountverify) | **POST** /account/verify | Verify Account | | *ApiAppApi* | [**apiAppCreate**](docs/Api/ApiAppApi.md#apiappcreate) | **POST** /api_app | Create API App | @@ -204,6 +206,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TeamApi* | [**teamInvites**](docs/Api/TeamApi.md#teaminvites) | **GET** /team/invites | List Team Invites | | *TeamApi* | [**teamMembers**](docs/Api/TeamApi.md#teammembers) | **GET** /team/members/{team_id} | List Team Members | | *TeamApi* | [**teamRemoveMember**](docs/Api/TeamApi.md#teamremovemember) | **POST** /team/remove_member | Remove User from Team | +| *TeamApi* | [**teamSettingsGet**](docs/Api/TeamApi.md#teamsettingsget) | **GET** /team/settings | Get team settings | +| *TeamApi* | [**teamSettingsUpdate**](docs/Api/TeamApi.md#teamsettingsupdate) | **POST** /team/settings | Modify team settings | | *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 | @@ -232,6 +236,9 @@ All URIs are relative to *https://api.hellosign.com/v3* - [AccountResponseQuotas](docs/Model/AccountResponseQuotas.md) - [AccountResponseSettings](docs/Model/AccountResponseSettings.md) - [AccountResponseUsage](docs/Model/AccountResponseUsage.md) +- [AccountSettingsResponse](docs/Model/AccountSettingsResponse.md) +- [AccountSettingsResponseSettings](docs/Model/AccountSettingsResponseSettings.md) +- [AccountSettingsUpdateRequest](docs/Model/AccountSettingsUpdateRequest.md) - [AccountUpdateRequest](docs/Model/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/Model/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/Model/AccountVerifyResponse.md) @@ -245,11 +252,16 @@ All URIs are relative to *https://api.hellosign.com/v3* - [ApiAppResponseOwnerAccount](docs/Model/ApiAppResponseOwnerAccount.md) - [ApiAppResponseWhiteLabelingOptions](docs/Model/ApiAppResponseWhiteLabelingOptions.md) - [ApiAppUpdateRequest](docs/Model/ApiAppUpdateRequest.md) +- [BooleanSettingUpdate](docs/Model/BooleanSettingUpdate.md) - [BulkSendJobGetResponse](docs/Model/BulkSendJobGetResponse.md) - [BulkSendJobGetResponseSignatureRequests](docs/Model/BulkSendJobGetResponseSignatureRequests.md) - [BulkSendJobListResponse](docs/Model/BulkSendJobListResponse.md) - [BulkSendJobResponse](docs/Model/BulkSendJobResponse.md) - [BulkSendJobSendResponse](docs/Model/BulkSendJobSendResponse.md) +- [DataResidency](docs/Model/DataResidency.md) +- [DataResidencySettingUpdate](docs/Model/DataResidencySettingUpdate.md) +- [DateFormat](docs/Model/DateFormat.md) +- [DateFormatSettingUpdate](docs/Model/DateFormatSettingUpdate.md) - [DocumentFieldDetectionRequest](docs/Model/DocumentFieldDetectionRequest.md) - [DocumentFieldDetectionResponse](docs/Model/DocumentFieldDetectionResponse.md) - [DocumentFieldDetectionResponseDetectionResult](docs/Model/DocumentFieldDetectionResponseDetectionResult.md) @@ -288,6 +300,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [ReportCreateRequest](docs/Model/ReportCreateRequest.md) - [ReportCreateResponse](docs/Model/ReportCreateResponse.md) - [ReportResponse](docs/Model/ReportResponse.md) +- [RequiredSignatureType](docs/Model/RequiredSignatureType.md) +- [RequiredSignatureTypesSettingUpdate](docs/Model/RequiredSignatureTypesSettingUpdate.md) +- [SettingLockResponse](docs/Model/SettingLockResponse.md) +- [SettingResponse](docs/Model/SettingResponse.md) - [SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [SignatureRequestBulkSendWithTemplateRequest](docs/Model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/Model/SignatureRequestCreateEmbeddedRequest.md) @@ -320,6 +336,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestSendRequest](docs/Model/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/Model/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/Model/SignatureRequestUpdateRequest.md) +- [StringSettingUpdate](docs/Model/StringSettingUpdate.md) - [SubAttachment](docs/Model/SubAttachment.md) - [SubBulkSignerList](docs/Model/SubBulkSignerList.md) - [SubBulkSignerListCustomField](docs/Model/SubBulkSignerListCustomField.md) @@ -368,6 +385,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [TeamParentResponse](docs/Model/TeamParentResponse.md) - [TeamRemoveMemberRequest](docs/Model/TeamRemoveMemberRequest.md) - [TeamResponse](docs/Model/TeamResponse.md) +- [TeamSettingLock](docs/Model/TeamSettingLock.md) +- [TeamSettingsResponse](docs/Model/TeamSettingsResponse.md) +- [TeamSettingsResponseSettings](docs/Model/TeamSettingsResponseSettings.md) +- [TeamSettingsUpdateRequest](docs/Model/TeamSettingsUpdateRequest.md) - [TeamSubTeamsResponse](docs/Model/TeamSubTeamsResponse.md) - [TeamUpdateRequest](docs/Model/TeamUpdateRequest.md) - [TemplateAddUserRequest](docs/Model/TemplateAddUserRequest.md) diff --git a/sdks/php/bin/copy-constants.php b/sdks/php/bin/copy-constants.php index f71f52441..2414b3dac 100755 --- a/sdks/php/bin/copy-constants.php +++ b/sdks/php/bin/copy-constants.php @@ -32,32 +32,32 @@ public function run(): void $file = __DIR__ . '/../src/Model/SubFormFieldRuleAction.php'; $contents = file_get_contents($file); - $constant_1 = " public const TYPE_CHANGE_FIELD_VISIBILITY = 'change-field-visibility';"; - $replace_1 = implode("\n", [ - $constant_1, - ' public const TYPE_FIELD_VISIBILITY = self::TYPE_CHANGE_FIELD_VISIBILITY;', - ]); - - $constant_2 = " public const TYPE_CHANGE_GROUP_VISIBILITY = 'change-group-visibility';"; - $replace_2 = implode("\n", [ - $constant_2, - ' public const TYPE_GROUP_VISIBILITY = self::TYPE_CHANGE_GROUP_VISIBILITY;', - ]); - - $contents = str_replace( - $constant_1, - $replace_1, + $contents = $this->addAlias( $contents, + " public const TYPE_CHANGE_FIELD_VISIBILITY = 'change-field-visibility';", + ' public const TYPE_FIELD_VISIBILITY = self::TYPE_CHANGE_FIELD_VISIBILITY;', ); - - $contents = str_replace( - $constant_2, - $replace_2, + $contents = $this->addAlias( $contents, + " public const TYPE_CHANGE_GROUP_VISIBILITY = 'change-group-visibility';", + ' public const TYPE_GROUP_VISIBILITY = self::TYPE_CHANGE_GROUP_VISIBILITY;', ); file_put_contents($file, $contents); } + + /** + * Generator output only has the new constant names. Running this after + * those aliases already exist must leave the file unchanged. + */ + private function addAlias(string $contents, string $canonical, string $alias): string + { + if (str_contains($contents, $alias) || !str_contains($contents, $canonical)) { + return $contents; + } + + return str_replace($canonical, $canonical . "\n" . $alias, $contents); + } } $copier = new CopyConstants(); diff --git a/sdks/php/docs/Api/AccountApi.md b/sdks/php/docs/Api/AccountApi.md index 6d0f700ef..598ecd614 100644 --- a/sdks/php/docs/Api/AccountApi.md +++ b/sdks/php/docs/Api/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to https://api.hellosign.com/v3. | ------------- | ------------- | ------------- | | [**accountCreate()**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account | | [**accountGet()**](AccountApi.md#accountGet) | **GET** /account | Get Account | +| [**accountSettingsGet()**](AccountApi.md#accountSettingsGet) | **GET** /account/settings | Get account settings | +| [**accountSettingsUpdate()**](AccountApi.md#accountSettingsUpdate) | **POST** /account/settings | Modify account settings | | [**accountUpdate()**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account | | [**accountVerify()**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account | @@ -132,6 +134,148 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `accountSettingsGet()` + +```php +accountSettingsGet($account_id): \Dropbox\Sign\Model\AccountSettingsResponse +``` +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```php +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsGet(); + $company = $response->getSettings()->getCompany(); + + print_r($response); + print_r([ + 'account_id' => $response->getAccountId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsGet: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\AccountSettingsResponse**](../Model/AccountSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### 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) + +## `accountSettingsUpdate()` + +```php +accountSettingsUpdate($account_settings_update_request, $account_id): \Dropbox\Sign\Model\AccountSettingsResponse +``` +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +```php +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$account_settings_update_request = (new Dropbox\Sign\Model\AccountSettingsUpdateRequest()) + ->setDateFormat(Dropbox\Sign\Model\DateFormat::MM_DD_YYYY) + ->setRequiredSignatureTypes([ + Dropbox\Sign\Model\RequiredSignatureType::DRAW, + Dropbox\Sign\Model\RequiredSignatureType::TYPE, + ]) + ->setShouldEnableTamperProof(false) + ->setUnset(['company']); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountSettingsUpdate( + account_settings_update_request: $account_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountSettingsUpdate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_settings_update_request** | [**\Dropbox\Sign\Model\AccountSettingsUpdateRequest**](../Model/AccountSettingsUpdateRequest.md)| | | +| **account_id** | **string**| Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\AccountSettingsResponse**](../Model/AccountSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **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) + ## `accountUpdate()` ```php diff --git a/sdks/php/docs/Api/TeamApi.md b/sdks/php/docs/Api/TeamApi.md index 059036e13..205c71535 100644 --- a/sdks/php/docs/Api/TeamApi.md +++ b/sdks/php/docs/Api/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to https://api.hellosign.com/v3. | [**teamInvites()**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites | | [**teamMembers()**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members | | [**teamRemoveMember()**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team | +| [**teamSettingsGet()**](TeamApi.md#teamSettingsGet) | **GET** /team/settings | Get team settings | +| [**teamSettingsUpdate()**](TeamApi.md#teamSettingsUpdate) | **POST** /team/settings | Modify team settings | | [**teamSubTeams()**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | | [**teamUpdate()**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team | @@ -500,6 +502,158 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `teamSettingsGet()` + +```php +teamSettingsGet($team_id): \Dropbox\Sign\Model\TeamSettingsResponse +``` +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```php +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsGet(); + $company = $response->getSettings()->getCompany(); + $data_residency = $response->getSettings()->getDataResidency(); + + print_r($response); + print_r([ + 'team_id' => $response->getTeamId(), + 'company' => [ + 'value' => $company->getValue(), + 'is_inherited' => $company->getIsInherited(), + 'source' => $company->getSource(), + 'type' => $company->getType(), + 'writable' => $company->getWritable(), + 'lock' => [ + 'mode' => $company->getLock()->getMode(), + 'source' => $company->getLock()->getSource(), + ], + ], + 'data_residency' => [ + 'value' => $data_residency->getValue(), + 'is_inherited' => $data_residency->getIsInherited(), + 'source' => $data_residency->getSource(), + 'type' => $data_residency->getType(), + 'writable' => $data_residency->getWritable(), + 'lock' => [ + 'mode' => $data_residency->getLock()->getMode(), + 'source' => $data_residency->getLock()->getSource(), + ], + ], + 'warnings' => $response->getWarnings(), + ]); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsGet: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **team_id** | **string**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\TeamSettingsResponse**](../Model/TeamSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### 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) + +## `teamSettingsUpdate()` + +```php +teamSettingsUpdate($team_settings_update_request, $team_id): \Dropbox\Sign\Model\TeamSettingsResponse +``` +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +```php +setUsername('YOUR_API_KEY'); +// $config->setAccessToken('YOUR_ACCESS_TOKEN'); + +$team_settings_update_request = (new Dropbox\Sign\Model\TeamSettingsUpdateRequest()) + ->setDataResidency((new Dropbox\Sign\Model\DataResidencySettingUpdate()) + ->setValue(Dropbox\Sign\Model\DataResidency::EU)) + ->setCompany((new Dropbox\Sign\Model\StringSettingUpdate()) + ->setValue('Northwind') + ->setLockMode(Dropbox\Sign\Model\TeamSettingLock::ORGANIZATION_ADMINS)); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSettingsUpdate( + team_settings_update_request: $team_settings_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSettingsUpdate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **team_settings_update_request** | [**\Dropbox\Sign\Model\TeamSettingsUpdateRequest**](../Model/TeamSettingsUpdateRequest.md)| | | +| **team_id** | **string**| Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\TeamSettingsResponse**](../Model/TeamSettingsResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **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) + ## `teamSubTeams()` ```php diff --git a/sdks/php/docs/Model/AccountSettingsResponse.md b/sdks/php/docs/Model/AccountSettingsResponse.md new file mode 100644 index 000000000..1f907c4c6 --- /dev/null +++ b/sdks/php/docs/Model/AccountSettingsResponse.md @@ -0,0 +1,13 @@ +# # AccountSettingsResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `account_id`*_required_ | ```string``` | | | +| `settings`*_required_ | [```\Dropbox\Sign\Model\AccountSettingsResponseSettings```](AccountSettingsResponseSettings.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/AccountSettingsResponseSettings.md b/sdks/php/docs/Model/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..a4bd4cceb --- /dev/null +++ b/sdks/php/docs/Model/AccountSettingsResponseSettings.md @@ -0,0 +1,36 @@ +# # AccountSettingsResponseSettings + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + +[[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/AccountSettingsUpdateRequest.md b/sdks/php/docs/Model/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..492c5b244 --- /dev/null +++ b/sdks/php/docs/Model/AccountSettingsUpdateRequest.md @@ -0,0 +1,37 @@ +# # AccountSettingsUpdateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | ```string``` | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | ```bool``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | ```string``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | ```string``` | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```\Dropbox\Sign\Model\DateFormat```](DateFormat.md) | | | +| `is_signature_reminders_enabled` | ```bool``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | ```string``` | Sender name shown on signature request emails. | | +| `request_email_signature` | ```string``` | Signature appended to signature request emails. | | +| `required_signature_types` | [```\Dropbox\Sign\Model\RequiredSignatureType[]```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | ```bool``` | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | ```bool``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | ```bool``` | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | ```bool``` | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | ```bool``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled` | ```bool``` | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled` | ```bool``` | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete` | ```bool``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs` | ```bool``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others` | ```bool``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs` | ```bool``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others` | ```bool``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary` | ```bool``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails` | ```bool``` | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email` | ```bool``` | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails` | ```bool``` | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled` | ```bool``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | ```string[]``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[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/BooleanSettingUpdate.md b/sdks/php/docs/Model/BooleanSettingUpdate.md new file mode 100644 index 000000000..d154836c3 --- /dev/null +++ b/sdks/php/docs/Model/BooleanSettingUpdate.md @@ -0,0 +1,12 @@ +# # BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```bool``` | Boolean value to store. | | +| `lock_mode` | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.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/DataResidency.md b/sdks/php/docs/Model/DataResidency.md new file mode 100644 index 000000000..1be0f2b8f --- /dev/null +++ b/sdks/php/docs/Model/DataResidency.md @@ -0,0 +1,10 @@ +# # DataResidency + +Storage region for team documents. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/DataResidencySettingUpdate.md b/sdks/php/docs/Model/DataResidencySettingUpdate.md new file mode 100644 index 000000000..fa5777e36 --- /dev/null +++ b/sdks/php/docs/Model/DataResidencySettingUpdate.md @@ -0,0 +1,12 @@ +# # DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```\Dropbox\Sign\Model\DataResidency```](DataResidency.md) | | | +| `lock_mode` | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.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/DateFormat.md b/sdks/php/docs/Model/DateFormat.md new file mode 100644 index 000000000..19d3b236c --- /dev/null +++ b/sdks/php/docs/Model/DateFormat.md @@ -0,0 +1,10 @@ +# # DateFormat + +Date format used to display dates. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/DateFormatSettingUpdate.md b/sdks/php/docs/Model/DateFormatSettingUpdate.md new file mode 100644 index 000000000..ba22fc551 --- /dev/null +++ b/sdks/php/docs/Model/DateFormatSettingUpdate.md @@ -0,0 +1,12 @@ +# # DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```\Dropbox\Sign\Model\DateFormat```](DateFormat.md) | | | +| `lock_mode` | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.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/RequiredSignatureType.md b/sdks/php/docs/Model/RequiredSignatureType.md new file mode 100644 index 000000000..3906cb58e --- /dev/null +++ b/sdks/php/docs/Model/RequiredSignatureType.md @@ -0,0 +1,10 @@ +# # RequiredSignatureType + +A signature creation method a signer may use. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/RequiredSignatureTypesSettingUpdate.md b/sdks/php/docs/Model/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..2a23eba60 --- /dev/null +++ b/sdks/php/docs/Model/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,12 @@ +# # RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```\Dropbox\Sign\Model\RequiredSignatureType[]```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `lock_mode` | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.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/SettingLockResponse.md b/sdks/php/docs/Model/SettingLockResponse.md new file mode 100644 index 000000000..14e0c427e --- /dev/null +++ b/sdks/php/docs/Model/SettingLockResponse.md @@ -0,0 +1,12 @@ +# # SettingLockResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `mode`*_required_ | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.md) | | | +| `source`*_required_ | ```string``` | | | + +[[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/SettingResponse.md b/sdks/php/docs/Model/SettingResponse.md new file mode 100644 index 000000000..834c0b9e6 --- /dev/null +++ b/sdks/php/docs/Model/SettingResponse.md @@ -0,0 +1,16 @@ +# # SettingResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value`*_required_ | ```mixed``` | Current value of the setting. Null when the setting has no value. | | +| `is_inherited`*_required_ | ```bool``` | | | +| `source`*_required_ | ```string``` | | | +| `type`*_required_ | ```string``` | | | +| `writable`*_required_ | ```bool``` | | | +| `lock`*_required_ | [```\Dropbox\Sign\Model\SettingLockResponse```](SettingLockResponse.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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 73430a885..257cabf7e 100644 --- a/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes | `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | 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. | | | `message` | ```string``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```array``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```string``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md index 99c568f22..86f9f7a07 100644 --- a/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/php/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes | `client_id` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```string``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```array``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```string``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/php/docs/Model/StringSettingUpdate.md b/sdks/php/docs/Model/StringSettingUpdate.md new file mode 100644 index 000000000..77d67d569 --- /dev/null +++ b/sdks/php/docs/Model/StringSettingUpdate.md @@ -0,0 +1,12 @@ +# # StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```string``` | String value to store. | | +| `lock_mode` | [```\Dropbox\Sign\Model\TeamSettingLock```](TeamSettingLock.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/SubBulkSignerList.md b/sdks/php/docs/Model/SubBulkSignerList.md index 9842742e5..1a9c4f8f0 100644 --- a/sdks/php/docs/Model/SubBulkSignerList.md +++ b/sdks/php/docs/Model/SubBulkSignerList.md @@ -8,5 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `custom_fields` | [```\Dropbox\Sign\Model\SubBulkSignerListCustomField[]```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```array``` | _t__Sub::BulkSigner::METADATA | | [[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/TeamCreateRequest.md b/sdks/php/docs/Model/TeamCreateRequest.md index 29c05f9a3..d2f59d5b8 100644 --- a/sdks/php/docs/Model/TeamCreateRequest.md +++ b/sdks/php/docs/Model/TeamCreateRequest.md @@ -7,5 +7,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `name` | ```string``` | The name of your Team. | [default to 'Untitled Team'] | +| `parent_team_id` | ```string``` | _t__TeamCreate::PARENT_TEAM_ID | | [[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/TeamResponse.md b/sdks/php/docs/Model/TeamResponse.md index 4aea582c9..124a2cedd 100644 --- a/sdks/php/docs/Model/TeamResponse.md +++ b/sdks/php/docs/Model/TeamResponse.md @@ -6,6 +6,8 @@ Contains information about your team and its members Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +| `team_id` | ```string``` | The id of a team | | +| `parent_team_id` | ```string``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```string``` | The name of your Team | | | `accounts` | [```\Dropbox\Sign\Model\AccountResponse[]```](AccountResponse.md) | | | | `invited_accounts` | [```\Dropbox\Sign\Model\AccountResponse[]```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/php/docs/Model/TeamSettingLock.md b/sdks/php/docs/Model/TeamSettingLock.md new file mode 100644 index 000000000..8a534c75d --- /dev/null +++ b/sdks/php/docs/Model/TeamSettingLock.md @@ -0,0 +1,10 @@ +# # TeamSettingLock + +Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/TeamSettingsResponse.md b/sdks/php/docs/Model/TeamSettingsResponse.md new file mode 100644 index 000000000..b10f04aac --- /dev/null +++ b/sdks/php/docs/Model/TeamSettingsResponse.md @@ -0,0 +1,13 @@ +# # TeamSettingsResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `team_id`*_required_ | ```string``` | | | +| `settings`*_required_ | [```\Dropbox\Sign\Model\TeamSettingsResponseSettings```](TeamSettingsResponseSettings.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/TeamSettingsResponseSettings.md b/sdks/php/docs/Model/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..31c0f2986 --- /dev/null +++ b/sdks/php/docs/Model/TeamSettingsResponseSettings.md @@ -0,0 +1,35 @@ +# # TeamSettingsResponseSettings + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms`*_required_ | [```\Dropbox\Sign\Model\SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + +[[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/TeamSettingsUpdateRequest.md b/sdks/php/docs/Model/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..f08e16c4e --- /dev/null +++ b/sdks/php/docs/Model/TeamSettingsUpdateRequest.md @@ -0,0 +1,36 @@ +# # TeamSettingsUpdateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```\Dropbox\Sign\Model\DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `request_email_signature` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `required_signature_types` | [```\Dropbox\Sign\Model\RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency` | [```\Dropbox\Sign\Model\DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title` | [```\Dropbox\Sign\Model\StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms` | [```\Dropbox\Sign\Model\BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | ```string[]``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/src/Api/AccountApi.php b/sdks/php/src/Api/AccountApi.php index 81a201bd4..728a405d6 100644 --- a/sdks/php/src/Api/AccountApi.php +++ b/sdks/php/src/Api/AccountApi.php @@ -73,6 +73,12 @@ class AccountApi 'accountGet' => [ 'application/json', ], + 'accountSettingsGet' => [ + 'application/json', + ], + 'accountSettingsUpdate' => [ + 'application/json', + ], 'accountUpdate' => [ 'application/json', ], @@ -832,6 +838,701 @@ public function accountGetRequest(?string $account_id = null, ?string $email_add ); } + /** + * Operation accountSettingsGet + * + * Get account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsGetExample.php + * + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * + * @return Model\AccountSettingsResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function accountSettingsGet(?string $account_id = null) + { + list($response) = $this->accountSettingsGetWithHttpInfo($account_id); + return $response; + } + + /** + * Operation accountSettingsGetWithHttpInfo + * + * Get account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsGetExample.php + * + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsGet'] to see the possible values for this operation + * + * @return array of Model\AccountSettingsResponse, 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 ::accountSettingsGet. This method will eventually become unavailable + */ + public function accountSettingsGetWithHttpInfo(?string $account_id = null, string $contentType = self::contentTypes['accountSettingsGet'][0]) + { + $request = $this->accountSettingsGetRequest($account_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(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\AccountSettingsResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\AccountSettingsResponse' !== '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\AccountSettingsResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\AccountSettingsResponse'; + 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\AccountSettingsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation accountSettingsGetAsync + * + * Get account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsGetExample.php + * + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsGet. This method will eventually become unavailable + */ + public function accountSettingsGetAsync(?string $account_id = null, string $contentType = self::contentTypes['accountSettingsGet'][0]) + { + return $this->accountSettingsGetAsyncWithHttpInfo($account_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation accountSettingsGetAsyncWithHttpInfo + * + * Get account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsGetExample.php + * + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsGet. This method will eventually become unavailable + */ + public function accountSettingsGetAsyncWithHttpInfo(?string $account_id = null, string $contentType = self::contentTypes['accountSettingsGet'][0]) + { + $returnType = '\Dropbox\Sign\Model\AccountSettingsResponse'; + $request = $this->accountSettingsGetRequest($account_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 'accountSettingsGet' + * + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsGet'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsGet. This method will eventually become unavailable + */ + public function accountSettingsGetRequest(?string $account_id = null, string $contentType = self::contentTypes['accountSettingsGet'][0]) + { + $resourcePath = '/account/settings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $account_id, + 'account_id', // param base name + 'string', // 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() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation accountSettingsUpdate + * + * Modify account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsUpdateExample.php + * + * @param Model\AccountSettingsUpdateRequest $account_settings_update_request account_settings_update_request (required) + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * + * @return Model\AccountSettingsResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function accountSettingsUpdate(Model\AccountSettingsUpdateRequest $account_settings_update_request, ?string $account_id = null) + { + list($response) = $this->accountSettingsUpdateWithHttpInfo($account_settings_update_request, $account_id); + return $response; + } + + /** + * Operation accountSettingsUpdateWithHttpInfo + * + * Modify account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsUpdateExample.php + * + * @param Model\AccountSettingsUpdateRequest $account_settings_update_request (required) + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsUpdate'] to see the possible values for this operation + * + * @return array of Model\AccountSettingsResponse, 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 ::accountSettingsUpdate. This method will eventually become unavailable + */ + public function accountSettingsUpdateWithHttpInfo(Model\AccountSettingsUpdateRequest $account_settings_update_request, ?string $account_id = null, string $contentType = self::contentTypes['accountSettingsUpdate'][0]) + { + $request = $this->accountSettingsUpdateRequest($account_settings_update_request, $account_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(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\AccountSettingsResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\AccountSettingsResponse' !== '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\AccountSettingsResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\AccountSettingsResponse'; + 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\AccountSettingsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation accountSettingsUpdateAsync + * + * Modify account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsUpdateExample.php + * + * @param Model\AccountSettingsUpdateRequest $account_settings_update_request (required) + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsUpdate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsUpdate. This method will eventually become unavailable + */ + public function accountSettingsUpdateAsync(Model\AccountSettingsUpdateRequest $account_settings_update_request, ?string $account_id = null, string $contentType = self::contentTypes['accountSettingsUpdate'][0]) + { + return $this->accountSettingsUpdateAsyncWithHttpInfo($account_settings_update_request, $account_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation accountSettingsUpdateAsyncWithHttpInfo + * + * Modify account settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/AccountSettingsUpdateExample.php + * + * @param Model\AccountSettingsUpdateRequest $account_settings_update_request (required) + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsUpdate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsUpdate. This method will eventually become unavailable + */ + public function accountSettingsUpdateAsyncWithHttpInfo(Model\AccountSettingsUpdateRequest $account_settings_update_request, ?string $account_id = null, string $contentType = self::contentTypes['accountSettingsUpdate'][0]) + { + $returnType = '\Dropbox\Sign\Model\AccountSettingsResponse'; + $request = $this->accountSettingsUpdateRequest($account_settings_update_request, $account_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 'accountSettingsUpdate' + * + * @param Model\AccountSettingsUpdateRequest $account_settings_update_request (required) + * @param string|null $account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountSettingsUpdate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::accountSettingsUpdate. This method will eventually become unavailable + */ + public function accountSettingsUpdateRequest(Model\AccountSettingsUpdateRequest $account_settings_update_request, ?string $account_id = null, string $contentType = self::contentTypes['accountSettingsUpdate'][0]) + { + // verify the required parameter 'account_settings_update_request' is set + if ($account_settings_update_request === null || (is_array($account_settings_update_request) && count($account_settings_update_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_settings_update_request when calling accountSettingsUpdate' + ); + } + + $resourcePath = '/account/settings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $account_settings_update_request + ); + + $multipart = !empty($formParams); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $account_id, + 'account_id', // param base name + 'string', // 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 (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($account_settings_update_request)); + } else { + $httpBody = $account_settings_update_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, $account_settings_update_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation accountUpdate * diff --git a/sdks/php/src/Api/TeamApi.php b/sdks/php/src/Api/TeamApi.php index 93652aeb9..60a697644 100644 --- a/sdks/php/src/Api/TeamApi.php +++ b/sdks/php/src/Api/TeamApi.php @@ -91,6 +91,12 @@ class TeamApi 'teamRemoveMember' => [ 'application/json', ], + 'teamSettingsGet' => [ + 'application/json', + ], + 'teamSettingsUpdate' => [ + 'application/json', + ], 'teamSubTeams' => [ 'application/json', ], @@ -2789,6 +2795,701 @@ public function teamRemoveMemberRequest(Model\TeamRemoveMemberRequest $team_remo ); } + /** + * Operation teamSettingsGet + * + * Get team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsGetExample.php + * + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * + * @return Model\TeamSettingsResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function teamSettingsGet(?string $team_id = null) + { + list($response) = $this->teamSettingsGetWithHttpInfo($team_id); + return $response; + } + + /** + * Operation teamSettingsGetWithHttpInfo + * + * Get team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsGetExample.php + * + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsGet'] to see the possible values for this operation + * + * @return array of Model\TeamSettingsResponse, 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 ::teamSettingsGet. This method will eventually become unavailable + */ + public function teamSettingsGetWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamSettingsGet'][0]) + { + $request = $this->teamSettingsGetRequest($team_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(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\TeamSettingsResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\TeamSettingsResponse' !== '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\TeamSettingsResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\TeamSettingsResponse'; + 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\TeamSettingsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation teamSettingsGetAsync + * + * Get team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsGetExample.php + * + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsGet. This method will eventually become unavailable + */ + public function teamSettingsGetAsync(?string $team_id = null, string $contentType = self::contentTypes['teamSettingsGet'][0]) + { + return $this->teamSettingsGetAsyncWithHttpInfo($team_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation teamSettingsGetAsyncWithHttpInfo + * + * Get team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsGetExample.php + * + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsGet'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsGet. This method will eventually become unavailable + */ + public function teamSettingsGetAsyncWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamSettingsGet'][0]) + { + $returnType = '\Dropbox\Sign\Model\TeamSettingsResponse'; + $request = $this->teamSettingsGetRequest($team_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 'teamSettingsGet' + * + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsGet'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsGet. This method will eventually become unavailable + */ + public function teamSettingsGetRequest(?string $team_id = null, string $contentType = self::contentTypes['teamSettingsGet'][0]) + { + $resourcePath = '/team/settings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $team_id, + 'team_id', // param base name + 'string', // 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() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation teamSettingsUpdate + * + * Modify team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsUpdateExample.php + * + * @param Model\TeamSettingsUpdateRequest $team_settings_update_request team_settings_update_request (required) + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * + * @return Model\TeamSettingsResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function teamSettingsUpdate(Model\TeamSettingsUpdateRequest $team_settings_update_request, ?string $team_id = null) + { + list($response) = $this->teamSettingsUpdateWithHttpInfo($team_settings_update_request, $team_id); + return $response; + } + + /** + * Operation teamSettingsUpdateWithHttpInfo + * + * Modify team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsUpdateExample.php + * + * @param Model\TeamSettingsUpdateRequest $team_settings_update_request (required) + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsUpdate'] to see the possible values for this operation + * + * @return array of Model\TeamSettingsResponse, 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 ::teamSettingsUpdate. This method will eventually become unavailable + */ + public function teamSettingsUpdateWithHttpInfo(Model\TeamSettingsUpdateRequest $team_settings_update_request, ?string $team_id = null, string $contentType = self::contentTypes['teamSettingsUpdate'][0]) + { + $request = $this->teamSettingsUpdateRequest($team_settings_update_request, $team_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(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\TeamSettingsResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\TeamSettingsResponse' !== '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\TeamSettingsResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\TeamSettingsResponse'; + 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\TeamSettingsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation teamSettingsUpdateAsync + * + * Modify team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsUpdateExample.php + * + * @param Model\TeamSettingsUpdateRequest $team_settings_update_request (required) + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsUpdate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsUpdate. This method will eventually become unavailable + */ + public function teamSettingsUpdateAsync(Model\TeamSettingsUpdateRequest $team_settings_update_request, ?string $team_id = null, string $contentType = self::contentTypes['teamSettingsUpdate'][0]) + { + return $this->teamSettingsUpdateAsyncWithHttpInfo($team_settings_update_request, $team_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation teamSettingsUpdateAsyncWithHttpInfo + * + * Modify team settings + * + * Example: https://github.com/hellosign/dropbox-sign-php/blob/main/examples/TeamSettingsUpdateExample.php + * + * @param Model\TeamSettingsUpdateRequest $team_settings_update_request (required) + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsUpdate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsUpdate. This method will eventually become unavailable + */ + public function teamSettingsUpdateAsyncWithHttpInfo(Model\TeamSettingsUpdateRequest $team_settings_update_request, ?string $team_id = null, string $contentType = self::contentTypes['teamSettingsUpdate'][0]) + { + $returnType = '\Dropbox\Sign\Model\TeamSettingsResponse'; + $request = $this->teamSettingsUpdateRequest($team_settings_update_request, $team_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 'teamSettingsUpdate' + * + * @param Model\TeamSettingsUpdateRequest $team_settings_update_request (required) + * @param string|null $team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSettingsUpdate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::teamSettingsUpdate. This method will eventually become unavailable + */ + public function teamSettingsUpdateRequest(Model\TeamSettingsUpdateRequest $team_settings_update_request, ?string $team_id = null, string $contentType = self::contentTypes['teamSettingsUpdate'][0]) + { + // verify the required parameter 'team_settings_update_request' is set + if ($team_settings_update_request === null || (is_array($team_settings_update_request) && count($team_settings_update_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $team_settings_update_request when calling teamSettingsUpdate' + ); + } + + $resourcePath = '/team/settings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $team_settings_update_request + ); + + $multipart = !empty($formParams); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $team_id, + 'team_id', // param base name + 'string', // 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 (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($team_settings_update_request)); + } else { + $httpBody = $team_settings_update_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, $team_settings_update_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation teamSubTeams * diff --git a/sdks/php/src/Model/AccountSettingsResponse.php b/sdks/php/src/Model/AccountSettingsResponse.php new file mode 100644 index 000000000..75059d43f --- /dev/null +++ b/sdks/php/src/Model/AccountSettingsResponse.php @@ -0,0 +1,487 @@ + + */ +class AccountSettingsResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountSettingsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'account_id' => 'string', + 'settings' => '\Dropbox\Sign\Model\AccountSettingsResponseSettings', + '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 = [ + 'account_id' => null, + 'settings' => null, + 'warnings' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'settings' => 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 = [ + 'account_id' => 'account_id', + 'settings' => 'settings', + 'warnings' => 'warnings', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account_id' => 'setAccountId', + 'settings' => 'setSettings', + 'warnings' => 'setWarnings', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account_id' => 'getAccountId', + 'settings' => 'getSettings', + '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[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('settings', $data ?? [], null); + $this->setIfExists('warnings', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): AccountSettingsResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): AccountSettingsResponse + { + /** @var AccountSettingsResponse */ + return ObjectSerializer::deserialize( + $data, + AccountSettingsResponse::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['account_id'] === null) { + $invalidProperties[] = "'account_id' can't be null"; + } + if ($this->container['settings'] === null) { + $invalidProperties[] = "'settings' 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 account_id + * + * @return string + */ + public function getAccountId() + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string $account_id account_id + * + * @return self + */ + public function setAccountId(string $account_id) + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets settings + * + * @return AccountSettingsResponseSettings + */ + public function getSettings() + { + return $this->container['settings']; + } + + /** + * Sets settings + * + * @param AccountSettingsResponseSettings $settings settings + * + * @return self + */ + public function setSettings(AccountSettingsResponseSettings $settings) + { + if (is_null($settings)) { + throw new InvalidArgumentException('non-nullable settings cannot be null'); + } + $this->container['settings'] = $settings; + + 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/AccountSettingsResponseSettings.php b/sdks/php/src/Model/AccountSettingsResponseSettings.php new file mode 100644 index 000000000..476901ab6 --- /dev/null +++ b/sdks/php/src/Model/AccountSettingsResponseSettings.php @@ -0,0 +1,1341 @@ + + */ +class AccountSettingsResponseSettings implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountSettingsResponseSettings'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'company' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_signing_redirect_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_signing_redirect_url' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_tagline' => '\Dropbox\Sign\Model\SettingResponse', + 'date_format' => '\Dropbox\Sign\Model\SettingResponse', + 'is_signature_reminders_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'request_email_from' => '\Dropbox\Sign\Model\SettingResponse', + 'request_email_signature' => '\Dropbox\Sign\Model\SettingResponse', + 'required_signature_types' => '\Dropbox\Sign\Model\SettingResponse', + 'should_enable_tamper_proof' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_distinct_pdfs' => '\Dropbox\Sign\Model\SettingResponse', + 'should_offer_signer_access_code' => '\Dropbox\Sign\Model\SettingResponse', + 'should_offer_signer_sms_authentication' => '\Dropbox\Sign\Model\SettingResponse', + 'should_remove_document_id' => '\Dropbox\Sign\Model\SettingResponse', + 'is_notify_on_sign_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'is_notify_on_view_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'should_autocomplete' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_requested_pdfs' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_requested_pdfs_for_others' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_sent_doc_pdfs' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_sent_doc_pdfs_for_others' => '\Dropbox\Sign\Model\SettingResponse', + 'should_send_daily_summary' => '\Dropbox\Sign\Model\SettingResponse', + 'should_send_embedded_signature_conf_emails' => '\Dropbox\Sign\Model\SettingResponse', + 'should_send_ordered_sr_email' => '\Dropbox\Sign\Model\SettingResponse', + 'should_send_outbound_conf_emails' => '\Dropbox\Sign\Model\SettingResponse', + 'template_link_signature_emails_enabled' => '\Dropbox\Sign\Model\SettingResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'company' => null, + 'custom_signing_redirect_enabled' => null, + 'custom_signing_redirect_url' => null, + 'custom_tagline' => null, + 'date_format' => null, + 'is_signature_reminders_enabled' => null, + 'request_email_from' => null, + 'request_email_signature' => null, + 'required_signature_types' => null, + 'should_enable_tamper_proof' => null, + 'should_include_distinct_pdfs' => null, + 'should_offer_signer_access_code' => null, + 'should_offer_signer_sms_authentication' => null, + 'should_remove_document_id' => null, + 'is_notify_on_sign_enabled' => null, + 'is_notify_on_view_enabled' => null, + 'should_autocomplete' => null, + 'should_include_requested_pdfs' => null, + 'should_include_requested_pdfs_for_others' => null, + 'should_include_sent_doc_pdfs' => null, + 'should_include_sent_doc_pdfs_for_others' => null, + 'should_send_daily_summary' => null, + 'should_send_embedded_signature_conf_emails' => null, + 'should_send_ordered_sr_email' => null, + 'should_send_outbound_conf_emails' => null, + 'template_link_signature_emails_enabled' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'company' => false, + 'custom_signing_redirect_enabled' => false, + 'custom_signing_redirect_url' => false, + 'custom_tagline' => false, + 'date_format' => false, + 'is_signature_reminders_enabled' => false, + 'request_email_from' => false, + 'request_email_signature' => false, + 'required_signature_types' => false, + 'should_enable_tamper_proof' => false, + 'should_include_distinct_pdfs' => false, + 'should_offer_signer_access_code' => false, + 'should_offer_signer_sms_authentication' => false, + 'should_remove_document_id' => false, + 'is_notify_on_sign_enabled' => false, + 'is_notify_on_view_enabled' => false, + 'should_autocomplete' => false, + 'should_include_requested_pdfs' => false, + 'should_include_requested_pdfs_for_others' => false, + 'should_include_sent_doc_pdfs' => false, + 'should_include_sent_doc_pdfs_for_others' => false, + 'should_send_daily_summary' => false, + 'should_send_embedded_signature_conf_emails' => false, + 'should_send_ordered_sr_email' => false, + 'should_send_outbound_conf_emails' => false, + 'template_link_signature_emails_enabled' => 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 = [ + 'company' => 'company', + 'custom_signing_redirect_enabled' => 'custom_signing_redirect_enabled', + 'custom_signing_redirect_url' => 'custom_signing_redirect_url', + 'custom_tagline' => 'custom_tagline', + 'date_format' => 'date_format', + 'is_signature_reminders_enabled' => 'is_signature_reminders_enabled', + 'request_email_from' => 'request_email_from', + 'request_email_signature' => 'request_email_signature', + 'required_signature_types' => 'required_signature_types', + 'should_enable_tamper_proof' => 'should_enable_tamper_proof', + 'should_include_distinct_pdfs' => 'should_include_distinct_pdfs', + 'should_offer_signer_access_code' => 'should_offer_signer_access_code', + 'should_offer_signer_sms_authentication' => 'should_offer_signer_sms_authentication', + 'should_remove_document_id' => 'should_remove_document_id', + 'is_notify_on_sign_enabled' => 'is_notify_on_sign_enabled', + 'is_notify_on_view_enabled' => 'is_notify_on_view_enabled', + 'should_autocomplete' => 'should_autocomplete', + 'should_include_requested_pdfs' => 'should_include_requested_pdfs', + 'should_include_requested_pdfs_for_others' => 'should_include_requested_pdfs_for_others', + 'should_include_sent_doc_pdfs' => 'should_include_sent_doc_pdfs', + 'should_include_sent_doc_pdfs_for_others' => 'should_include_sent_doc_pdfs_for_others', + 'should_send_daily_summary' => 'should_send_daily_summary', + 'should_send_embedded_signature_conf_emails' => 'should_send_embedded_signature_conf_emails', + 'should_send_ordered_sr_email' => 'should_send_ordered_sr_email', + 'should_send_outbound_conf_emails' => 'should_send_outbound_conf_emails', + 'template_link_signature_emails_enabled' => 'template_link_signature_emails_enabled', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company' => 'setCompany', + 'custom_signing_redirect_enabled' => 'setCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'setCustomSigningRedirectUrl', + 'custom_tagline' => 'setCustomTagline', + 'date_format' => 'setDateFormat', + 'is_signature_reminders_enabled' => 'setIsSignatureRemindersEnabled', + 'request_email_from' => 'setRequestEmailFrom', + 'request_email_signature' => 'setRequestEmailSignature', + 'required_signature_types' => 'setRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'setShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'setShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'setShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'setShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'setShouldRemoveDocumentId', + 'is_notify_on_sign_enabled' => 'setIsNotifyOnSignEnabled', + 'is_notify_on_view_enabled' => 'setIsNotifyOnViewEnabled', + 'should_autocomplete' => 'setShouldAutocomplete', + 'should_include_requested_pdfs' => 'setShouldIncludeRequestedPdfs', + 'should_include_requested_pdfs_for_others' => 'setShouldIncludeRequestedPdfsForOthers', + 'should_include_sent_doc_pdfs' => 'setShouldIncludeSentDocPdfs', + 'should_include_sent_doc_pdfs_for_others' => 'setShouldIncludeSentDocPdfsForOthers', + 'should_send_daily_summary' => 'setShouldSendDailySummary', + 'should_send_embedded_signature_conf_emails' => 'setShouldSendEmbeddedSignatureConfEmails', + 'should_send_ordered_sr_email' => 'setShouldSendOrderedSrEmail', + 'should_send_outbound_conf_emails' => 'setShouldSendOutboundConfEmails', + 'template_link_signature_emails_enabled' => 'setTemplateLinkSignatureEmailsEnabled', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company' => 'getCompany', + 'custom_signing_redirect_enabled' => 'getCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'getCustomSigningRedirectUrl', + 'custom_tagline' => 'getCustomTagline', + 'date_format' => 'getDateFormat', + 'is_signature_reminders_enabled' => 'getIsSignatureRemindersEnabled', + 'request_email_from' => 'getRequestEmailFrom', + 'request_email_signature' => 'getRequestEmailSignature', + 'required_signature_types' => 'getRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'getShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'getShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'getShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'getShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'getShouldRemoveDocumentId', + 'is_notify_on_sign_enabled' => 'getIsNotifyOnSignEnabled', + 'is_notify_on_view_enabled' => 'getIsNotifyOnViewEnabled', + 'should_autocomplete' => 'getShouldAutocomplete', + 'should_include_requested_pdfs' => 'getShouldIncludeRequestedPdfs', + 'should_include_requested_pdfs_for_others' => 'getShouldIncludeRequestedPdfsForOthers', + 'should_include_sent_doc_pdfs' => 'getShouldIncludeSentDocPdfs', + 'should_include_sent_doc_pdfs_for_others' => 'getShouldIncludeSentDocPdfsForOthers', + 'should_send_daily_summary' => 'getShouldSendDailySummary', + 'should_send_embedded_signature_conf_emails' => 'getShouldSendEmbeddedSignatureConfEmails', + 'should_send_ordered_sr_email' => 'getShouldSendOrderedSrEmail', + 'should_send_outbound_conf_emails' => 'getShouldSendOutboundConfEmails', + 'template_link_signature_emails_enabled' => 'getTemplateLinkSignatureEmailsEnabled', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('company', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_enabled', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_url', $data ?? [], null); + $this->setIfExists('custom_tagline', $data ?? [], null); + $this->setIfExists('date_format', $data ?? [], null); + $this->setIfExists('is_signature_reminders_enabled', $data ?? [], null); + $this->setIfExists('request_email_from', $data ?? [], null); + $this->setIfExists('request_email_signature', $data ?? [], null); + $this->setIfExists('required_signature_types', $data ?? [], null); + $this->setIfExists('should_enable_tamper_proof', $data ?? [], null); + $this->setIfExists('should_include_distinct_pdfs', $data ?? [], null); + $this->setIfExists('should_offer_signer_access_code', $data ?? [], null); + $this->setIfExists('should_offer_signer_sms_authentication', $data ?? [], null); + $this->setIfExists('should_remove_document_id', $data ?? [], null); + $this->setIfExists('is_notify_on_sign_enabled', $data ?? [], null); + $this->setIfExists('is_notify_on_view_enabled', $data ?? [], null); + $this->setIfExists('should_autocomplete', $data ?? [], null); + $this->setIfExists('should_include_requested_pdfs', $data ?? [], null); + $this->setIfExists('should_include_requested_pdfs_for_others', $data ?? [], null); + $this->setIfExists('should_include_sent_doc_pdfs', $data ?? [], null); + $this->setIfExists('should_include_sent_doc_pdfs_for_others', $data ?? [], null); + $this->setIfExists('should_send_daily_summary', $data ?? [], null); + $this->setIfExists('should_send_embedded_signature_conf_emails', $data ?? [], null); + $this->setIfExists('should_send_ordered_sr_email', $data ?? [], null); + $this->setIfExists('should_send_outbound_conf_emails', $data ?? [], null); + $this->setIfExists('template_link_signature_emails_enabled', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): AccountSettingsResponseSettings + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): AccountSettingsResponseSettings + { + /** @var AccountSettingsResponseSettings */ + return ObjectSerializer::deserialize( + $data, + AccountSettingsResponseSettings::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['company'] === null) { + $invalidProperties[] = "'company' can't be null"; + } + if ($this->container['custom_signing_redirect_enabled'] === null) { + $invalidProperties[] = "'custom_signing_redirect_enabled' can't be null"; + } + if ($this->container['custom_signing_redirect_url'] === null) { + $invalidProperties[] = "'custom_signing_redirect_url' can't be null"; + } + if ($this->container['custom_tagline'] === null) { + $invalidProperties[] = "'custom_tagline' can't be null"; + } + if ($this->container['date_format'] === null) { + $invalidProperties[] = "'date_format' can't be null"; + } + if ($this->container['is_signature_reminders_enabled'] === null) { + $invalidProperties[] = "'is_signature_reminders_enabled' can't be null"; + } + if ($this->container['request_email_from'] === null) { + $invalidProperties[] = "'request_email_from' can't be null"; + } + if ($this->container['request_email_signature'] === null) { + $invalidProperties[] = "'request_email_signature' can't be null"; + } + if ($this->container['required_signature_types'] === null) { + $invalidProperties[] = "'required_signature_types' can't be null"; + } + if ($this->container['should_enable_tamper_proof'] === null) { + $invalidProperties[] = "'should_enable_tamper_proof' can't be null"; + } + if ($this->container['should_include_distinct_pdfs'] === null) { + $invalidProperties[] = "'should_include_distinct_pdfs' can't be null"; + } + if ($this->container['should_offer_signer_access_code'] === null) { + $invalidProperties[] = "'should_offer_signer_access_code' can't be null"; + } + if ($this->container['should_offer_signer_sms_authentication'] === null) { + $invalidProperties[] = "'should_offer_signer_sms_authentication' can't be null"; + } + if ($this->container['should_remove_document_id'] === null) { + $invalidProperties[] = "'should_remove_document_id' can't be null"; + } + if ($this->container['is_notify_on_sign_enabled'] === null) { + $invalidProperties[] = "'is_notify_on_sign_enabled' can't be null"; + } + if ($this->container['is_notify_on_view_enabled'] === null) { + $invalidProperties[] = "'is_notify_on_view_enabled' can't be null"; + } + if ($this->container['should_autocomplete'] === null) { + $invalidProperties[] = "'should_autocomplete' can't be null"; + } + if ($this->container['should_include_requested_pdfs'] === null) { + $invalidProperties[] = "'should_include_requested_pdfs' can't be null"; + } + if ($this->container['should_include_requested_pdfs_for_others'] === null) { + $invalidProperties[] = "'should_include_requested_pdfs_for_others' can't be null"; + } + if ($this->container['should_include_sent_doc_pdfs'] === null) { + $invalidProperties[] = "'should_include_sent_doc_pdfs' can't be null"; + } + if ($this->container['should_include_sent_doc_pdfs_for_others'] === null) { + $invalidProperties[] = "'should_include_sent_doc_pdfs_for_others' can't be null"; + } + if ($this->container['should_send_daily_summary'] === null) { + $invalidProperties[] = "'should_send_daily_summary' can't be null"; + } + if ($this->container['should_send_embedded_signature_conf_emails'] === null) { + $invalidProperties[] = "'should_send_embedded_signature_conf_emails' can't be null"; + } + if ($this->container['should_send_ordered_sr_email'] === null) { + $invalidProperties[] = "'should_send_ordered_sr_email' can't be null"; + } + if ($this->container['should_send_outbound_conf_emails'] === null) { + $invalidProperties[] = "'should_send_outbound_conf_emails' can't be null"; + } + if ($this->container['template_link_signature_emails_enabled'] === null) { + $invalidProperties[] = "'template_link_signature_emails_enabled' 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 company + * + * @return SettingResponse + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * + * @param SettingResponse $company company name associated with this account or team + * + * @return self + */ + public function setCompany(SettingResponse $company) + { + if (is_null($company)) { + throw new InvalidArgumentException('non-nullable company cannot be null'); + } + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets custom_signing_redirect_enabled + * + * @return SettingResponse + */ + public function getCustomSigningRedirectEnabled() + { + return $this->container['custom_signing_redirect_enabled']; + } + + /** + * Sets custom_signing_redirect_enabled + * + * @param SettingResponse $custom_signing_redirect_enabled whether signers are redirected to a custom URL after completing a signature request + * + * @return self + */ + public function setCustomSigningRedirectEnabled(SettingResponse $custom_signing_redirect_enabled) + { + if (is_null($custom_signing_redirect_enabled)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_enabled cannot be null'); + } + $this->container['custom_signing_redirect_enabled'] = $custom_signing_redirect_enabled; + + return $this; + } + + /** + * Gets custom_signing_redirect_url + * + * @return SettingResponse + */ + public function getCustomSigningRedirectUrl() + { + return $this->container['custom_signing_redirect_url']; + } + + /** + * Sets custom_signing_redirect_url + * + * @param SettingResponse $custom_signing_redirect_url URL where signers are redirected after completing a signature request when custom redirects are enabled + * + * @return self + */ + public function setCustomSigningRedirectUrl(SettingResponse $custom_signing_redirect_url) + { + if (is_null($custom_signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_url cannot be null'); + } + $this->container['custom_signing_redirect_url'] = $custom_signing_redirect_url; + + return $this; + } + + /** + * Gets custom_tagline + * + * @return SettingResponse + */ + public function getCustomTagline() + { + return $this->container['custom_tagline']; + } + + /** + * Sets custom_tagline + * + * @param SettingResponse $custom_tagline custom tagline displayed with the account or team branding + * + * @return self + */ + public function setCustomTagline(SettingResponse $custom_tagline) + { + if (is_null($custom_tagline)) { + throw new InvalidArgumentException('non-nullable custom_tagline cannot be null'); + } + $this->container['custom_tagline'] = $custom_tagline; + + return $this; + } + + /** + * Gets date_format + * + * @return SettingResponse + */ + public function getDateFormat() + { + return $this->container['date_format']; + } + + /** + * Sets date_format + * + * @param SettingResponse $date_format Date format used to display dates. List the setting in `unset` to inherit the default. + * + * @return self + */ + public function setDateFormat(SettingResponse $date_format) + { + if (is_null($date_format)) { + throw new InvalidArgumentException('non-nullable date_format cannot be null'); + } + $this->container['date_format'] = $date_format; + + return $this; + } + + /** + * Gets is_signature_reminders_enabled + * + * @return SettingResponse + */ + public function getIsSignatureRemindersEnabled() + { + return $this->container['is_signature_reminders_enabled']; + } + + /** + * Sets is_signature_reminders_enabled + * + * @param SettingResponse $is_signature_reminders_enabled whether automatic reminder emails are enabled for incomplete signature requests + * + * @return self + */ + public function setIsSignatureRemindersEnabled(SettingResponse $is_signature_reminders_enabled) + { + if (is_null($is_signature_reminders_enabled)) { + throw new InvalidArgumentException('non-nullable is_signature_reminders_enabled cannot be null'); + } + $this->container['is_signature_reminders_enabled'] = $is_signature_reminders_enabled; + + return $this; + } + + /** + * Gets request_email_from + * + * @return SettingResponse + */ + public function getRequestEmailFrom() + { + return $this->container['request_email_from']; + } + + /** + * Sets request_email_from + * + * @param SettingResponse $request_email_from sender name shown on signature request emails + * + * @return self + */ + public function setRequestEmailFrom(SettingResponse $request_email_from) + { + if (is_null($request_email_from)) { + throw new InvalidArgumentException('non-nullable request_email_from cannot be null'); + } + $this->container['request_email_from'] = $request_email_from; + + return $this; + } + + /** + * Gets request_email_signature + * + * @return SettingResponse + */ + public function getRequestEmailSignature() + { + return $this->container['request_email_signature']; + } + + /** + * Sets request_email_signature + * + * @param SettingResponse $request_email_signature signature appended to signature request emails + * + * @return self + */ + public function setRequestEmailSignature(SettingResponse $request_email_signature) + { + if (is_null($request_email_signature)) { + throw new InvalidArgumentException('non-nullable request_email_signature cannot be null'); + } + $this->container['request_email_signature'] = $request_email_signature; + + return $this; + } + + /** + * Gets required_signature_types + * + * @return SettingResponse + */ + public function getRequiredSignatureTypes() + { + return $this->container['required_signature_types']; + } + + /** + * Sets required_signature_types + * + * @param SettingResponse $required_signature_types signature creation methods signers may use + * + * @return self + */ + public function setRequiredSignatureTypes(SettingResponse $required_signature_types) + { + if (is_null($required_signature_types)) { + throw new InvalidArgumentException('non-nullable required_signature_types cannot be null'); + } + $this->container['required_signature_types'] = $required_signature_types; + + return $this; + } + + /** + * Gets should_enable_tamper_proof + * + * @return SettingResponse + */ + public function getShouldEnableTamperProof() + { + return $this->container['should_enable_tamper_proof']; + } + + /** + * Sets should_enable_tamper_proof + * + * @param SettingResponse $should_enable_tamper_proof whether completed documents include a digital tamper-proof seal + * + * @return self + */ + public function setShouldEnableTamperProof(SettingResponse $should_enable_tamper_proof) + { + if (is_null($should_enable_tamper_proof)) { + throw new InvalidArgumentException('non-nullable should_enable_tamper_proof cannot be null'); + } + $this->container['should_enable_tamper_proof'] = $should_enable_tamper_proof; + + return $this; + } + + /** + * Gets should_include_distinct_pdfs + * + * @return SettingResponse + */ + public function getShouldIncludeDistinctPdfs() + { + return $this->container['should_include_distinct_pdfs']; + } + + /** + * Sets should_include_distinct_pdfs + * + * @param SettingResponse $should_include_distinct_pdfs whether completed documents remain as separate PDF files instead of being merged into one PDF + * + * @return self + */ + public function setShouldIncludeDistinctPdfs(SettingResponse $should_include_distinct_pdfs) + { + if (is_null($should_include_distinct_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_distinct_pdfs cannot be null'); + } + $this->container['should_include_distinct_pdfs'] = $should_include_distinct_pdfs; + + return $this; + } + + /** + * Gets should_offer_signer_access_code + * + * @return SettingResponse + */ + public function getShouldOfferSignerAccessCode() + { + return $this->container['should_offer_signer_access_code']; + } + + /** + * Sets should_offer_signer_access_code + * + * @param SettingResponse $should_offer_signer_access_code whether senders can require an access code to verify a signer + * + * @return self + */ + public function setShouldOfferSignerAccessCode(SettingResponse $should_offer_signer_access_code) + { + if (is_null($should_offer_signer_access_code)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_access_code cannot be null'); + } + $this->container['should_offer_signer_access_code'] = $should_offer_signer_access_code; + + return $this; + } + + /** + * Gets should_offer_signer_sms_authentication + * + * @return SettingResponse + */ + public function getShouldOfferSignerSmsAuthentication() + { + return $this->container['should_offer_signer_sms_authentication']; + } + + /** + * Sets should_offer_signer_sms_authentication + * + * @param SettingResponse $should_offer_signer_sms_authentication whether senders can require SMS authentication to verify a signer + * + * @return self + */ + public function setShouldOfferSignerSmsAuthentication(SettingResponse $should_offer_signer_sms_authentication) + { + if (is_null($should_offer_signer_sms_authentication)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_sms_authentication cannot be null'); + } + $this->container['should_offer_signer_sms_authentication'] = $should_offer_signer_sms_authentication; + + return $this; + } + + /** + * Gets should_remove_document_id + * + * @return SettingResponse + */ + public function getShouldRemoveDocumentId() + { + return $this->container['should_remove_document_id']; + } + + /** + * Sets should_remove_document_id + * + * @param SettingResponse $should_remove_document_id whether the Dropbox Sign document ID is hidden on sent documents + * + * @return self + */ + public function setShouldRemoveDocumentId(SettingResponse $should_remove_document_id) + { + if (is_null($should_remove_document_id)) { + throw new InvalidArgumentException('non-nullable should_remove_document_id cannot be null'); + } + $this->container['should_remove_document_id'] = $should_remove_document_id; + + return $this; + } + + /** + * Gets is_notify_on_sign_enabled + * + * @return SettingResponse + */ + public function getIsNotifyOnSignEnabled() + { + return $this->container['is_notify_on_sign_enabled']; + } + + /** + * Sets is_notify_on_sign_enabled + * + * @param SettingResponse $is_notify_on_sign_enabled whether to notify the account when someone signs a document it sent + * + * @return self + */ + public function setIsNotifyOnSignEnabled(SettingResponse $is_notify_on_sign_enabled) + { + if (is_null($is_notify_on_sign_enabled)) { + throw new InvalidArgumentException('non-nullable is_notify_on_sign_enabled cannot be null'); + } + $this->container['is_notify_on_sign_enabled'] = $is_notify_on_sign_enabled; + + return $this; + } + + /** + * Gets is_notify_on_view_enabled + * + * @return SettingResponse + */ + public function getIsNotifyOnViewEnabled() + { + return $this->container['is_notify_on_view_enabled']; + } + + /** + * Sets is_notify_on_view_enabled + * + * @param SettingResponse $is_notify_on_view_enabled whether to notify the account when someone opens a document it sent + * + * @return self + */ + public function setIsNotifyOnViewEnabled(SettingResponse $is_notify_on_view_enabled) + { + if (is_null($is_notify_on_view_enabled)) { + throw new InvalidArgumentException('non-nullable is_notify_on_view_enabled cannot be null'); + } + $this->container['is_notify_on_view_enabled'] = $is_notify_on_view_enabled; + + return $this; + } + + /** + * Gets should_autocomplete + * + * @return SettingResponse + */ + public function getShouldAutocomplete() + { + return $this->container['should_autocomplete']; + } + + /** + * Sets should_autocomplete + * + * @param SettingResponse $should_autocomplete whether values entered in text fields are saved and suggested for future signature requests + * + * @return self + */ + public function setShouldAutocomplete(SettingResponse $should_autocomplete) + { + if (is_null($should_autocomplete)) { + throw new InvalidArgumentException('non-nullable should_autocomplete cannot be null'); + } + $this->container['should_autocomplete'] = $should_autocomplete; + + return $this; + } + + /** + * Gets should_include_requested_pdfs + * + * @return SettingResponse + */ + public function getShouldIncludeRequestedPdfs() + { + return $this->container['should_include_requested_pdfs']; + } + + /** + * Sets should_include_requested_pdfs + * + * @param SettingResponse $should_include_requested_pdfs whether completed signature requests include PDF copies in emails sent to the account + * + * @return self + */ + public function setShouldIncludeRequestedPdfs(SettingResponse $should_include_requested_pdfs) + { + if (is_null($should_include_requested_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_requested_pdfs cannot be null'); + } + $this->container['should_include_requested_pdfs'] = $should_include_requested_pdfs; + + return $this; + } + + /** + * Gets should_include_requested_pdfs_for_others + * + * @return SettingResponse + */ + public function getShouldIncludeRequestedPdfsForOthers() + { + return $this->container['should_include_requested_pdfs_for_others']; + } + + /** + * Sets should_include_requested_pdfs_for_others + * + * @param SettingResponse $should_include_requested_pdfs_for_others whether completed signature requests include PDF copies in emails sent to signers and CC recipients + * + * @return self + */ + public function setShouldIncludeRequestedPdfsForOthers(SettingResponse $should_include_requested_pdfs_for_others) + { + if (is_null($should_include_requested_pdfs_for_others)) { + throw new InvalidArgumentException('non-nullable should_include_requested_pdfs_for_others cannot be null'); + } + $this->container['should_include_requested_pdfs_for_others'] = $should_include_requested_pdfs_for_others; + + return $this; + } + + /** + * Gets should_include_sent_doc_pdfs + * + * @return SettingResponse + */ + public function getShouldIncludeSentDocPdfs() + { + return $this->container['should_include_sent_doc_pdfs']; + } + + /** + * Sets should_include_sent_doc_pdfs + * + * @param SettingResponse $should_include_sent_doc_pdfs whether emails sent to the account include PDF copies of documents it sends + * + * @return self + */ + public function setShouldIncludeSentDocPdfs(SettingResponse $should_include_sent_doc_pdfs) + { + if (is_null($should_include_sent_doc_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_sent_doc_pdfs cannot be null'); + } + $this->container['should_include_sent_doc_pdfs'] = $should_include_sent_doc_pdfs; + + return $this; + } + + /** + * Gets should_include_sent_doc_pdfs_for_others + * + * @return SettingResponse + */ + public function getShouldIncludeSentDocPdfsForOthers() + { + return $this->container['should_include_sent_doc_pdfs_for_others']; + } + + /** + * Sets should_include_sent_doc_pdfs_for_others + * + * @param SettingResponse $should_include_sent_doc_pdfs_for_others whether emails sent to recipients include PDF copies of documents the account sends + * + * @return self + */ + public function setShouldIncludeSentDocPdfsForOthers(SettingResponse $should_include_sent_doc_pdfs_for_others) + { + if (is_null($should_include_sent_doc_pdfs_for_others)) { + throw new InvalidArgumentException('non-nullable should_include_sent_doc_pdfs_for_others cannot be null'); + } + $this->container['should_include_sent_doc_pdfs_for_others'] = $should_include_sent_doc_pdfs_for_others; + + return $this; + } + + /** + * Gets should_send_daily_summary + * + * @return SettingResponse + */ + public function getShouldSendDailySummary() + { + return $this->container['should_send_daily_summary']; + } + + /** + * Sets should_send_daily_summary + * + * @param SettingResponse $should_send_daily_summary whether to send the account a daily email summarizing outstanding signature requests + * + * @return self + */ + public function setShouldSendDailySummary(SettingResponse $should_send_daily_summary) + { + if (is_null($should_send_daily_summary)) { + throw new InvalidArgumentException('non-nullable should_send_daily_summary cannot be null'); + } + $this->container['should_send_daily_summary'] = $should_send_daily_summary; + + return $this; + } + + /** + * Gets should_send_embedded_signature_conf_emails + * + * @return SettingResponse + */ + public function getShouldSendEmbeddedSignatureConfEmails() + { + return $this->container['should_send_embedded_signature_conf_emails']; + } + + /** + * Sets should_send_embedded_signature_conf_emails + * + * @param SettingResponse $should_send_embedded_signature_conf_emails whether to notify the account when it signs a document on a third-party site + * + * @return self + */ + public function setShouldSendEmbeddedSignatureConfEmails(SettingResponse $should_send_embedded_signature_conf_emails) + { + if (is_null($should_send_embedded_signature_conf_emails)) { + throw new InvalidArgumentException('non-nullable should_send_embedded_signature_conf_emails cannot be null'); + } + $this->container['should_send_embedded_signature_conf_emails'] = $should_send_embedded_signature_conf_emails; + + return $this; + } + + /** + * Gets should_send_ordered_sr_email + * + * @return SettingResponse + */ + public function getShouldSendOrderedSrEmail() + { + return $this->container['should_send_ordered_sr_email']; + } + + /** + * Sets should_send_ordered_sr_email + * + * @param SettingResponse $should_send_ordered_sr_email whether to notify all parties when an ordered signature request starts + * + * @return self + */ + public function setShouldSendOrderedSrEmail(SettingResponse $should_send_ordered_sr_email) + { + if (is_null($should_send_ordered_sr_email)) { + throw new InvalidArgumentException('non-nullable should_send_ordered_sr_email cannot be null'); + } + $this->container['should_send_ordered_sr_email'] = $should_send_ordered_sr_email; + + return $this; + } + + /** + * Gets should_send_outbound_conf_emails + * + * @return SettingResponse + */ + public function getShouldSendOutboundConfEmails() + { + return $this->container['should_send_outbound_conf_emails']; + } + + /** + * Sets should_send_outbound_conf_emails + * + * @param SettingResponse $should_send_outbound_conf_emails whether to notify the account when it signs and sends a document + * + * @return self + */ + public function setShouldSendOutboundConfEmails(SettingResponse $should_send_outbound_conf_emails) + { + if (is_null($should_send_outbound_conf_emails)) { + throw new InvalidArgumentException('non-nullable should_send_outbound_conf_emails cannot be null'); + } + $this->container['should_send_outbound_conf_emails'] = $should_send_outbound_conf_emails; + + return $this; + } + + /** + * Gets template_link_signature_emails_enabled + * + * @return SettingResponse + */ + public function getTemplateLinkSignatureEmailsEnabled() + { + return $this->container['template_link_signature_emails_enabled']; + } + + /** + * Sets template_link_signature_emails_enabled + * + * @param SettingResponse $template_link_signature_emails_enabled whether to notify the account when someone signs a document sent by its team through a template link + * + * @return self + */ + public function setTemplateLinkSignatureEmailsEnabled(SettingResponse $template_link_signature_emails_enabled) + { + if (is_null($template_link_signature_emails_enabled)) { + throw new InvalidArgumentException('non-nullable template_link_signature_emails_enabled cannot be null'); + } + $this->container['template_link_signature_emails_enabled'] = $template_link_signature_emails_enabled; + + 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/AccountSettingsUpdateRequest.php b/sdks/php/src/Model/AccountSettingsUpdateRequest.php new file mode 100644 index 000000000..172028cf7 --- /dev/null +++ b/sdks/php/src/Model/AccountSettingsUpdateRequest.php @@ -0,0 +1,1370 @@ + + */ +class AccountSettingsUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountSettingsUpdateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'company' => 'string', + 'custom_signing_redirect_enabled' => 'bool', + 'custom_signing_redirect_url' => 'string', + 'custom_tagline' => 'string', + 'date_format' => '\Dropbox\Sign\Model\DateFormat', + 'is_signature_reminders_enabled' => 'bool', + 'request_email_from' => 'string', + 'request_email_signature' => 'string', + 'required_signature_types' => '\Dropbox\Sign\Model\RequiredSignatureType[]', + 'should_enable_tamper_proof' => 'bool', + 'should_include_distinct_pdfs' => 'bool', + 'should_offer_signer_access_code' => 'bool', + 'should_offer_signer_sms_authentication' => 'bool', + 'should_remove_document_id' => 'bool', + 'is_notify_on_sign_enabled' => 'bool', + 'is_notify_on_view_enabled' => 'bool', + 'should_autocomplete' => 'bool', + 'should_include_requested_pdfs' => 'bool', + 'should_include_requested_pdfs_for_others' => 'bool', + 'should_include_sent_doc_pdfs' => 'bool', + 'should_include_sent_doc_pdfs_for_others' => 'bool', + 'should_send_daily_summary' => 'bool', + 'should_send_embedded_signature_conf_emails' => 'bool', + 'should_send_ordered_sr_email' => 'bool', + 'should_send_outbound_conf_emails' => 'bool', + 'template_link_signature_emails_enabled' => 'bool', + 'unset' => 'string[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'company' => null, + 'custom_signing_redirect_enabled' => null, + 'custom_signing_redirect_url' => null, + 'custom_tagline' => null, + 'date_format' => null, + 'is_signature_reminders_enabled' => null, + 'request_email_from' => null, + 'request_email_signature' => null, + 'required_signature_types' => null, + 'should_enable_tamper_proof' => null, + 'should_include_distinct_pdfs' => null, + 'should_offer_signer_access_code' => null, + 'should_offer_signer_sms_authentication' => null, + 'should_remove_document_id' => null, + 'is_notify_on_sign_enabled' => null, + 'is_notify_on_view_enabled' => null, + 'should_autocomplete' => null, + 'should_include_requested_pdfs' => null, + 'should_include_requested_pdfs_for_others' => null, + 'should_include_sent_doc_pdfs' => null, + 'should_include_sent_doc_pdfs_for_others' => null, + 'should_send_daily_summary' => null, + 'should_send_embedded_signature_conf_emails' => null, + 'should_send_ordered_sr_email' => null, + 'should_send_outbound_conf_emails' => null, + 'template_link_signature_emails_enabled' => null, + 'unset' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'company' => false, + 'custom_signing_redirect_enabled' => false, + 'custom_signing_redirect_url' => false, + 'custom_tagline' => false, + 'date_format' => false, + 'is_signature_reminders_enabled' => false, + 'request_email_from' => false, + 'request_email_signature' => false, + 'required_signature_types' => false, + 'should_enable_tamper_proof' => false, + 'should_include_distinct_pdfs' => false, + 'should_offer_signer_access_code' => false, + 'should_offer_signer_sms_authentication' => false, + 'should_remove_document_id' => false, + 'is_notify_on_sign_enabled' => false, + 'is_notify_on_view_enabled' => false, + 'should_autocomplete' => false, + 'should_include_requested_pdfs' => false, + 'should_include_requested_pdfs_for_others' => false, + 'should_include_sent_doc_pdfs' => false, + 'should_include_sent_doc_pdfs_for_others' => false, + 'should_send_daily_summary' => false, + 'should_send_embedded_signature_conf_emails' => false, + 'should_send_ordered_sr_email' => false, + 'should_send_outbound_conf_emails' => false, + 'template_link_signature_emails_enabled' => false, + 'unset' => 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 = [ + 'company' => 'company', + 'custom_signing_redirect_enabled' => 'custom_signing_redirect_enabled', + 'custom_signing_redirect_url' => 'custom_signing_redirect_url', + 'custom_tagline' => 'custom_tagline', + 'date_format' => 'date_format', + 'is_signature_reminders_enabled' => 'is_signature_reminders_enabled', + 'request_email_from' => 'request_email_from', + 'request_email_signature' => 'request_email_signature', + 'required_signature_types' => 'required_signature_types', + 'should_enable_tamper_proof' => 'should_enable_tamper_proof', + 'should_include_distinct_pdfs' => 'should_include_distinct_pdfs', + 'should_offer_signer_access_code' => 'should_offer_signer_access_code', + 'should_offer_signer_sms_authentication' => 'should_offer_signer_sms_authentication', + 'should_remove_document_id' => 'should_remove_document_id', + 'is_notify_on_sign_enabled' => 'is_notify_on_sign_enabled', + 'is_notify_on_view_enabled' => 'is_notify_on_view_enabled', + 'should_autocomplete' => 'should_autocomplete', + 'should_include_requested_pdfs' => 'should_include_requested_pdfs', + 'should_include_requested_pdfs_for_others' => 'should_include_requested_pdfs_for_others', + 'should_include_sent_doc_pdfs' => 'should_include_sent_doc_pdfs', + 'should_include_sent_doc_pdfs_for_others' => 'should_include_sent_doc_pdfs_for_others', + 'should_send_daily_summary' => 'should_send_daily_summary', + 'should_send_embedded_signature_conf_emails' => 'should_send_embedded_signature_conf_emails', + 'should_send_ordered_sr_email' => 'should_send_ordered_sr_email', + 'should_send_outbound_conf_emails' => 'should_send_outbound_conf_emails', + 'template_link_signature_emails_enabled' => 'template_link_signature_emails_enabled', + 'unset' => 'unset', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company' => 'setCompany', + 'custom_signing_redirect_enabled' => 'setCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'setCustomSigningRedirectUrl', + 'custom_tagline' => 'setCustomTagline', + 'date_format' => 'setDateFormat', + 'is_signature_reminders_enabled' => 'setIsSignatureRemindersEnabled', + 'request_email_from' => 'setRequestEmailFrom', + 'request_email_signature' => 'setRequestEmailSignature', + 'required_signature_types' => 'setRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'setShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'setShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'setShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'setShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'setShouldRemoveDocumentId', + 'is_notify_on_sign_enabled' => 'setIsNotifyOnSignEnabled', + 'is_notify_on_view_enabled' => 'setIsNotifyOnViewEnabled', + 'should_autocomplete' => 'setShouldAutocomplete', + 'should_include_requested_pdfs' => 'setShouldIncludeRequestedPdfs', + 'should_include_requested_pdfs_for_others' => 'setShouldIncludeRequestedPdfsForOthers', + 'should_include_sent_doc_pdfs' => 'setShouldIncludeSentDocPdfs', + 'should_include_sent_doc_pdfs_for_others' => 'setShouldIncludeSentDocPdfsForOthers', + 'should_send_daily_summary' => 'setShouldSendDailySummary', + 'should_send_embedded_signature_conf_emails' => 'setShouldSendEmbeddedSignatureConfEmails', + 'should_send_ordered_sr_email' => 'setShouldSendOrderedSrEmail', + 'should_send_outbound_conf_emails' => 'setShouldSendOutboundConfEmails', + 'template_link_signature_emails_enabled' => 'setTemplateLinkSignatureEmailsEnabled', + 'unset' => 'setUnset', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company' => 'getCompany', + 'custom_signing_redirect_enabled' => 'getCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'getCustomSigningRedirectUrl', + 'custom_tagline' => 'getCustomTagline', + 'date_format' => 'getDateFormat', + 'is_signature_reminders_enabled' => 'getIsSignatureRemindersEnabled', + 'request_email_from' => 'getRequestEmailFrom', + 'request_email_signature' => 'getRequestEmailSignature', + 'required_signature_types' => 'getRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'getShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'getShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'getShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'getShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'getShouldRemoveDocumentId', + 'is_notify_on_sign_enabled' => 'getIsNotifyOnSignEnabled', + 'is_notify_on_view_enabled' => 'getIsNotifyOnViewEnabled', + 'should_autocomplete' => 'getShouldAutocomplete', + 'should_include_requested_pdfs' => 'getShouldIncludeRequestedPdfs', + 'should_include_requested_pdfs_for_others' => 'getShouldIncludeRequestedPdfsForOthers', + 'should_include_sent_doc_pdfs' => 'getShouldIncludeSentDocPdfs', + 'should_include_sent_doc_pdfs_for_others' => 'getShouldIncludeSentDocPdfsForOthers', + 'should_send_daily_summary' => 'getShouldSendDailySummary', + 'should_send_embedded_signature_conf_emails' => 'getShouldSendEmbeddedSignatureConfEmails', + 'should_send_ordered_sr_email' => 'getShouldSendOrderedSrEmail', + 'should_send_outbound_conf_emails' => 'getShouldSendOutboundConfEmails', + 'template_link_signature_emails_enabled' => 'getTemplateLinkSignatureEmailsEnabled', + 'unset' => 'getUnset', + ]; + + /** + * 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 MODEL_UNSET_COMPANY = 'company'; + public const MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_ENABLED = 'custom_signing_redirect_enabled'; + public const MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_URL = 'custom_signing_redirect_url'; + public const MODEL_UNSET_CUSTOM_TAGLINE = 'custom_tagline'; + public const MODEL_UNSET_DATE_FORMAT = 'date_format'; + public const MODEL_UNSET_IS_SIGNATURE_REMINDERS_ENABLED = 'is_signature_reminders_enabled'; + public const MODEL_UNSET_REQUEST_EMAIL_FROM = 'request_email_from'; + public const MODEL_UNSET_REQUEST_EMAIL_SIGNATURE = 'request_email_signature'; + public const MODEL_UNSET_REQUIRED_SIGNATURE_TYPES = 'required_signature_types'; + public const MODEL_UNSET_SHOULD_ENABLE_TAMPER_PROOF = 'should_enable_tamper_proof'; + public const MODEL_UNSET_SHOULD_INCLUDE_DISTINCT_PDFS = 'should_include_distinct_pdfs'; + public const MODEL_UNSET_SHOULD_OFFER_SIGNER_ACCESS_CODE = 'should_offer_signer_access_code'; + public const MODEL_UNSET_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = 'should_offer_signer_sms_authentication'; + public const MODEL_UNSET_SHOULD_REMOVE_DOCUMENT_ID = 'should_remove_document_id'; + public const MODEL_UNSET_IS_NOTIFY_ON_SIGN_ENABLED = 'is_notify_on_sign_enabled'; + public const MODEL_UNSET_IS_NOTIFY_ON_VIEW_ENABLED = 'is_notify_on_view_enabled'; + public const MODEL_UNSET_SHOULD_AUTOCOMPLETE = 'should_autocomplete'; + public const MODEL_UNSET_SHOULD_INCLUDE_REQUESTED_PDFS = 'should_include_requested_pdfs'; + public const MODEL_UNSET_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS = 'should_include_requested_pdfs_for_others'; + public const MODEL_UNSET_SHOULD_INCLUDE_SENT_DOC_PDFS = 'should_include_sent_doc_pdfs'; + public const MODEL_UNSET_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS = 'should_include_sent_doc_pdfs_for_others'; + public const MODEL_UNSET_SHOULD_SEND_DAILY_SUMMARY = 'should_send_daily_summary'; + public const MODEL_UNSET_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS = 'should_send_embedded_signature_conf_emails'; + public const MODEL_UNSET_SHOULD_SEND_ORDERED_SR_EMAIL = 'should_send_ordered_sr_email'; + public const MODEL_UNSET_SHOULD_SEND_OUTBOUND_CONF_EMAILS = 'should_send_outbound_conf_emails'; + public const MODEL_UNSET_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED = 'template_link_signature_emails_enabled'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnsetAllowableValues() + { + return [ + self::MODEL_UNSET_COMPANY, + self::MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_ENABLED, + self::MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_URL, + self::MODEL_UNSET_CUSTOM_TAGLINE, + self::MODEL_UNSET_DATE_FORMAT, + self::MODEL_UNSET_IS_SIGNATURE_REMINDERS_ENABLED, + self::MODEL_UNSET_REQUEST_EMAIL_FROM, + self::MODEL_UNSET_REQUEST_EMAIL_SIGNATURE, + self::MODEL_UNSET_REQUIRED_SIGNATURE_TYPES, + self::MODEL_UNSET_SHOULD_ENABLE_TAMPER_PROOF, + self::MODEL_UNSET_SHOULD_INCLUDE_DISTINCT_PDFS, + self::MODEL_UNSET_SHOULD_OFFER_SIGNER_ACCESS_CODE, + self::MODEL_UNSET_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + self::MODEL_UNSET_SHOULD_REMOVE_DOCUMENT_ID, + self::MODEL_UNSET_IS_NOTIFY_ON_SIGN_ENABLED, + self::MODEL_UNSET_IS_NOTIFY_ON_VIEW_ENABLED, + self::MODEL_UNSET_SHOULD_AUTOCOMPLETE, + self::MODEL_UNSET_SHOULD_INCLUDE_REQUESTED_PDFS, + self::MODEL_UNSET_SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS, + self::MODEL_UNSET_SHOULD_INCLUDE_SENT_DOC_PDFS, + self::MODEL_UNSET_SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS, + self::MODEL_UNSET_SHOULD_SEND_DAILY_SUMMARY, + self::MODEL_UNSET_SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS, + self::MODEL_UNSET_SHOULD_SEND_ORDERED_SR_EMAIL, + self::MODEL_UNSET_SHOULD_SEND_OUTBOUND_CONF_EMAILS, + self::MODEL_UNSET_TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('company', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_enabled', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_url', $data ?? [], null); + $this->setIfExists('custom_tagline', $data ?? [], null); + $this->setIfExists('date_format', $data ?? [], null); + $this->setIfExists('is_signature_reminders_enabled', $data ?? [], null); + $this->setIfExists('request_email_from', $data ?? [], null); + $this->setIfExists('request_email_signature', $data ?? [], null); + $this->setIfExists('required_signature_types', $data ?? [], null); + $this->setIfExists('should_enable_tamper_proof', $data ?? [], null); + $this->setIfExists('should_include_distinct_pdfs', $data ?? [], null); + $this->setIfExists('should_offer_signer_access_code', $data ?? [], null); + $this->setIfExists('should_offer_signer_sms_authentication', $data ?? [], null); + $this->setIfExists('should_remove_document_id', $data ?? [], null); + $this->setIfExists('is_notify_on_sign_enabled', $data ?? [], null); + $this->setIfExists('is_notify_on_view_enabled', $data ?? [], null); + $this->setIfExists('should_autocomplete', $data ?? [], null); + $this->setIfExists('should_include_requested_pdfs', $data ?? [], null); + $this->setIfExists('should_include_requested_pdfs_for_others', $data ?? [], null); + $this->setIfExists('should_include_sent_doc_pdfs', $data ?? [], null); + $this->setIfExists('should_include_sent_doc_pdfs_for_others', $data ?? [], null); + $this->setIfExists('should_send_daily_summary', $data ?? [], null); + $this->setIfExists('should_send_embedded_signature_conf_emails', $data ?? [], null); + $this->setIfExists('should_send_ordered_sr_email', $data ?? [], null); + $this->setIfExists('should_send_outbound_conf_emails', $data ?? [], null); + $this->setIfExists('template_link_signature_emails_enabled', $data ?? [], null); + $this->setIfExists('unset', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): AccountSettingsUpdateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): AccountSettingsUpdateRequest + { + /** @var AccountSettingsUpdateRequest */ + return ObjectSerializer::deserialize( + $data, + AccountSettingsUpdateRequest::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() + { + return []; + } + + /** + * 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 company + * + * @return string|null + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * + * @param string|null $company company name associated with this account or team + * + * @return self + */ + public function setCompany(?string $company) + { + if (is_null($company)) { + throw new InvalidArgumentException('non-nullable company cannot be null'); + } + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets custom_signing_redirect_enabled + * + * @return bool|null + */ + public function getCustomSigningRedirectEnabled() + { + return $this->container['custom_signing_redirect_enabled']; + } + + /** + * Sets custom_signing_redirect_enabled + * + * @param bool|null $custom_signing_redirect_enabled whether signers are redirected to a custom URL after completing a signature request + * + * @return self + */ + public function setCustomSigningRedirectEnabled(?bool $custom_signing_redirect_enabled) + { + if (is_null($custom_signing_redirect_enabled)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_enabled cannot be null'); + } + $this->container['custom_signing_redirect_enabled'] = $custom_signing_redirect_enabled; + + return $this; + } + + /** + * Gets custom_signing_redirect_url + * + * @return string|null + */ + public function getCustomSigningRedirectUrl() + { + return $this->container['custom_signing_redirect_url']; + } + + /** + * Sets custom_signing_redirect_url + * + * @param string|null $custom_signing_redirect_url URL where signers are redirected after completing a signature request when custom redirects are enabled + * + * @return self + */ + public function setCustomSigningRedirectUrl(?string $custom_signing_redirect_url) + { + if (is_null($custom_signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_url cannot be null'); + } + $this->container['custom_signing_redirect_url'] = $custom_signing_redirect_url; + + return $this; + } + + /** + * Gets custom_tagline + * + * @return string|null + */ + public function getCustomTagline() + { + return $this->container['custom_tagline']; + } + + /** + * Sets custom_tagline + * + * @param string|null $custom_tagline custom tagline displayed with the account or team branding + * + * @return self + */ + public function setCustomTagline(?string $custom_tagline) + { + if (is_null($custom_tagline)) { + throw new InvalidArgumentException('non-nullable custom_tagline cannot be null'); + } + $this->container['custom_tagline'] = $custom_tagline; + + return $this; + } + + /** + * Gets date_format + * + * @return DateFormat|null + */ + public function getDateFormat() + { + return $this->container['date_format']; + } + + /** + * Sets date_format + * + * @param DateFormat|null $date_format date_format + * + * @return self + */ + public function setDateFormat(?DateFormat $date_format) + { + if (is_null($date_format)) { + throw new InvalidArgumentException('non-nullable date_format cannot be null'); + } + $this->container['date_format'] = $date_format; + + return $this; + } + + /** + * Gets is_signature_reminders_enabled + * + * @return bool|null + */ + public function getIsSignatureRemindersEnabled() + { + return $this->container['is_signature_reminders_enabled']; + } + + /** + * Sets is_signature_reminders_enabled + * + * @param bool|null $is_signature_reminders_enabled whether automatic reminder emails are enabled for incomplete signature requests + * + * @return self + */ + public function setIsSignatureRemindersEnabled(?bool $is_signature_reminders_enabled) + { + if (is_null($is_signature_reminders_enabled)) { + throw new InvalidArgumentException('non-nullable is_signature_reminders_enabled cannot be null'); + } + $this->container['is_signature_reminders_enabled'] = $is_signature_reminders_enabled; + + return $this; + } + + /** + * Gets request_email_from + * + * @return string|null + */ + public function getRequestEmailFrom() + { + return $this->container['request_email_from']; + } + + /** + * Sets request_email_from + * + * @param string|null $request_email_from sender name shown on signature request emails + * + * @return self + */ + public function setRequestEmailFrom(?string $request_email_from) + { + if (is_null($request_email_from)) { + throw new InvalidArgumentException('non-nullable request_email_from cannot be null'); + } + $this->container['request_email_from'] = $request_email_from; + + return $this; + } + + /** + * Gets request_email_signature + * + * @return string|null + */ + public function getRequestEmailSignature() + { + return $this->container['request_email_signature']; + } + + /** + * Sets request_email_signature + * + * @param string|null $request_email_signature signature appended to signature request emails + * + * @return self + */ + public function setRequestEmailSignature(?string $request_email_signature) + { + if (is_null($request_email_signature)) { + throw new InvalidArgumentException('non-nullable request_email_signature cannot be null'); + } + $this->container['request_email_signature'] = $request_email_signature; + + return $this; + } + + /** + * Gets required_signature_types + * + * @return RequiredSignatureType[]|null + */ + public function getRequiredSignatureTypes() + { + return $this->container['required_signature_types']; + } + + /** + * Sets required_signature_types + * + * @param RequiredSignatureType[]|null $required_signature_types signature creation methods signers may use + * + * @return self + */ + public function setRequiredSignatureTypes(?array $required_signature_types) + { + if (is_null($required_signature_types)) { + throw new InvalidArgumentException('non-nullable required_signature_types cannot be null'); + } + + $this->container['required_signature_types'] = $required_signature_types; + + return $this; + } + + /** + * Gets should_enable_tamper_proof + * + * @return bool|null + */ + public function getShouldEnableTamperProof() + { + return $this->container['should_enable_tamper_proof']; + } + + /** + * Sets should_enable_tamper_proof + * + * @param bool|null $should_enable_tamper_proof whether completed documents include a digital tamper-proof seal + * + * @return self + */ + public function setShouldEnableTamperProof(?bool $should_enable_tamper_proof) + { + if (is_null($should_enable_tamper_proof)) { + throw new InvalidArgumentException('non-nullable should_enable_tamper_proof cannot be null'); + } + $this->container['should_enable_tamper_proof'] = $should_enable_tamper_proof; + + return $this; + } + + /** + * Gets should_include_distinct_pdfs + * + * @return bool|null + */ + public function getShouldIncludeDistinctPdfs() + { + return $this->container['should_include_distinct_pdfs']; + } + + /** + * Sets should_include_distinct_pdfs + * + * @param bool|null $should_include_distinct_pdfs whether completed documents remain as separate PDF files instead of being merged into one PDF + * + * @return self + */ + public function setShouldIncludeDistinctPdfs(?bool $should_include_distinct_pdfs) + { + if (is_null($should_include_distinct_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_distinct_pdfs cannot be null'); + } + $this->container['should_include_distinct_pdfs'] = $should_include_distinct_pdfs; + + return $this; + } + + /** + * Gets should_offer_signer_access_code + * + * @return bool|null + */ + public function getShouldOfferSignerAccessCode() + { + return $this->container['should_offer_signer_access_code']; + } + + /** + * Sets should_offer_signer_access_code + * + * @param bool|null $should_offer_signer_access_code whether senders can require an access code to verify a signer + * + * @return self + */ + public function setShouldOfferSignerAccessCode(?bool $should_offer_signer_access_code) + { + if (is_null($should_offer_signer_access_code)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_access_code cannot be null'); + } + $this->container['should_offer_signer_access_code'] = $should_offer_signer_access_code; + + return $this; + } + + /** + * Gets should_offer_signer_sms_authentication + * + * @return bool|null + */ + public function getShouldOfferSignerSmsAuthentication() + { + return $this->container['should_offer_signer_sms_authentication']; + } + + /** + * Sets should_offer_signer_sms_authentication + * + * @param bool|null $should_offer_signer_sms_authentication whether senders can require SMS authentication to verify a signer + * + * @return self + */ + public function setShouldOfferSignerSmsAuthentication(?bool $should_offer_signer_sms_authentication) + { + if (is_null($should_offer_signer_sms_authentication)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_sms_authentication cannot be null'); + } + $this->container['should_offer_signer_sms_authentication'] = $should_offer_signer_sms_authentication; + + return $this; + } + + /** + * Gets should_remove_document_id + * + * @return bool|null + */ + public function getShouldRemoveDocumentId() + { + return $this->container['should_remove_document_id']; + } + + /** + * Sets should_remove_document_id + * + * @param bool|null $should_remove_document_id whether the Dropbox Sign document ID is hidden on sent documents + * + * @return self + */ + public function setShouldRemoveDocumentId(?bool $should_remove_document_id) + { + if (is_null($should_remove_document_id)) { + throw new InvalidArgumentException('non-nullable should_remove_document_id cannot be null'); + } + $this->container['should_remove_document_id'] = $should_remove_document_id; + + return $this; + } + + /** + * Gets is_notify_on_sign_enabled + * + * @return bool|null + */ + public function getIsNotifyOnSignEnabled() + { + return $this->container['is_notify_on_sign_enabled']; + } + + /** + * Sets is_notify_on_sign_enabled + * + * @param bool|null $is_notify_on_sign_enabled whether to notify the account when someone signs a document it sent + * + * @return self + */ + public function setIsNotifyOnSignEnabled(?bool $is_notify_on_sign_enabled) + { + if (is_null($is_notify_on_sign_enabled)) { + throw new InvalidArgumentException('non-nullable is_notify_on_sign_enabled cannot be null'); + } + $this->container['is_notify_on_sign_enabled'] = $is_notify_on_sign_enabled; + + return $this; + } + + /** + * Gets is_notify_on_view_enabled + * + * @return bool|null + */ + public function getIsNotifyOnViewEnabled() + { + return $this->container['is_notify_on_view_enabled']; + } + + /** + * Sets is_notify_on_view_enabled + * + * @param bool|null $is_notify_on_view_enabled whether to notify the account when someone opens a document it sent + * + * @return self + */ + public function setIsNotifyOnViewEnabled(?bool $is_notify_on_view_enabled) + { + if (is_null($is_notify_on_view_enabled)) { + throw new InvalidArgumentException('non-nullable is_notify_on_view_enabled cannot be null'); + } + $this->container['is_notify_on_view_enabled'] = $is_notify_on_view_enabled; + + return $this; + } + + /** + * Gets should_autocomplete + * + * @return bool|null + */ + public function getShouldAutocomplete() + { + return $this->container['should_autocomplete']; + } + + /** + * Sets should_autocomplete + * + * @param bool|null $should_autocomplete whether values entered in text fields are saved and suggested for future signature requests + * + * @return self + */ + public function setShouldAutocomplete(?bool $should_autocomplete) + { + if (is_null($should_autocomplete)) { + throw new InvalidArgumentException('non-nullable should_autocomplete cannot be null'); + } + $this->container['should_autocomplete'] = $should_autocomplete; + + return $this; + } + + /** + * Gets should_include_requested_pdfs + * + * @return bool|null + */ + public function getShouldIncludeRequestedPdfs() + { + return $this->container['should_include_requested_pdfs']; + } + + /** + * Sets should_include_requested_pdfs + * + * @param bool|null $should_include_requested_pdfs whether completed signature requests include PDF copies in emails sent to the account + * + * @return self + */ + public function setShouldIncludeRequestedPdfs(?bool $should_include_requested_pdfs) + { + if (is_null($should_include_requested_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_requested_pdfs cannot be null'); + } + $this->container['should_include_requested_pdfs'] = $should_include_requested_pdfs; + + return $this; + } + + /** + * Gets should_include_requested_pdfs_for_others + * + * @return bool|null + */ + public function getShouldIncludeRequestedPdfsForOthers() + { + return $this->container['should_include_requested_pdfs_for_others']; + } + + /** + * Sets should_include_requested_pdfs_for_others + * + * @param bool|null $should_include_requested_pdfs_for_others whether completed signature requests include PDF copies in emails sent to signers and CC recipients + * + * @return self + */ + public function setShouldIncludeRequestedPdfsForOthers(?bool $should_include_requested_pdfs_for_others) + { + if (is_null($should_include_requested_pdfs_for_others)) { + throw new InvalidArgumentException('non-nullable should_include_requested_pdfs_for_others cannot be null'); + } + $this->container['should_include_requested_pdfs_for_others'] = $should_include_requested_pdfs_for_others; + + return $this; + } + + /** + * Gets should_include_sent_doc_pdfs + * + * @return bool|null + */ + public function getShouldIncludeSentDocPdfs() + { + return $this->container['should_include_sent_doc_pdfs']; + } + + /** + * Sets should_include_sent_doc_pdfs + * + * @param bool|null $should_include_sent_doc_pdfs whether emails sent to the account include PDF copies of documents it sends + * + * @return self + */ + public function setShouldIncludeSentDocPdfs(?bool $should_include_sent_doc_pdfs) + { + if (is_null($should_include_sent_doc_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_sent_doc_pdfs cannot be null'); + } + $this->container['should_include_sent_doc_pdfs'] = $should_include_sent_doc_pdfs; + + return $this; + } + + /** + * Gets should_include_sent_doc_pdfs_for_others + * + * @return bool|null + */ + public function getShouldIncludeSentDocPdfsForOthers() + { + return $this->container['should_include_sent_doc_pdfs_for_others']; + } + + /** + * Sets should_include_sent_doc_pdfs_for_others + * + * @param bool|null $should_include_sent_doc_pdfs_for_others whether emails sent to recipients include PDF copies of documents the account sends + * + * @return self + */ + public function setShouldIncludeSentDocPdfsForOthers(?bool $should_include_sent_doc_pdfs_for_others) + { + if (is_null($should_include_sent_doc_pdfs_for_others)) { + throw new InvalidArgumentException('non-nullable should_include_sent_doc_pdfs_for_others cannot be null'); + } + $this->container['should_include_sent_doc_pdfs_for_others'] = $should_include_sent_doc_pdfs_for_others; + + return $this; + } + + /** + * Gets should_send_daily_summary + * + * @return bool|null + */ + public function getShouldSendDailySummary() + { + return $this->container['should_send_daily_summary']; + } + + /** + * Sets should_send_daily_summary + * + * @param bool|null $should_send_daily_summary whether to send the account a daily email summarizing outstanding signature requests + * + * @return self + */ + public function setShouldSendDailySummary(?bool $should_send_daily_summary) + { + if (is_null($should_send_daily_summary)) { + throw new InvalidArgumentException('non-nullable should_send_daily_summary cannot be null'); + } + $this->container['should_send_daily_summary'] = $should_send_daily_summary; + + return $this; + } + + /** + * Gets should_send_embedded_signature_conf_emails + * + * @return bool|null + */ + public function getShouldSendEmbeddedSignatureConfEmails() + { + return $this->container['should_send_embedded_signature_conf_emails']; + } + + /** + * Sets should_send_embedded_signature_conf_emails + * + * @param bool|null $should_send_embedded_signature_conf_emails whether to notify the account when it signs a document on a third-party site + * + * @return self + */ + public function setShouldSendEmbeddedSignatureConfEmails(?bool $should_send_embedded_signature_conf_emails) + { + if (is_null($should_send_embedded_signature_conf_emails)) { + throw new InvalidArgumentException('non-nullable should_send_embedded_signature_conf_emails cannot be null'); + } + $this->container['should_send_embedded_signature_conf_emails'] = $should_send_embedded_signature_conf_emails; + + return $this; + } + + /** + * Gets should_send_ordered_sr_email + * + * @return bool|null + */ + public function getShouldSendOrderedSrEmail() + { + return $this->container['should_send_ordered_sr_email']; + } + + /** + * Sets should_send_ordered_sr_email + * + * @param bool|null $should_send_ordered_sr_email whether to notify all parties when an ordered signature request starts + * + * @return self + */ + public function setShouldSendOrderedSrEmail(?bool $should_send_ordered_sr_email) + { + if (is_null($should_send_ordered_sr_email)) { + throw new InvalidArgumentException('non-nullable should_send_ordered_sr_email cannot be null'); + } + $this->container['should_send_ordered_sr_email'] = $should_send_ordered_sr_email; + + return $this; + } + + /** + * Gets should_send_outbound_conf_emails + * + * @return bool|null + */ + public function getShouldSendOutboundConfEmails() + { + return $this->container['should_send_outbound_conf_emails']; + } + + /** + * Sets should_send_outbound_conf_emails + * + * @param bool|null $should_send_outbound_conf_emails whether to notify the account when it signs and sends a document + * + * @return self + */ + public function setShouldSendOutboundConfEmails(?bool $should_send_outbound_conf_emails) + { + if (is_null($should_send_outbound_conf_emails)) { + throw new InvalidArgumentException('non-nullable should_send_outbound_conf_emails cannot be null'); + } + $this->container['should_send_outbound_conf_emails'] = $should_send_outbound_conf_emails; + + return $this; + } + + /** + * Gets template_link_signature_emails_enabled + * + * @return bool|null + */ + public function getTemplateLinkSignatureEmailsEnabled() + { + return $this->container['template_link_signature_emails_enabled']; + } + + /** + * Sets template_link_signature_emails_enabled + * + * @param bool|null $template_link_signature_emails_enabled whether to notify the account when someone signs a document sent by its team through a template link + * + * @return self + */ + public function setTemplateLinkSignatureEmailsEnabled(?bool $template_link_signature_emails_enabled) + { + if (is_null($template_link_signature_emails_enabled)) { + throw new InvalidArgumentException('non-nullable template_link_signature_emails_enabled cannot be null'); + } + $this->container['template_link_signature_emails_enabled'] = $template_link_signature_emails_enabled; + + return $this; + } + + /** + * Gets unset + * + * @return string[]|null + */ + public function getUnset() + { + return $this->container['unset']; + } + + /** + * Sets unset + * + * @param string[]|null $unset Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + * + * @return self + */ + public function setUnset(?array $unset) + { + if (is_null($unset)) { + throw new InvalidArgumentException('non-nullable unset cannot be null'); + } + $allowedValues = $this->getUnsetAllowableValues(); + if (array_diff($unset, $allowedValues)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value for 'unset', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + + $this->container['unset'] = $unset; + + 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/BooleanSettingUpdate.php b/sdks/php/src/Model/BooleanSettingUpdate.php new file mode 100644 index 000000000..af316de9b --- /dev/null +++ b/sdks/php/src/Model/BooleanSettingUpdate.php @@ -0,0 +1,446 @@ + + */ +class BooleanSettingUpdate implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BooleanSettingUpdate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => 'bool', + 'lock_mode' => '\Dropbox\Sign\Model\TeamSettingLock', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'lock_mode' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => false, + 'lock_mode' => 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 = [ + 'value' => 'value', + 'lock_mode' => 'lock_mode', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'lock_mode' => 'setLockMode', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'lock_mode' => 'getLockMode', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('lock_mode', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): BooleanSettingUpdate + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): BooleanSettingUpdate + { + /** @var BooleanSettingUpdate */ + return ObjectSerializer::deserialize( + $data, + BooleanSettingUpdate::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() + { + return []; + } + + /** + * 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 value + * + * @return bool|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param bool|null $value boolean value to store + * + * @return self + */ + public function setValue(?bool $value) + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets lock_mode + * + * @return TeamSettingLock|null + */ + public function getLockMode() + { + return $this->container['lock_mode']; + } + + /** + * Sets lock_mode + * + * @param TeamSettingLock|null $lock_mode lock_mode + * + * @return self + */ + public function setLockMode(?TeamSettingLock $lock_mode) + { + if (is_null($lock_mode)) { + throw new InvalidArgumentException('non-nullable lock_mode cannot be null'); + } + $this->container['lock_mode'] = $lock_mode; + + 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/DataResidency.php b/sdks/php/src/Model/DataResidency.php new file mode 100644 index 000000000..a32b57011 --- /dev/null +++ b/sdks/php/src/Model/DataResidency.php @@ -0,0 +1,69 @@ + + */ +class DataResidencySettingUpdate implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataResidencySettingUpdate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => '\Dropbox\Sign\Model\DataResidency', + 'lock_mode' => '\Dropbox\Sign\Model\TeamSettingLock', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'lock_mode' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => false, + 'lock_mode' => 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 = [ + 'value' => 'value', + 'lock_mode' => 'lock_mode', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'lock_mode' => 'setLockMode', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'lock_mode' => 'getLockMode', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('lock_mode', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): DataResidencySettingUpdate + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): DataResidencySettingUpdate + { + /** @var DataResidencySettingUpdate */ + return ObjectSerializer::deserialize( + $data, + DataResidencySettingUpdate::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() + { + return []; + } + + /** + * 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 value + * + * @return DataResidency|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param DataResidency|null $value value + * + * @return self + */ + public function setValue(?DataResidency $value) + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets lock_mode + * + * @return TeamSettingLock|null + */ + public function getLockMode() + { + return $this->container['lock_mode']; + } + + /** + * Sets lock_mode + * + * @param TeamSettingLock|null $lock_mode lock_mode + * + * @return self + */ + public function setLockMode(?TeamSettingLock $lock_mode) + { + if (is_null($lock_mode)) { + throw new InvalidArgumentException('non-nullable lock_mode cannot be null'); + } + $this->container['lock_mode'] = $lock_mode; + + 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/DateFormat.php b/sdks/php/src/Model/DateFormat.php new file mode 100644 index 000000000..7ef433034 --- /dev/null +++ b/sdks/php/src/Model/DateFormat.php @@ -0,0 +1,60 @@ + + */ +class DateFormatSettingUpdate implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DateFormatSettingUpdate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => '\Dropbox\Sign\Model\DateFormat', + 'lock_mode' => '\Dropbox\Sign\Model\TeamSettingLock', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'lock_mode' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => false, + 'lock_mode' => 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 = [ + 'value' => 'value', + 'lock_mode' => 'lock_mode', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'lock_mode' => 'setLockMode', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'lock_mode' => 'getLockMode', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('lock_mode', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): DateFormatSettingUpdate + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): DateFormatSettingUpdate + { + /** @var DateFormatSettingUpdate */ + return ObjectSerializer::deserialize( + $data, + DateFormatSettingUpdate::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() + { + return []; + } + + /** + * 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 value + * + * @return DateFormat|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param DateFormat|null $value value + * + * @return self + */ + public function setValue(?DateFormat $value) + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets lock_mode + * + * @return TeamSettingLock|null + */ + public function getLockMode() + { + return $this->container['lock_mode']; + } + + /** + * Sets lock_mode + * + * @param TeamSettingLock|null $lock_mode lock_mode + * + * @return self + */ + public function setLockMode(?TeamSettingLock $lock_mode) + { + if (is_null($lock_mode)) { + throw new InvalidArgumentException('non-nullable lock_mode cannot be null'); + } + $this->container['lock_mode'] = $lock_mode; + + 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/RequiredSignatureType.php b/sdks/php/src/Model/RequiredSignatureType.php new file mode 100644 index 000000000..7576f0e91 --- /dev/null +++ b/sdks/php/src/Model/RequiredSignatureType.php @@ -0,0 +1,63 @@ + + */ +class RequiredSignatureTypesSettingUpdate implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RequiredSignatureTypesSettingUpdate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => '\Dropbox\Sign\Model\RequiredSignatureType[]', + 'lock_mode' => '\Dropbox\Sign\Model\TeamSettingLock', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'lock_mode' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => false, + 'lock_mode' => 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 = [ + 'value' => 'value', + 'lock_mode' => 'lock_mode', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'lock_mode' => 'setLockMode', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'lock_mode' => 'getLockMode', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('lock_mode', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): RequiredSignatureTypesSettingUpdate + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): RequiredSignatureTypesSettingUpdate + { + /** @var RequiredSignatureTypesSettingUpdate */ + return ObjectSerializer::deserialize( + $data, + RequiredSignatureTypesSettingUpdate::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() + { + return []; + } + + /** + * 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 value + * + * @return RequiredSignatureType[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param RequiredSignatureType[]|null $value signature creation methods signers may use + * + * @return self + */ + public function setValue(?array $value) + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets lock_mode + * + * @return TeamSettingLock|null + */ + public function getLockMode() + { + return $this->container['lock_mode']; + } + + /** + * Sets lock_mode + * + * @param TeamSettingLock|null $lock_mode lock_mode + * + * @return self + */ + public function setLockMode(?TeamSettingLock $lock_mode) + { + if (is_null($lock_mode)) { + throw new InvalidArgumentException('non-nullable lock_mode cannot be null'); + } + $this->container['lock_mode'] = $lock_mode; + + 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/SettingLockResponse.php b/sdks/php/src/Model/SettingLockResponse.php new file mode 100644 index 000000000..99b33234f --- /dev/null +++ b/sdks/php/src/Model/SettingLockResponse.php @@ -0,0 +1,490 @@ + + */ +class SettingLockResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SettingLockResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'mode' => '\Dropbox\Sign\Model\TeamSettingLock', + 'source' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'mode' => null, + 'source' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'mode' => false, + 'source' => 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 = [ + 'mode' => 'mode', + 'source' => 'source', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mode' => 'setMode', + 'source' => 'setSource', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mode' => 'getMode', + 'source' => 'getSource', + ]; + + /** + * 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 SOURCE_TEAM = 'team'; + public const SOURCE_PARENT_TEAM = 'parent_team'; + public const SOURCE__DEFAULT = 'default'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_TEAM, + self::SOURCE_PARENT_TEAM, + self::SOURCE__DEFAULT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('mode', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SettingLockResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SettingLockResponse + { + /** @var SettingLockResponse */ + return ObjectSerializer::deserialize( + $data, + SettingLockResponse::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['mode'] === null) { + $invalidProperties[] = "'mode' can't be null"; + } + if ($this->container['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + 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 mode + * + * @return TeamSettingLock + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param TeamSettingLock $mode mode + * + * @return self + */ + public function setMode(TeamSettingLock $mode) + { + if (is_null($mode)) { + throw new InvalidArgumentException('non-nullable mode cannot be null'); + } + $this->container['mode'] = $mode; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source source + * + * @return self + */ + public function setSource(string $source) + { + if (is_null($source)) { + throw new InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + 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/SettingResponse.php b/sdks/php/src/Model/SettingResponse.php new file mode 100644 index 000000000..7f0aee575 --- /dev/null +++ b/sdks/php/src/Model/SettingResponse.php @@ -0,0 +1,685 @@ + + */ +class SettingResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SettingResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => 'mixed', + 'is_inherited' => 'bool', + 'source' => 'string', + 'type' => 'string', + 'writable' => 'bool', + 'lock' => '\Dropbox\Sign\Model\SettingLockResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'is_inherited' => null, + 'source' => null, + 'type' => null, + 'writable' => null, + 'lock' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => true, + 'is_inherited' => false, + 'source' => false, + 'type' => false, + 'writable' => false, + 'lock' => 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 = [ + 'value' => 'value', + 'is_inherited' => 'is_inherited', + 'source' => 'source', + 'type' => 'type', + 'writable' => 'writable', + 'lock' => 'lock', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'is_inherited' => 'setIsInherited', + 'source' => 'setSource', + 'type' => 'setType', + 'writable' => 'setWritable', + 'lock' => 'setLock', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'is_inherited' => 'getIsInherited', + 'source' => 'getSource', + 'type' => 'getType', + 'writable' => 'getWritable', + 'lock' => 'getLock', + ]; + + /** + * 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 SOURCE_ACCOUNT = 'account'; + public const SOURCE_TEAM = 'team'; + public const SOURCE_PARENT_TEAM = 'parent_team'; + public const SOURCE__DEFAULT = 'default'; + public const TYPE_BOOLEAN = 'boolean'; + public const TYPE_INTEGER = 'integer'; + public const TYPE_STRING = 'string'; + public const TYPE__ARRAY = 'array'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_ACCOUNT, + self::SOURCE_TEAM, + self::SOURCE_PARENT_TEAM, + self::SOURCE__DEFAULT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BOOLEAN, + self::TYPE_INTEGER, + self::TYPE_STRING, + self::TYPE__ARRAY, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('is_inherited', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('writable', $data ?? [], null); + $this->setIfExists('lock', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SettingResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SettingResponse + { + /** @var SettingResponse */ + return ObjectSerializer::deserialize( + $data, + SettingResponse::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['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ($this->container['is_inherited'] === null) { + $invalidProperties[] = "'is_inherited' can't be null"; + } + if ($this->container['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'source', must be one of '%s'", + $this->container['source'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['writable'] === null) { + $invalidProperties[] = "'writable' can't be null"; + } + if ($this->container['lock'] === null) { + $invalidProperties[] = "'lock' 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 value + * + * @return mixed + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param mixed $value Current value of the setting. Null when the setting has no value. + * + * @return self + */ + public function setValue(mixed $value) + { + if (is_null($value)) { + array_push($this->openAPINullablesSetToNull, 'value'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('value', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets is_inherited + * + * @return bool + */ + public function getIsInherited() + { + return $this->container['is_inherited']; + } + + /** + * Sets is_inherited + * + * @param bool $is_inherited is_inherited + * + * @return self + */ + public function setIsInherited(bool $is_inherited) + { + if (is_null($is_inherited)) { + throw new InvalidArgumentException('non-nullable is_inherited cannot be null'); + } + $this->container['is_inherited'] = $is_inherited; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source source + * + * @return self + */ + public function setSource(string $source) + { + if (is_null($source)) { + throw new InvalidArgumentException('non-nullable source cannot be null'); + } + $allowedValues = $this->getSourceAllowableValues(); + if (!in_array($source, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'source', must be one of '%s'", + $source, + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType(string $type) + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets writable + * + * @return bool + */ + public function getWritable() + { + return $this->container['writable']; + } + + /** + * Sets writable + * + * @param bool $writable writable + * + * @return self + */ + public function setWritable(bool $writable) + { + if (is_null($writable)) { + throw new InvalidArgumentException('non-nullable writable cannot be null'); + } + $this->container['writable'] = $writable; + + return $this; + } + + /** + * Gets lock + * + * @return SettingLockResponse + */ + public function getLock() + { + return $this->container['lock']; + } + + /** + * Sets lock + * + * @param SettingLockResponse $lock lock + * + * @return self + */ + public function setLock(SettingLockResponse $lock) + { + if (is_null($lock)) { + throw new InvalidArgumentException('non-nullable lock cannot be null'); + } + $this->container['lock'] = $lock; + + 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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php index ce85cb62f..b61e2491d 100644 --- a/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php @@ -385,6 +385,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; } + if (!is_null($this->container['metadata']) && (count($this->container['metadata']) > 10)) { + $invalidProperties[] = "invalid value for 'metadata', number of items must be less than or equal to 10."; + } + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; } @@ -640,7 +644,7 @@ public function getMetadata() /** * Sets metadata * - * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @param array|null $metadata _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA * * @return self */ @@ -650,6 +654,9 @@ public function setMetadata(?array $metadata) throw new InvalidArgumentException('non-nullable metadata cannot be null'); } + if (count($metadata) > 10) { + throw new InvalidArgumentException('invalid value for $metadata when calling SignatureRequestBulkCreateEmbeddedWithTemplateRequest., number of items must be less than or equal to 10.'); + } $this->container['metadata'] = $metadata; return $this; diff --git a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php index 13c584b47..c46234d39 100644 --- a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php @@ -382,6 +382,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; } + if (!is_null($this->container['metadata']) && (count($this->container['metadata']) > 10)) { + $invalidProperties[] = "invalid value for 'metadata', number of items must be less than or equal to 10."; + } + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; } @@ -637,7 +641,7 @@ public function getMetadata() /** * Sets metadata * - * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @param array|null $metadata _t__SignatureRequestBulkSendWithTemplate::METADATA * * @return self */ @@ -647,6 +651,9 @@ public function setMetadata(?array $metadata) throw new InvalidArgumentException('non-nullable metadata cannot be null'); } + if (count($metadata) > 10) { + throw new InvalidArgumentException('invalid value for $metadata when calling SignatureRequestBulkSendWithTemplateRequest., number of items must be less than or equal to 10.'); + } $this->container['metadata'] = $metadata; return $this; diff --git a/sdks/php/src/Model/StringSettingUpdate.php b/sdks/php/src/Model/StringSettingUpdate.php new file mode 100644 index 000000000..36f2466b9 --- /dev/null +++ b/sdks/php/src/Model/StringSettingUpdate.php @@ -0,0 +1,446 @@ + + */ +class StringSettingUpdate implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'StringSettingUpdate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'value' => 'string', + 'lock_mode' => '\Dropbox\Sign\Model\TeamSettingLock', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'value' => null, + 'lock_mode' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'value' => false, + 'lock_mode' => 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 = [ + 'value' => 'value', + 'lock_mode' => 'lock_mode', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'value' => 'setValue', + 'lock_mode' => 'setLockMode', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'value' => 'getValue', + 'lock_mode' => 'getLockMode', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('lock_mode', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): StringSettingUpdate + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): StringSettingUpdate + { + /** @var StringSettingUpdate */ + return ObjectSerializer::deserialize( + $data, + StringSettingUpdate::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() + { + return []; + } + + /** + * 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 value + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value string value to store + * + * @return self + */ + public function setValue(?string $value) + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets lock_mode + * + * @return TeamSettingLock|null + */ + public function getLockMode() + { + return $this->container['lock_mode']; + } + + /** + * Sets lock_mode + * + * @param TeamSettingLock|null $lock_mode lock_mode + * + * @return self + */ + public function setLockMode(?TeamSettingLock $lock_mode) + { + if (is_null($lock_mode)) { + throw new InvalidArgumentException('non-nullable lock_mode cannot be null'); + } + $this->container['lock_mode'] = $lock_mode; + + 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/SubBulkSignerList.php b/sdks/php/src/Model/SubBulkSignerList.php index 795441cb3..2fad69c73 100644 --- a/sdks/php/src/Model/SubBulkSignerList.php +++ b/sdks/php/src/Model/SubBulkSignerList.php @@ -59,6 +59,7 @@ class SubBulkSignerList implements ModelInterface, ArrayAccess, JsonSerializable protected static $openAPITypes = [ 'custom_fields' => '\Dropbox\Sign\Model\SubBulkSignerListCustomField[]', 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'metadata' => 'array', ]; /** @@ -71,6 +72,7 @@ class SubBulkSignerList implements ModelInterface, ArrayAccess, JsonSerializable protected static $openAPIFormats = [ 'custom_fields' => null, 'signers' => null, + 'metadata' => null, ]; /** @@ -81,6 +83,7 @@ class SubBulkSignerList implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPINullables = [ 'custom_fields' => false, 'signers' => false, + 'metadata' => false, ]; /** @@ -163,6 +166,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'custom_fields' => 'custom_fields', 'signers' => 'signers', + 'metadata' => 'metadata', ]; /** @@ -173,6 +177,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'custom_fields' => 'setCustomFields', 'signers' => 'setSigners', + 'metadata' => 'setMetadata', ]; /** @@ -183,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'custom_fields' => 'getCustomFields', 'signers' => 'getSigners', + 'metadata' => 'getMetadata', ]; /** @@ -243,6 +249,7 @@ public function __construct(?array $data = null) { $this->setIfExists('custom_fields', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); } /** @@ -288,7 +295,13 @@ private function setIfExists(string $variableName, array $fields, $defaultValue) */ public function listInvalidProperties() { - return []; + $invalidProperties = []; + + if (!is_null($this->container['metadata']) && (count($this->container['metadata']) > 10)) { + $invalidProperties[] = "invalid value for 'metadata', number of items must be less than or equal to 10."; + } + + return $invalidProperties; } /** @@ -356,6 +369,37 @@ public function setSigners(?array $signers) return $this; } + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata _t__Sub::BulkSigner::METADATA + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + if (count($metadata) > 10) { + throw new InvalidArgumentException('invalid value for $metadata when calling SubBulkSignerList., number of items must be less than or equal to 10.'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TeamCreateRequest.php b/sdks/php/src/Model/TeamCreateRequest.php index 452badc96..afb67263c 100644 --- a/sdks/php/src/Model/TeamCreateRequest.php +++ b/sdks/php/src/Model/TeamCreateRequest.php @@ -58,6 +58,7 @@ class TeamCreateRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static $openAPITypes = [ 'name' => 'string', + 'parent_team_id' => 'string', ]; /** @@ -69,6 +70,7 @@ class TeamCreateRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static $openAPIFormats = [ 'name' => null, + 'parent_team_id' => null, ]; /** @@ -78,6 +80,7 @@ class TeamCreateRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'name' => false, + 'parent_team_id' => false, ]; /** @@ -159,6 +162,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'name' => 'name', + 'parent_team_id' => 'parent_team_id', ]; /** @@ -168,6 +172,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'name' => 'setName', + 'parent_team_id' => 'setParentTeamId', ]; /** @@ -177,6 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'name' => 'getName', + 'parent_team_id' => 'getParentTeamId', ]; /** @@ -236,6 +242,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], 'Untitled Team'); + $this->setIfExists('parent_team_id', $data ?? [], null); } /** @@ -322,6 +329,33 @@ public function setName(?string $name) return $this; } + /** + * Gets parent_team_id + * + * @return string|null + */ + public function getParentTeamId() + { + return $this->container['parent_team_id']; + } + + /** + * Sets parent_team_id + * + * @param string|null $parent_team_id _t__TeamCreate::PARENT_TEAM_ID + * + * @return self + */ + public function setParentTeamId(?string $parent_team_id) + { + if (is_null($parent_team_id)) { + throw new InvalidArgumentException('non-nullable parent_team_id cannot be null'); + } + $this->container['parent_team_id'] = $parent_team_id; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/php/src/Model/TeamResponse.php b/sdks/php/src/Model/TeamResponse.php index ca161d761..75b3005ad 100644 --- a/sdks/php/src/Model/TeamResponse.php +++ b/sdks/php/src/Model/TeamResponse.php @@ -58,6 +58,8 @@ class TeamResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'team_id' => 'string', + 'parent_team_id' => 'string', 'name' => 'string', 'accounts' => '\Dropbox\Sign\Model\AccountResponse[]', 'invited_accounts' => '\Dropbox\Sign\Model\AccountResponse[]', @@ -72,6 +74,8 @@ class TeamResponse implements ModelInterface, ArrayAccess, JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'team_id' => null, + 'parent_team_id' => null, 'name' => null, 'accounts' => null, 'invited_accounts' => null, @@ -84,6 +88,8 @@ class TeamResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var bool[] */ protected static array $openAPINullables = [ + 'team_id' => false, + 'parent_team_id' => false, 'name' => false, 'accounts' => false, 'invited_accounts' => false, @@ -168,6 +174,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'team_id' => 'team_id', + 'parent_team_id' => 'parent_team_id', 'name' => 'name', 'accounts' => 'accounts', 'invited_accounts' => 'invited_accounts', @@ -180,6 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'team_id' => 'setTeamId', + 'parent_team_id' => 'setParentTeamId', 'name' => 'setName', 'accounts' => 'setAccounts', 'invited_accounts' => 'setInvitedAccounts', @@ -192,6 +202,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'team_id' => 'getTeamId', + 'parent_team_id' => 'getParentTeamId', 'name' => 'getName', 'accounts' => 'getAccounts', 'invited_accounts' => 'getInvitedAccounts', @@ -254,6 +266,8 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('team_id', $data ?? [], null); + $this->setIfExists('parent_team_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accounts', $data ?? [], null); $this->setIfExists('invited_accounts', $data ?? [], null); @@ -317,6 +331,60 @@ public function valid() return count($this->listInvalidProperties()) === 0; } + /** + * Gets team_id + * + * @return string|null + */ + public function getTeamId() + { + return $this->container['team_id']; + } + + /** + * Sets team_id + * + * @param string|null $team_id The id of a team + * + * @return self + */ + public function setTeamId(?string $team_id) + { + if (is_null($team_id)) { + throw new InvalidArgumentException('non-nullable team_id cannot be null'); + } + $this->container['team_id'] = $team_id; + + return $this; + } + + /** + * Gets parent_team_id + * + * @return string|null + */ + public function getParentTeamId() + { + return $this->container['parent_team_id']; + } + + /** + * Sets parent_team_id + * + * @param string|null $parent_team_id _t__Team::PARENT_TEAM_ID + * + * @return self + */ + public function setParentTeamId(?string $parent_team_id) + { + if (is_null($parent_team_id)) { + throw new InvalidArgumentException('non-nullable parent_team_id cannot be null'); + } + $this->container['parent_team_id'] = $parent_team_id; + + return $this; + } + /** * Gets name * diff --git a/sdks/php/src/Model/TeamSettingLock.php b/sdks/php/src/Model/TeamSettingLock.php new file mode 100644 index 000000000..a902d5e02 --- /dev/null +++ b/sdks/php/src/Model/TeamSettingLock.php @@ -0,0 +1,60 @@ + + */ +class TeamSettingsResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TeamSettingsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'team_id' => 'string', + 'settings' => '\Dropbox\Sign\Model\TeamSettingsResponseSettings', + '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 = [ + 'team_id' => null, + 'settings' => null, + 'warnings' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'team_id' => false, + 'settings' => 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 = [ + 'team_id' => 'team_id', + 'settings' => 'settings', + 'warnings' => 'warnings', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'team_id' => 'setTeamId', + 'settings' => 'setSettings', + 'warnings' => 'setWarnings', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'team_id' => 'getTeamId', + 'settings' => 'getSettings', + '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[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('team_id', $data ?? [], null); + $this->setIfExists('settings', $data ?? [], null); + $this->setIfExists('warnings', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): TeamSettingsResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): TeamSettingsResponse + { + /** @var TeamSettingsResponse */ + return ObjectSerializer::deserialize( + $data, + TeamSettingsResponse::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['team_id'] === null) { + $invalidProperties[] = "'team_id' can't be null"; + } + if ($this->container['settings'] === null) { + $invalidProperties[] = "'settings' 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 team_id + * + * @return string + */ + public function getTeamId() + { + return $this->container['team_id']; + } + + /** + * Sets team_id + * + * @param string $team_id team_id + * + * @return self + */ + public function setTeamId(string $team_id) + { + if (is_null($team_id)) { + throw new InvalidArgumentException('non-nullable team_id cannot be null'); + } + $this->container['team_id'] = $team_id; + + return $this; + } + + /** + * Gets settings + * + * @return TeamSettingsResponseSettings + */ + public function getSettings() + { + return $this->container['settings']; + } + + /** + * Sets settings + * + * @param TeamSettingsResponseSettings $settings settings + * + * @return self + */ + public function setSettings(TeamSettingsResponseSettings $settings) + { + if (is_null($settings)) { + throw new InvalidArgumentException('non-nullable settings cannot be null'); + } + $this->container['settings'] = $settings; + + 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/TeamSettingsResponseSettings.php b/sdks/php/src/Model/TeamSettingsResponseSettings.php new file mode 100644 index 000000000..868e63779 --- /dev/null +++ b/sdks/php/src/Model/TeamSettingsResponseSettings.php @@ -0,0 +1,1304 @@ + + */ +class TeamSettingsResponseSettings implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TeamSettingsResponseSettings'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'company' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_signing_redirect_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_signing_redirect_url' => '\Dropbox\Sign\Model\SettingResponse', + 'custom_tagline' => '\Dropbox\Sign\Model\SettingResponse', + 'date_format' => '\Dropbox\Sign\Model\SettingResponse', + 'is_signature_reminders_enabled' => '\Dropbox\Sign\Model\SettingResponse', + 'request_email_from' => '\Dropbox\Sign\Model\SettingResponse', + 'request_email_signature' => '\Dropbox\Sign\Model\SettingResponse', + 'required_signature_types' => '\Dropbox\Sign\Model\SettingResponse', + 'should_enable_tamper_proof' => '\Dropbox\Sign\Model\SettingResponse', + 'should_include_distinct_pdfs' => '\Dropbox\Sign\Model\SettingResponse', + 'should_offer_signer_access_code' => '\Dropbox\Sign\Model\SettingResponse', + 'should_offer_signer_sms_authentication' => '\Dropbox\Sign\Model\SettingResponse', + 'should_remove_document_id' => '\Dropbox\Sign\Model\SettingResponse', + 'data_residency' => '\Dropbox\Sign\Model\SettingResponse', + 'allow_team_delete_document_for_everyone' => '\Dropbox\Sign\Model\SettingResponse', + 'allow_team_download_csv' => '\Dropbox\Sign\Model\SettingResponse', + 'lock_team_template_creation' => '\Dropbox\Sign\Model\SettingResponse', + 'lock_team_template_gallery' => '\Dropbox\Sign\Model\SettingResponse', + 'self_sign_message' => '\Dropbox\Sign\Model\SettingResponse', + 'self_sign_title' => '\Dropbox\Sign\Model\SettingResponse', + 'signature_request_message' => '\Dropbox\Sign\Model\SettingResponse', + 'signature_request_title' => '\Dropbox\Sign\Model\SettingResponse', + 'multifactor_auth_app' => '\Dropbox\Sign\Model\SettingResponse', + 'multifactor_auth_sms' => '\Dropbox\Sign\Model\SettingResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'company' => null, + 'custom_signing_redirect_enabled' => null, + 'custom_signing_redirect_url' => null, + 'custom_tagline' => null, + 'date_format' => null, + 'is_signature_reminders_enabled' => null, + 'request_email_from' => null, + 'request_email_signature' => null, + 'required_signature_types' => null, + 'should_enable_tamper_proof' => null, + 'should_include_distinct_pdfs' => null, + 'should_offer_signer_access_code' => null, + 'should_offer_signer_sms_authentication' => null, + 'should_remove_document_id' => null, + 'data_residency' => null, + 'allow_team_delete_document_for_everyone' => null, + 'allow_team_download_csv' => null, + 'lock_team_template_creation' => null, + 'lock_team_template_gallery' => null, + 'self_sign_message' => null, + 'self_sign_title' => null, + 'signature_request_message' => null, + 'signature_request_title' => null, + 'multifactor_auth_app' => null, + 'multifactor_auth_sms' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'company' => false, + 'custom_signing_redirect_enabled' => false, + 'custom_signing_redirect_url' => false, + 'custom_tagline' => false, + 'date_format' => false, + 'is_signature_reminders_enabled' => false, + 'request_email_from' => false, + 'request_email_signature' => false, + 'required_signature_types' => false, + 'should_enable_tamper_proof' => false, + 'should_include_distinct_pdfs' => false, + 'should_offer_signer_access_code' => false, + 'should_offer_signer_sms_authentication' => false, + 'should_remove_document_id' => false, + 'data_residency' => false, + 'allow_team_delete_document_for_everyone' => false, + 'allow_team_download_csv' => false, + 'lock_team_template_creation' => false, + 'lock_team_template_gallery' => false, + 'self_sign_message' => false, + 'self_sign_title' => false, + 'signature_request_message' => false, + 'signature_request_title' => false, + 'multifactor_auth_app' => false, + 'multifactor_auth_sms' => 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 = [ + 'company' => 'company', + 'custom_signing_redirect_enabled' => 'custom_signing_redirect_enabled', + 'custom_signing_redirect_url' => 'custom_signing_redirect_url', + 'custom_tagline' => 'custom_tagline', + 'date_format' => 'date_format', + 'is_signature_reminders_enabled' => 'is_signature_reminders_enabled', + 'request_email_from' => 'request_email_from', + 'request_email_signature' => 'request_email_signature', + 'required_signature_types' => 'required_signature_types', + 'should_enable_tamper_proof' => 'should_enable_tamper_proof', + 'should_include_distinct_pdfs' => 'should_include_distinct_pdfs', + 'should_offer_signer_access_code' => 'should_offer_signer_access_code', + 'should_offer_signer_sms_authentication' => 'should_offer_signer_sms_authentication', + 'should_remove_document_id' => 'should_remove_document_id', + 'data_residency' => 'data_residency', + 'allow_team_delete_document_for_everyone' => 'allow_team_delete_document_for_everyone', + 'allow_team_download_csv' => 'allow_team_download_csv', + 'lock_team_template_creation' => 'lock_team_template_creation', + 'lock_team_template_gallery' => 'lock_team_template_gallery', + 'self_sign_message' => 'self_sign_message', + 'self_sign_title' => 'self_sign_title', + 'signature_request_message' => 'signature_request_message', + 'signature_request_title' => 'signature_request_title', + 'multifactor_auth_app' => 'multifactor_auth_app', + 'multifactor_auth_sms' => 'multifactor_auth_sms', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company' => 'setCompany', + 'custom_signing_redirect_enabled' => 'setCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'setCustomSigningRedirectUrl', + 'custom_tagline' => 'setCustomTagline', + 'date_format' => 'setDateFormat', + 'is_signature_reminders_enabled' => 'setIsSignatureRemindersEnabled', + 'request_email_from' => 'setRequestEmailFrom', + 'request_email_signature' => 'setRequestEmailSignature', + 'required_signature_types' => 'setRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'setShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'setShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'setShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'setShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'setShouldRemoveDocumentId', + 'data_residency' => 'setDataResidency', + 'allow_team_delete_document_for_everyone' => 'setAllowTeamDeleteDocumentForEveryone', + 'allow_team_download_csv' => 'setAllowTeamDownloadCsv', + 'lock_team_template_creation' => 'setLockTeamTemplateCreation', + 'lock_team_template_gallery' => 'setLockTeamTemplateGallery', + 'self_sign_message' => 'setSelfSignMessage', + 'self_sign_title' => 'setSelfSignTitle', + 'signature_request_message' => 'setSignatureRequestMessage', + 'signature_request_title' => 'setSignatureRequestTitle', + 'multifactor_auth_app' => 'setMultifactorAuthApp', + 'multifactor_auth_sms' => 'setMultifactorAuthSms', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company' => 'getCompany', + 'custom_signing_redirect_enabled' => 'getCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'getCustomSigningRedirectUrl', + 'custom_tagline' => 'getCustomTagline', + 'date_format' => 'getDateFormat', + 'is_signature_reminders_enabled' => 'getIsSignatureRemindersEnabled', + 'request_email_from' => 'getRequestEmailFrom', + 'request_email_signature' => 'getRequestEmailSignature', + 'required_signature_types' => 'getRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'getShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'getShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'getShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'getShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'getShouldRemoveDocumentId', + 'data_residency' => 'getDataResidency', + 'allow_team_delete_document_for_everyone' => 'getAllowTeamDeleteDocumentForEveryone', + 'allow_team_download_csv' => 'getAllowTeamDownloadCsv', + 'lock_team_template_creation' => 'getLockTeamTemplateCreation', + 'lock_team_template_gallery' => 'getLockTeamTemplateGallery', + 'self_sign_message' => 'getSelfSignMessage', + 'self_sign_title' => 'getSelfSignTitle', + 'signature_request_message' => 'getSignatureRequestMessage', + 'signature_request_title' => 'getSignatureRequestTitle', + 'multifactor_auth_app' => 'getMultifactorAuthApp', + 'multifactor_auth_sms' => 'getMultifactorAuthSms', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('company', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_enabled', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_url', $data ?? [], null); + $this->setIfExists('custom_tagline', $data ?? [], null); + $this->setIfExists('date_format', $data ?? [], null); + $this->setIfExists('is_signature_reminders_enabled', $data ?? [], null); + $this->setIfExists('request_email_from', $data ?? [], null); + $this->setIfExists('request_email_signature', $data ?? [], null); + $this->setIfExists('required_signature_types', $data ?? [], null); + $this->setIfExists('should_enable_tamper_proof', $data ?? [], null); + $this->setIfExists('should_include_distinct_pdfs', $data ?? [], null); + $this->setIfExists('should_offer_signer_access_code', $data ?? [], null); + $this->setIfExists('should_offer_signer_sms_authentication', $data ?? [], null); + $this->setIfExists('should_remove_document_id', $data ?? [], null); + $this->setIfExists('data_residency', $data ?? [], null); + $this->setIfExists('allow_team_delete_document_for_everyone', $data ?? [], null); + $this->setIfExists('allow_team_download_csv', $data ?? [], null); + $this->setIfExists('lock_team_template_creation', $data ?? [], null); + $this->setIfExists('lock_team_template_gallery', $data ?? [], null); + $this->setIfExists('self_sign_message', $data ?? [], null); + $this->setIfExists('self_sign_title', $data ?? [], null); + $this->setIfExists('signature_request_message', $data ?? [], null); + $this->setIfExists('signature_request_title', $data ?? [], null); + $this->setIfExists('multifactor_auth_app', $data ?? [], null); + $this->setIfExists('multifactor_auth_sms', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): TeamSettingsResponseSettings + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): TeamSettingsResponseSettings + { + /** @var TeamSettingsResponseSettings */ + return ObjectSerializer::deserialize( + $data, + TeamSettingsResponseSettings::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['company'] === null) { + $invalidProperties[] = "'company' can't be null"; + } + if ($this->container['custom_signing_redirect_enabled'] === null) { + $invalidProperties[] = "'custom_signing_redirect_enabled' can't be null"; + } + if ($this->container['custom_signing_redirect_url'] === null) { + $invalidProperties[] = "'custom_signing_redirect_url' can't be null"; + } + if ($this->container['custom_tagline'] === null) { + $invalidProperties[] = "'custom_tagline' can't be null"; + } + if ($this->container['date_format'] === null) { + $invalidProperties[] = "'date_format' can't be null"; + } + if ($this->container['is_signature_reminders_enabled'] === null) { + $invalidProperties[] = "'is_signature_reminders_enabled' can't be null"; + } + if ($this->container['request_email_from'] === null) { + $invalidProperties[] = "'request_email_from' can't be null"; + } + if ($this->container['request_email_signature'] === null) { + $invalidProperties[] = "'request_email_signature' can't be null"; + } + if ($this->container['required_signature_types'] === null) { + $invalidProperties[] = "'required_signature_types' can't be null"; + } + if ($this->container['should_enable_tamper_proof'] === null) { + $invalidProperties[] = "'should_enable_tamper_proof' can't be null"; + } + if ($this->container['should_include_distinct_pdfs'] === null) { + $invalidProperties[] = "'should_include_distinct_pdfs' can't be null"; + } + if ($this->container['should_offer_signer_access_code'] === null) { + $invalidProperties[] = "'should_offer_signer_access_code' can't be null"; + } + if ($this->container['should_offer_signer_sms_authentication'] === null) { + $invalidProperties[] = "'should_offer_signer_sms_authentication' can't be null"; + } + if ($this->container['should_remove_document_id'] === null) { + $invalidProperties[] = "'should_remove_document_id' can't be null"; + } + if ($this->container['data_residency'] === null) { + $invalidProperties[] = "'data_residency' can't be null"; + } + if ($this->container['allow_team_delete_document_for_everyone'] === null) { + $invalidProperties[] = "'allow_team_delete_document_for_everyone' can't be null"; + } + if ($this->container['allow_team_download_csv'] === null) { + $invalidProperties[] = "'allow_team_download_csv' can't be null"; + } + if ($this->container['lock_team_template_creation'] === null) { + $invalidProperties[] = "'lock_team_template_creation' can't be null"; + } + if ($this->container['lock_team_template_gallery'] === null) { + $invalidProperties[] = "'lock_team_template_gallery' can't be null"; + } + if ($this->container['self_sign_message'] === null) { + $invalidProperties[] = "'self_sign_message' can't be null"; + } + if ($this->container['self_sign_title'] === null) { + $invalidProperties[] = "'self_sign_title' can't be null"; + } + if ($this->container['signature_request_message'] === null) { + $invalidProperties[] = "'signature_request_message' can't be null"; + } + if ($this->container['signature_request_title'] === null) { + $invalidProperties[] = "'signature_request_title' can't be null"; + } + if ($this->container['multifactor_auth_app'] === null) { + $invalidProperties[] = "'multifactor_auth_app' can't be null"; + } + if ($this->container['multifactor_auth_sms'] === null) { + $invalidProperties[] = "'multifactor_auth_sms' 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 company + * + * @return SettingResponse + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * + * @param SettingResponse $company company name associated with this account or team + * + * @return self + */ + public function setCompany(SettingResponse $company) + { + if (is_null($company)) { + throw new InvalidArgumentException('non-nullable company cannot be null'); + } + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets custom_signing_redirect_enabled + * + * @return SettingResponse + */ + public function getCustomSigningRedirectEnabled() + { + return $this->container['custom_signing_redirect_enabled']; + } + + /** + * Sets custom_signing_redirect_enabled + * + * @param SettingResponse $custom_signing_redirect_enabled whether signers are redirected to a custom URL after completing a signature request + * + * @return self + */ + public function setCustomSigningRedirectEnabled(SettingResponse $custom_signing_redirect_enabled) + { + if (is_null($custom_signing_redirect_enabled)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_enabled cannot be null'); + } + $this->container['custom_signing_redirect_enabled'] = $custom_signing_redirect_enabled; + + return $this; + } + + /** + * Gets custom_signing_redirect_url + * + * @return SettingResponse + */ + public function getCustomSigningRedirectUrl() + { + return $this->container['custom_signing_redirect_url']; + } + + /** + * Sets custom_signing_redirect_url + * + * @param SettingResponse $custom_signing_redirect_url URL where signers are redirected after completing a signature request when custom redirects are enabled + * + * @return self + */ + public function setCustomSigningRedirectUrl(SettingResponse $custom_signing_redirect_url) + { + if (is_null($custom_signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_url cannot be null'); + } + $this->container['custom_signing_redirect_url'] = $custom_signing_redirect_url; + + return $this; + } + + /** + * Gets custom_tagline + * + * @return SettingResponse + */ + public function getCustomTagline() + { + return $this->container['custom_tagline']; + } + + /** + * Sets custom_tagline + * + * @param SettingResponse $custom_tagline custom tagline displayed with the account or team branding + * + * @return self + */ + public function setCustomTagline(SettingResponse $custom_tagline) + { + if (is_null($custom_tagline)) { + throw new InvalidArgumentException('non-nullable custom_tagline cannot be null'); + } + $this->container['custom_tagline'] = $custom_tagline; + + return $this; + } + + /** + * Gets date_format + * + * @return SettingResponse + */ + public function getDateFormat() + { + return $this->container['date_format']; + } + + /** + * Sets date_format + * + * @param SettingResponse $date_format Date format used to display dates. List the setting in `unset` to inherit the default. + * + * @return self + */ + public function setDateFormat(SettingResponse $date_format) + { + if (is_null($date_format)) { + throw new InvalidArgumentException('non-nullable date_format cannot be null'); + } + $this->container['date_format'] = $date_format; + + return $this; + } + + /** + * Gets is_signature_reminders_enabled + * + * @return SettingResponse + */ + public function getIsSignatureRemindersEnabled() + { + return $this->container['is_signature_reminders_enabled']; + } + + /** + * Sets is_signature_reminders_enabled + * + * @param SettingResponse $is_signature_reminders_enabled whether automatic reminder emails are enabled for incomplete signature requests + * + * @return self + */ + public function setIsSignatureRemindersEnabled(SettingResponse $is_signature_reminders_enabled) + { + if (is_null($is_signature_reminders_enabled)) { + throw new InvalidArgumentException('non-nullable is_signature_reminders_enabled cannot be null'); + } + $this->container['is_signature_reminders_enabled'] = $is_signature_reminders_enabled; + + return $this; + } + + /** + * Gets request_email_from + * + * @return SettingResponse + */ + public function getRequestEmailFrom() + { + return $this->container['request_email_from']; + } + + /** + * Sets request_email_from + * + * @param SettingResponse $request_email_from sender name shown on signature request emails + * + * @return self + */ + public function setRequestEmailFrom(SettingResponse $request_email_from) + { + if (is_null($request_email_from)) { + throw new InvalidArgumentException('non-nullable request_email_from cannot be null'); + } + $this->container['request_email_from'] = $request_email_from; + + return $this; + } + + /** + * Gets request_email_signature + * + * @return SettingResponse + */ + public function getRequestEmailSignature() + { + return $this->container['request_email_signature']; + } + + /** + * Sets request_email_signature + * + * @param SettingResponse $request_email_signature signature appended to signature request emails + * + * @return self + */ + public function setRequestEmailSignature(SettingResponse $request_email_signature) + { + if (is_null($request_email_signature)) { + throw new InvalidArgumentException('non-nullable request_email_signature cannot be null'); + } + $this->container['request_email_signature'] = $request_email_signature; + + return $this; + } + + /** + * Gets required_signature_types + * + * @return SettingResponse + */ + public function getRequiredSignatureTypes() + { + return $this->container['required_signature_types']; + } + + /** + * Sets required_signature_types + * + * @param SettingResponse $required_signature_types signature creation methods signers may use + * + * @return self + */ + public function setRequiredSignatureTypes(SettingResponse $required_signature_types) + { + if (is_null($required_signature_types)) { + throw new InvalidArgumentException('non-nullable required_signature_types cannot be null'); + } + $this->container['required_signature_types'] = $required_signature_types; + + return $this; + } + + /** + * Gets should_enable_tamper_proof + * + * @return SettingResponse + */ + public function getShouldEnableTamperProof() + { + return $this->container['should_enable_tamper_proof']; + } + + /** + * Sets should_enable_tamper_proof + * + * @param SettingResponse $should_enable_tamper_proof whether completed documents include a digital tamper-proof seal + * + * @return self + */ + public function setShouldEnableTamperProof(SettingResponse $should_enable_tamper_proof) + { + if (is_null($should_enable_tamper_proof)) { + throw new InvalidArgumentException('non-nullable should_enable_tamper_proof cannot be null'); + } + $this->container['should_enable_tamper_proof'] = $should_enable_tamper_proof; + + return $this; + } + + /** + * Gets should_include_distinct_pdfs + * + * @return SettingResponse + */ + public function getShouldIncludeDistinctPdfs() + { + return $this->container['should_include_distinct_pdfs']; + } + + /** + * Sets should_include_distinct_pdfs + * + * @param SettingResponse $should_include_distinct_pdfs whether completed documents remain as separate PDF files instead of being merged into one PDF + * + * @return self + */ + public function setShouldIncludeDistinctPdfs(SettingResponse $should_include_distinct_pdfs) + { + if (is_null($should_include_distinct_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_distinct_pdfs cannot be null'); + } + $this->container['should_include_distinct_pdfs'] = $should_include_distinct_pdfs; + + return $this; + } + + /** + * Gets should_offer_signer_access_code + * + * @return SettingResponse + */ + public function getShouldOfferSignerAccessCode() + { + return $this->container['should_offer_signer_access_code']; + } + + /** + * Sets should_offer_signer_access_code + * + * @param SettingResponse $should_offer_signer_access_code whether senders can require an access code to verify a signer + * + * @return self + */ + public function setShouldOfferSignerAccessCode(SettingResponse $should_offer_signer_access_code) + { + if (is_null($should_offer_signer_access_code)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_access_code cannot be null'); + } + $this->container['should_offer_signer_access_code'] = $should_offer_signer_access_code; + + return $this; + } + + /** + * Gets should_offer_signer_sms_authentication + * + * @return SettingResponse + */ + public function getShouldOfferSignerSmsAuthentication() + { + return $this->container['should_offer_signer_sms_authentication']; + } + + /** + * Sets should_offer_signer_sms_authentication + * + * @param SettingResponse $should_offer_signer_sms_authentication whether senders can require SMS authentication to verify a signer + * + * @return self + */ + public function setShouldOfferSignerSmsAuthentication(SettingResponse $should_offer_signer_sms_authentication) + { + if (is_null($should_offer_signer_sms_authentication)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_sms_authentication cannot be null'); + } + $this->container['should_offer_signer_sms_authentication'] = $should_offer_signer_sms_authentication; + + return $this; + } + + /** + * Gets should_remove_document_id + * + * @return SettingResponse + */ + public function getShouldRemoveDocumentId() + { + return $this->container['should_remove_document_id']; + } + + /** + * Sets should_remove_document_id + * + * @param SettingResponse $should_remove_document_id whether the Dropbox Sign document ID is hidden on sent documents + * + * @return self + */ + public function setShouldRemoveDocumentId(SettingResponse $should_remove_document_id) + { + if (is_null($should_remove_document_id)) { + throw new InvalidArgumentException('non-nullable should_remove_document_id cannot be null'); + } + $this->container['should_remove_document_id'] = $should_remove_document_id; + + return $this; + } + + /** + * Gets data_residency + * + * @return SettingResponse + */ + public function getDataResidency() + { + return $this->container['data_residency']; + } + + /** + * Sets data_residency + * + * @param SettingResponse $data_residency storage region for team documents + * + * @return self + */ + public function setDataResidency(SettingResponse $data_residency) + { + if (is_null($data_residency)) { + throw new InvalidArgumentException('non-nullable data_residency cannot be null'); + } + $this->container['data_residency'] = $data_residency; + + return $this; + } + + /** + * Gets allow_team_delete_document_for_everyone + * + * @return SettingResponse + */ + public function getAllowTeamDeleteDocumentForEveryone() + { + return $this->container['allow_team_delete_document_for_everyone']; + } + + /** + * Sets allow_team_delete_document_for_everyone + * + * @param SettingResponse $allow_team_delete_document_for_everyone whether team members can delete a document for all participants + * + * @return self + */ + public function setAllowTeamDeleteDocumentForEveryone(SettingResponse $allow_team_delete_document_for_everyone) + { + if (is_null($allow_team_delete_document_for_everyone)) { + throw new InvalidArgumentException('non-nullable allow_team_delete_document_for_everyone cannot be null'); + } + $this->container['allow_team_delete_document_for_everyone'] = $allow_team_delete_document_for_everyone; + + return $this; + } + + /** + * Gets allow_team_download_csv + * + * @return SettingResponse + */ + public function getAllowTeamDownloadCsv() + { + return $this->container['allow_team_download_csv']; + } + + /** + * Sets allow_team_download_csv + * + * @param SettingResponse $allow_team_download_csv whether team members can download CSV files + * + * @return self + */ + public function setAllowTeamDownloadCsv(SettingResponse $allow_team_download_csv) + { + if (is_null($allow_team_download_csv)) { + throw new InvalidArgumentException('non-nullable allow_team_download_csv cannot be null'); + } + $this->container['allow_team_download_csv'] = $allow_team_download_csv; + + return $this; + } + + /** + * Gets lock_team_template_creation + * + * @return SettingResponse + */ + public function getLockTeamTemplateCreation() + { + return $this->container['lock_team_template_creation']; + } + + /** + * Sets lock_team_template_creation + * + * @param SettingResponse $lock_team_template_creation whether team members are prevented from creating templates + * + * @return self + */ + public function setLockTeamTemplateCreation(SettingResponse $lock_team_template_creation) + { + if (is_null($lock_team_template_creation)) { + throw new InvalidArgumentException('non-nullable lock_team_template_creation cannot be null'); + } + $this->container['lock_team_template_creation'] = $lock_team_template_creation; + + return $this; + } + + /** + * Gets lock_team_template_gallery + * + * @return SettingResponse + */ + public function getLockTeamTemplateGallery() + { + return $this->container['lock_team_template_gallery']; + } + + /** + * Sets lock_team_template_gallery + * + * @param SettingResponse $lock_team_template_gallery whether team members are prevented from using the template gallery + * + * @return self + */ + public function setLockTeamTemplateGallery(SettingResponse $lock_team_template_gallery) + { + if (is_null($lock_team_template_gallery)) { + throw new InvalidArgumentException('non-nullable lock_team_template_gallery cannot be null'); + } + $this->container['lock_team_template_gallery'] = $lock_team_template_gallery; + + return $this; + } + + /** + * Gets self_sign_message + * + * @return SettingResponse + */ + public function getSelfSignMessage() + { + return $this->container['self_sign_message']; + } + + /** + * Sets self_sign_message + * + * @param SettingResponse $self_sign_message default message enforced for team members when they create self-signed documents + * + * @return self + */ + public function setSelfSignMessage(SettingResponse $self_sign_message) + { + if (is_null($self_sign_message)) { + throw new InvalidArgumentException('non-nullable self_sign_message cannot be null'); + } + $this->container['self_sign_message'] = $self_sign_message; + + return $this; + } + + /** + * Gets self_sign_title + * + * @return SettingResponse + */ + public function getSelfSignTitle() + { + return $this->container['self_sign_title']; + } + + /** + * Sets self_sign_title + * + * @param SettingResponse $self_sign_title default title enforced for team members when they create self-signed documents + * + * @return self + */ + public function setSelfSignTitle(SettingResponse $self_sign_title) + { + if (is_null($self_sign_title)) { + throw new InvalidArgumentException('non-nullable self_sign_title cannot be null'); + } + $this->container['self_sign_title'] = $self_sign_title; + + return $this; + } + + /** + * Gets signature_request_message + * + * @return SettingResponse + */ + public function getSignatureRequestMessage() + { + return $this->container['signature_request_message']; + } + + /** + * Sets signature_request_message + * + * @param SettingResponse $signature_request_message default message enforced for team members when they create signature requests + * + * @return self + */ + public function setSignatureRequestMessage(SettingResponse $signature_request_message) + { + if (is_null($signature_request_message)) { + throw new InvalidArgumentException('non-nullable signature_request_message cannot be null'); + } + $this->container['signature_request_message'] = $signature_request_message; + + return $this; + } + + /** + * Gets signature_request_title + * + * @return SettingResponse + */ + public function getSignatureRequestTitle() + { + return $this->container['signature_request_title']; + } + + /** + * Sets signature_request_title + * + * @param SettingResponse $signature_request_title default title enforced for team members when they create signature requests + * + * @return self + */ + public function setSignatureRequestTitle(SettingResponse $signature_request_title) + { + if (is_null($signature_request_title)) { + throw new InvalidArgumentException('non-nullable signature_request_title cannot be null'); + } + $this->container['signature_request_title'] = $signature_request_title; + + return $this; + } + + /** + * Gets multifactor_auth_app + * + * @return SettingResponse + */ + public function getMultifactorAuthApp() + { + return $this->container['multifactor_auth_app']; + } + + /** + * Sets multifactor_auth_app + * + * @param SettingResponse $multifactor_auth_app whether authenticator-app multifactor authentication is enabled for the team + * + * @return self + */ + public function setMultifactorAuthApp(SettingResponse $multifactor_auth_app) + { + if (is_null($multifactor_auth_app)) { + throw new InvalidArgumentException('non-nullable multifactor_auth_app cannot be null'); + } + $this->container['multifactor_auth_app'] = $multifactor_auth_app; + + return $this; + } + + /** + * Gets multifactor_auth_sms + * + * @return SettingResponse + */ + public function getMultifactorAuthSms() + { + return $this->container['multifactor_auth_sms']; + } + + /** + * Sets multifactor_auth_sms + * + * @param SettingResponse $multifactor_auth_sms whether SMS multifactor authentication is enabled for the team + * + * @return self + */ + public function setMultifactorAuthSms(SettingResponse $multifactor_auth_sms) + { + if (is_null($multifactor_auth_sms)) { + throw new InvalidArgumentException('non-nullable multifactor_auth_sms cannot be null'); + } + $this->container['multifactor_auth_sms'] = $multifactor_auth_sms; + + 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/TeamSettingsUpdateRequest.php b/sdks/php/src/Model/TeamSettingsUpdateRequest.php new file mode 100644 index 000000000..711bf0663 --- /dev/null +++ b/sdks/php/src/Model/TeamSettingsUpdateRequest.php @@ -0,0 +1,1333 @@ + + */ +class TeamSettingsUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TeamSettingsUpdateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'company' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'custom_signing_redirect_enabled' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'custom_signing_redirect_url' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'custom_tagline' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'date_format' => '\Dropbox\Sign\Model\DateFormatSettingUpdate', + 'is_signature_reminders_enabled' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'request_email_from' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'request_email_signature' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'required_signature_types' => '\Dropbox\Sign\Model\RequiredSignatureTypesSettingUpdate', + 'should_enable_tamper_proof' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'should_include_distinct_pdfs' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'should_offer_signer_access_code' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'should_offer_signer_sms_authentication' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'should_remove_document_id' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'data_residency' => '\Dropbox\Sign\Model\DataResidencySettingUpdate', + 'allow_team_delete_document_for_everyone' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'allow_team_download_csv' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'lock_team_template_creation' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'lock_team_template_gallery' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'self_sign_message' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'self_sign_title' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'signature_request_message' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'signature_request_title' => '\Dropbox\Sign\Model\StringSettingUpdate', + 'multifactor_auth_app' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'multifactor_auth_sms' => '\Dropbox\Sign\Model\BooleanSettingUpdate', + 'unset' => 'string[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'company' => null, + 'custom_signing_redirect_enabled' => null, + 'custom_signing_redirect_url' => null, + 'custom_tagline' => null, + 'date_format' => null, + 'is_signature_reminders_enabled' => null, + 'request_email_from' => null, + 'request_email_signature' => null, + 'required_signature_types' => null, + 'should_enable_tamper_proof' => null, + 'should_include_distinct_pdfs' => null, + 'should_offer_signer_access_code' => null, + 'should_offer_signer_sms_authentication' => null, + 'should_remove_document_id' => null, + 'data_residency' => null, + 'allow_team_delete_document_for_everyone' => null, + 'allow_team_download_csv' => null, + 'lock_team_template_creation' => null, + 'lock_team_template_gallery' => null, + 'self_sign_message' => null, + 'self_sign_title' => null, + 'signature_request_message' => null, + 'signature_request_title' => null, + 'multifactor_auth_app' => null, + 'multifactor_auth_sms' => null, + 'unset' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'company' => false, + 'custom_signing_redirect_enabled' => false, + 'custom_signing_redirect_url' => false, + 'custom_tagline' => false, + 'date_format' => false, + 'is_signature_reminders_enabled' => false, + 'request_email_from' => false, + 'request_email_signature' => false, + 'required_signature_types' => false, + 'should_enable_tamper_proof' => false, + 'should_include_distinct_pdfs' => false, + 'should_offer_signer_access_code' => false, + 'should_offer_signer_sms_authentication' => false, + 'should_remove_document_id' => false, + 'data_residency' => false, + 'allow_team_delete_document_for_everyone' => false, + 'allow_team_download_csv' => false, + 'lock_team_template_creation' => false, + 'lock_team_template_gallery' => false, + 'self_sign_message' => false, + 'self_sign_title' => false, + 'signature_request_message' => false, + 'signature_request_title' => false, + 'multifactor_auth_app' => false, + 'multifactor_auth_sms' => false, + 'unset' => 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 = [ + 'company' => 'company', + 'custom_signing_redirect_enabled' => 'custom_signing_redirect_enabled', + 'custom_signing_redirect_url' => 'custom_signing_redirect_url', + 'custom_tagline' => 'custom_tagline', + 'date_format' => 'date_format', + 'is_signature_reminders_enabled' => 'is_signature_reminders_enabled', + 'request_email_from' => 'request_email_from', + 'request_email_signature' => 'request_email_signature', + 'required_signature_types' => 'required_signature_types', + 'should_enable_tamper_proof' => 'should_enable_tamper_proof', + 'should_include_distinct_pdfs' => 'should_include_distinct_pdfs', + 'should_offer_signer_access_code' => 'should_offer_signer_access_code', + 'should_offer_signer_sms_authentication' => 'should_offer_signer_sms_authentication', + 'should_remove_document_id' => 'should_remove_document_id', + 'data_residency' => 'data_residency', + 'allow_team_delete_document_for_everyone' => 'allow_team_delete_document_for_everyone', + 'allow_team_download_csv' => 'allow_team_download_csv', + 'lock_team_template_creation' => 'lock_team_template_creation', + 'lock_team_template_gallery' => 'lock_team_template_gallery', + 'self_sign_message' => 'self_sign_message', + 'self_sign_title' => 'self_sign_title', + 'signature_request_message' => 'signature_request_message', + 'signature_request_title' => 'signature_request_title', + 'multifactor_auth_app' => 'multifactor_auth_app', + 'multifactor_auth_sms' => 'multifactor_auth_sms', + 'unset' => 'unset', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'company' => 'setCompany', + 'custom_signing_redirect_enabled' => 'setCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'setCustomSigningRedirectUrl', + 'custom_tagline' => 'setCustomTagline', + 'date_format' => 'setDateFormat', + 'is_signature_reminders_enabled' => 'setIsSignatureRemindersEnabled', + 'request_email_from' => 'setRequestEmailFrom', + 'request_email_signature' => 'setRequestEmailSignature', + 'required_signature_types' => 'setRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'setShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'setShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'setShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'setShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'setShouldRemoveDocumentId', + 'data_residency' => 'setDataResidency', + 'allow_team_delete_document_for_everyone' => 'setAllowTeamDeleteDocumentForEveryone', + 'allow_team_download_csv' => 'setAllowTeamDownloadCsv', + 'lock_team_template_creation' => 'setLockTeamTemplateCreation', + 'lock_team_template_gallery' => 'setLockTeamTemplateGallery', + 'self_sign_message' => 'setSelfSignMessage', + 'self_sign_title' => 'setSelfSignTitle', + 'signature_request_message' => 'setSignatureRequestMessage', + 'signature_request_title' => 'setSignatureRequestTitle', + 'multifactor_auth_app' => 'setMultifactorAuthApp', + 'multifactor_auth_sms' => 'setMultifactorAuthSms', + 'unset' => 'setUnset', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'company' => 'getCompany', + 'custom_signing_redirect_enabled' => 'getCustomSigningRedirectEnabled', + 'custom_signing_redirect_url' => 'getCustomSigningRedirectUrl', + 'custom_tagline' => 'getCustomTagline', + 'date_format' => 'getDateFormat', + 'is_signature_reminders_enabled' => 'getIsSignatureRemindersEnabled', + 'request_email_from' => 'getRequestEmailFrom', + 'request_email_signature' => 'getRequestEmailSignature', + 'required_signature_types' => 'getRequiredSignatureTypes', + 'should_enable_tamper_proof' => 'getShouldEnableTamperProof', + 'should_include_distinct_pdfs' => 'getShouldIncludeDistinctPdfs', + 'should_offer_signer_access_code' => 'getShouldOfferSignerAccessCode', + 'should_offer_signer_sms_authentication' => 'getShouldOfferSignerSmsAuthentication', + 'should_remove_document_id' => 'getShouldRemoveDocumentId', + 'data_residency' => 'getDataResidency', + 'allow_team_delete_document_for_everyone' => 'getAllowTeamDeleteDocumentForEveryone', + 'allow_team_download_csv' => 'getAllowTeamDownloadCsv', + 'lock_team_template_creation' => 'getLockTeamTemplateCreation', + 'lock_team_template_gallery' => 'getLockTeamTemplateGallery', + 'self_sign_message' => 'getSelfSignMessage', + 'self_sign_title' => 'getSelfSignTitle', + 'signature_request_message' => 'getSignatureRequestMessage', + 'signature_request_title' => 'getSignatureRequestTitle', + 'multifactor_auth_app' => 'getMultifactorAuthApp', + 'multifactor_auth_sms' => 'getMultifactorAuthSms', + 'unset' => 'getUnset', + ]; + + /** + * 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 MODEL_UNSET_COMPANY = 'company'; + public const MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_ENABLED = 'custom_signing_redirect_enabled'; + public const MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_URL = 'custom_signing_redirect_url'; + public const MODEL_UNSET_CUSTOM_TAGLINE = 'custom_tagline'; + public const MODEL_UNSET_DATE_FORMAT = 'date_format'; + public const MODEL_UNSET_IS_SIGNATURE_REMINDERS_ENABLED = 'is_signature_reminders_enabled'; + public const MODEL_UNSET_REQUEST_EMAIL_FROM = 'request_email_from'; + public const MODEL_UNSET_REQUEST_EMAIL_SIGNATURE = 'request_email_signature'; + public const MODEL_UNSET_REQUIRED_SIGNATURE_TYPES = 'required_signature_types'; + public const MODEL_UNSET_SHOULD_ENABLE_TAMPER_PROOF = 'should_enable_tamper_proof'; + public const MODEL_UNSET_SHOULD_INCLUDE_DISTINCT_PDFS = 'should_include_distinct_pdfs'; + public const MODEL_UNSET_SHOULD_OFFER_SIGNER_ACCESS_CODE = 'should_offer_signer_access_code'; + public const MODEL_UNSET_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION = 'should_offer_signer_sms_authentication'; + public const MODEL_UNSET_SHOULD_REMOVE_DOCUMENT_ID = 'should_remove_document_id'; + public const MODEL_UNSET_DATA_RESIDENCY = 'data_residency'; + public const MODEL_UNSET_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE = 'allow_team_delete_document_for_everyone'; + public const MODEL_UNSET_ALLOW_TEAM_DOWNLOAD_CSV = 'allow_team_download_csv'; + public const MODEL_UNSET_LOCK_TEAM_TEMPLATE_CREATION = 'lock_team_template_creation'; + public const MODEL_UNSET_LOCK_TEAM_TEMPLATE_GALLERY = 'lock_team_template_gallery'; + public const MODEL_UNSET_SELF_SIGN_MESSAGE = 'self_sign_message'; + public const MODEL_UNSET_SELF_SIGN_TITLE = 'self_sign_title'; + public const MODEL_UNSET_SIGNATURE_REQUEST_MESSAGE = 'signature_request_message'; + public const MODEL_UNSET_SIGNATURE_REQUEST_TITLE = 'signature_request_title'; + public const MODEL_UNSET_MULTIFACTOR_AUTH_APP = 'multifactor_auth_app'; + public const MODEL_UNSET_MULTIFACTOR_AUTH_SMS = 'multifactor_auth_sms'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getUnsetAllowableValues() + { + return [ + self::MODEL_UNSET_COMPANY, + self::MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_ENABLED, + self::MODEL_UNSET_CUSTOM_SIGNING_REDIRECT_URL, + self::MODEL_UNSET_CUSTOM_TAGLINE, + self::MODEL_UNSET_DATE_FORMAT, + self::MODEL_UNSET_IS_SIGNATURE_REMINDERS_ENABLED, + self::MODEL_UNSET_REQUEST_EMAIL_FROM, + self::MODEL_UNSET_REQUEST_EMAIL_SIGNATURE, + self::MODEL_UNSET_REQUIRED_SIGNATURE_TYPES, + self::MODEL_UNSET_SHOULD_ENABLE_TAMPER_PROOF, + self::MODEL_UNSET_SHOULD_INCLUDE_DISTINCT_PDFS, + self::MODEL_UNSET_SHOULD_OFFER_SIGNER_ACCESS_CODE, + self::MODEL_UNSET_SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION, + self::MODEL_UNSET_SHOULD_REMOVE_DOCUMENT_ID, + self::MODEL_UNSET_DATA_RESIDENCY, + self::MODEL_UNSET_ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE, + self::MODEL_UNSET_ALLOW_TEAM_DOWNLOAD_CSV, + self::MODEL_UNSET_LOCK_TEAM_TEMPLATE_CREATION, + self::MODEL_UNSET_LOCK_TEAM_TEMPLATE_GALLERY, + self::MODEL_UNSET_SELF_SIGN_MESSAGE, + self::MODEL_UNSET_SELF_SIGN_TITLE, + self::MODEL_UNSET_SIGNATURE_REQUEST_MESSAGE, + self::MODEL_UNSET_SIGNATURE_REQUEST_TITLE, + self::MODEL_UNSET_MULTIFACTOR_AUTH_APP, + self::MODEL_UNSET_MULTIFACTOR_AUTH_SMS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('company', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_enabled', $data ?? [], null); + $this->setIfExists('custom_signing_redirect_url', $data ?? [], null); + $this->setIfExists('custom_tagline', $data ?? [], null); + $this->setIfExists('date_format', $data ?? [], null); + $this->setIfExists('is_signature_reminders_enabled', $data ?? [], null); + $this->setIfExists('request_email_from', $data ?? [], null); + $this->setIfExists('request_email_signature', $data ?? [], null); + $this->setIfExists('required_signature_types', $data ?? [], null); + $this->setIfExists('should_enable_tamper_proof', $data ?? [], null); + $this->setIfExists('should_include_distinct_pdfs', $data ?? [], null); + $this->setIfExists('should_offer_signer_access_code', $data ?? [], null); + $this->setIfExists('should_offer_signer_sms_authentication', $data ?? [], null); + $this->setIfExists('should_remove_document_id', $data ?? [], null); + $this->setIfExists('data_residency', $data ?? [], null); + $this->setIfExists('allow_team_delete_document_for_everyone', $data ?? [], null); + $this->setIfExists('allow_team_download_csv', $data ?? [], null); + $this->setIfExists('lock_team_template_creation', $data ?? [], null); + $this->setIfExists('lock_team_template_gallery', $data ?? [], null); + $this->setIfExists('self_sign_message', $data ?? [], null); + $this->setIfExists('self_sign_title', $data ?? [], null); + $this->setIfExists('signature_request_message', $data ?? [], null); + $this->setIfExists('signature_request_title', $data ?? [], null); + $this->setIfExists('multifactor_auth_app', $data ?? [], null); + $this->setIfExists('multifactor_auth_sms', $data ?? [], null); + $this->setIfExists('unset', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): TeamSettingsUpdateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): TeamSettingsUpdateRequest + { + /** @var TeamSettingsUpdateRequest */ + return ObjectSerializer::deserialize( + $data, + TeamSettingsUpdateRequest::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() + { + return []; + } + + /** + * 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 company + * + * @return StringSettingUpdate|null + */ + public function getCompany() + { + return $this->container['company']; + } + + /** + * Sets company + * + * @param StringSettingUpdate|null $company company name associated with this account or team + * + * @return self + */ + public function setCompany(?StringSettingUpdate $company) + { + if (is_null($company)) { + throw new InvalidArgumentException('non-nullable company cannot be null'); + } + $this->container['company'] = $company; + + return $this; + } + + /** + * Gets custom_signing_redirect_enabled + * + * @return BooleanSettingUpdate|null + */ + public function getCustomSigningRedirectEnabled() + { + return $this->container['custom_signing_redirect_enabled']; + } + + /** + * Sets custom_signing_redirect_enabled + * + * @param BooleanSettingUpdate|null $custom_signing_redirect_enabled whether signers are redirected to a custom URL after completing a signature request + * + * @return self + */ + public function setCustomSigningRedirectEnabled(?BooleanSettingUpdate $custom_signing_redirect_enabled) + { + if (is_null($custom_signing_redirect_enabled)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_enabled cannot be null'); + } + $this->container['custom_signing_redirect_enabled'] = $custom_signing_redirect_enabled; + + return $this; + } + + /** + * Gets custom_signing_redirect_url + * + * @return StringSettingUpdate|null + */ + public function getCustomSigningRedirectUrl() + { + return $this->container['custom_signing_redirect_url']; + } + + /** + * Sets custom_signing_redirect_url + * + * @param StringSettingUpdate|null $custom_signing_redirect_url URL where signers are redirected after completing a signature request when custom redirects are enabled + * + * @return self + */ + public function setCustomSigningRedirectUrl(?StringSettingUpdate $custom_signing_redirect_url) + { + if (is_null($custom_signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable custom_signing_redirect_url cannot be null'); + } + $this->container['custom_signing_redirect_url'] = $custom_signing_redirect_url; + + return $this; + } + + /** + * Gets custom_tagline + * + * @return StringSettingUpdate|null + */ + public function getCustomTagline() + { + return $this->container['custom_tagline']; + } + + /** + * Sets custom_tagline + * + * @param StringSettingUpdate|null $custom_tagline custom tagline displayed with the account or team branding + * + * @return self + */ + public function setCustomTagline(?StringSettingUpdate $custom_tagline) + { + if (is_null($custom_tagline)) { + throw new InvalidArgumentException('non-nullable custom_tagline cannot be null'); + } + $this->container['custom_tagline'] = $custom_tagline; + + return $this; + } + + /** + * Gets date_format + * + * @return DateFormatSettingUpdate|null + */ + public function getDateFormat() + { + return $this->container['date_format']; + } + + /** + * Sets date_format + * + * @param DateFormatSettingUpdate|null $date_format Date format used to display dates. List the setting in `unset` to inherit the default. + * + * @return self + */ + public function setDateFormat(?DateFormatSettingUpdate $date_format) + { + if (is_null($date_format)) { + throw new InvalidArgumentException('non-nullable date_format cannot be null'); + } + $this->container['date_format'] = $date_format; + + return $this; + } + + /** + * Gets is_signature_reminders_enabled + * + * @return BooleanSettingUpdate|null + */ + public function getIsSignatureRemindersEnabled() + { + return $this->container['is_signature_reminders_enabled']; + } + + /** + * Sets is_signature_reminders_enabled + * + * @param BooleanSettingUpdate|null $is_signature_reminders_enabled whether automatic reminder emails are enabled for incomplete signature requests + * + * @return self + */ + public function setIsSignatureRemindersEnabled(?BooleanSettingUpdate $is_signature_reminders_enabled) + { + if (is_null($is_signature_reminders_enabled)) { + throw new InvalidArgumentException('non-nullable is_signature_reminders_enabled cannot be null'); + } + $this->container['is_signature_reminders_enabled'] = $is_signature_reminders_enabled; + + return $this; + } + + /** + * Gets request_email_from + * + * @return StringSettingUpdate|null + */ + public function getRequestEmailFrom() + { + return $this->container['request_email_from']; + } + + /** + * Sets request_email_from + * + * @param StringSettingUpdate|null $request_email_from sender name shown on signature request emails + * + * @return self + */ + public function setRequestEmailFrom(?StringSettingUpdate $request_email_from) + { + if (is_null($request_email_from)) { + throw new InvalidArgumentException('non-nullable request_email_from cannot be null'); + } + $this->container['request_email_from'] = $request_email_from; + + return $this; + } + + /** + * Gets request_email_signature + * + * @return StringSettingUpdate|null + */ + public function getRequestEmailSignature() + { + return $this->container['request_email_signature']; + } + + /** + * Sets request_email_signature + * + * @param StringSettingUpdate|null $request_email_signature signature appended to signature request emails + * + * @return self + */ + public function setRequestEmailSignature(?StringSettingUpdate $request_email_signature) + { + if (is_null($request_email_signature)) { + throw new InvalidArgumentException('non-nullable request_email_signature cannot be null'); + } + $this->container['request_email_signature'] = $request_email_signature; + + return $this; + } + + /** + * Gets required_signature_types + * + * @return RequiredSignatureTypesSettingUpdate|null + */ + public function getRequiredSignatureTypes() + { + return $this->container['required_signature_types']; + } + + /** + * Sets required_signature_types + * + * @param RequiredSignatureTypesSettingUpdate|null $required_signature_types signature creation methods signers may use + * + * @return self + */ + public function setRequiredSignatureTypes(?RequiredSignatureTypesSettingUpdate $required_signature_types) + { + if (is_null($required_signature_types)) { + throw new InvalidArgumentException('non-nullable required_signature_types cannot be null'); + } + $this->container['required_signature_types'] = $required_signature_types; + + return $this; + } + + /** + * Gets should_enable_tamper_proof + * + * @return BooleanSettingUpdate|null + */ + public function getShouldEnableTamperProof() + { + return $this->container['should_enable_tamper_proof']; + } + + /** + * Sets should_enable_tamper_proof + * + * @param BooleanSettingUpdate|null $should_enable_tamper_proof whether completed documents include a digital tamper-proof seal + * + * @return self + */ + public function setShouldEnableTamperProof(?BooleanSettingUpdate $should_enable_tamper_proof) + { + if (is_null($should_enable_tamper_proof)) { + throw new InvalidArgumentException('non-nullable should_enable_tamper_proof cannot be null'); + } + $this->container['should_enable_tamper_proof'] = $should_enable_tamper_proof; + + return $this; + } + + /** + * Gets should_include_distinct_pdfs + * + * @return BooleanSettingUpdate|null + */ + public function getShouldIncludeDistinctPdfs() + { + return $this->container['should_include_distinct_pdfs']; + } + + /** + * Sets should_include_distinct_pdfs + * + * @param BooleanSettingUpdate|null $should_include_distinct_pdfs whether completed documents remain as separate PDF files instead of being merged into one PDF + * + * @return self + */ + public function setShouldIncludeDistinctPdfs(?BooleanSettingUpdate $should_include_distinct_pdfs) + { + if (is_null($should_include_distinct_pdfs)) { + throw new InvalidArgumentException('non-nullable should_include_distinct_pdfs cannot be null'); + } + $this->container['should_include_distinct_pdfs'] = $should_include_distinct_pdfs; + + return $this; + } + + /** + * Gets should_offer_signer_access_code + * + * @return BooleanSettingUpdate|null + */ + public function getShouldOfferSignerAccessCode() + { + return $this->container['should_offer_signer_access_code']; + } + + /** + * Sets should_offer_signer_access_code + * + * @param BooleanSettingUpdate|null $should_offer_signer_access_code whether senders can require an access code to verify a signer + * + * @return self + */ + public function setShouldOfferSignerAccessCode(?BooleanSettingUpdate $should_offer_signer_access_code) + { + if (is_null($should_offer_signer_access_code)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_access_code cannot be null'); + } + $this->container['should_offer_signer_access_code'] = $should_offer_signer_access_code; + + return $this; + } + + /** + * Gets should_offer_signer_sms_authentication + * + * @return BooleanSettingUpdate|null + */ + public function getShouldOfferSignerSmsAuthentication() + { + return $this->container['should_offer_signer_sms_authentication']; + } + + /** + * Sets should_offer_signer_sms_authentication + * + * @param BooleanSettingUpdate|null $should_offer_signer_sms_authentication whether senders can require SMS authentication to verify a signer + * + * @return self + */ + public function setShouldOfferSignerSmsAuthentication(?BooleanSettingUpdate $should_offer_signer_sms_authentication) + { + if (is_null($should_offer_signer_sms_authentication)) { + throw new InvalidArgumentException('non-nullable should_offer_signer_sms_authentication cannot be null'); + } + $this->container['should_offer_signer_sms_authentication'] = $should_offer_signer_sms_authentication; + + return $this; + } + + /** + * Gets should_remove_document_id + * + * @return BooleanSettingUpdate|null + */ + public function getShouldRemoveDocumentId() + { + return $this->container['should_remove_document_id']; + } + + /** + * Sets should_remove_document_id + * + * @param BooleanSettingUpdate|null $should_remove_document_id whether the Dropbox Sign document ID is hidden on sent documents + * + * @return self + */ + public function setShouldRemoveDocumentId(?BooleanSettingUpdate $should_remove_document_id) + { + if (is_null($should_remove_document_id)) { + throw new InvalidArgumentException('non-nullable should_remove_document_id cannot be null'); + } + $this->container['should_remove_document_id'] = $should_remove_document_id; + + return $this; + } + + /** + * Gets data_residency + * + * @return DataResidencySettingUpdate|null + */ + public function getDataResidency() + { + return $this->container['data_residency']; + } + + /** + * Sets data_residency + * + * @param DataResidencySettingUpdate|null $data_residency storage region for team documents + * + * @return self + */ + public function setDataResidency(?DataResidencySettingUpdate $data_residency) + { + if (is_null($data_residency)) { + throw new InvalidArgumentException('non-nullable data_residency cannot be null'); + } + $this->container['data_residency'] = $data_residency; + + return $this; + } + + /** + * Gets allow_team_delete_document_for_everyone + * + * @return BooleanSettingUpdate|null + */ + public function getAllowTeamDeleteDocumentForEveryone() + { + return $this->container['allow_team_delete_document_for_everyone']; + } + + /** + * Sets allow_team_delete_document_for_everyone + * + * @param BooleanSettingUpdate|null $allow_team_delete_document_for_everyone whether team members can delete a document for all participants + * + * @return self + */ + public function setAllowTeamDeleteDocumentForEveryone(?BooleanSettingUpdate $allow_team_delete_document_for_everyone) + { + if (is_null($allow_team_delete_document_for_everyone)) { + throw new InvalidArgumentException('non-nullable allow_team_delete_document_for_everyone cannot be null'); + } + $this->container['allow_team_delete_document_for_everyone'] = $allow_team_delete_document_for_everyone; + + return $this; + } + + /** + * Gets allow_team_download_csv + * + * @return BooleanSettingUpdate|null + */ + public function getAllowTeamDownloadCsv() + { + return $this->container['allow_team_download_csv']; + } + + /** + * Sets allow_team_download_csv + * + * @param BooleanSettingUpdate|null $allow_team_download_csv whether team members can download CSV files + * + * @return self + */ + public function setAllowTeamDownloadCsv(?BooleanSettingUpdate $allow_team_download_csv) + { + if (is_null($allow_team_download_csv)) { + throw new InvalidArgumentException('non-nullable allow_team_download_csv cannot be null'); + } + $this->container['allow_team_download_csv'] = $allow_team_download_csv; + + return $this; + } + + /** + * Gets lock_team_template_creation + * + * @return BooleanSettingUpdate|null + */ + public function getLockTeamTemplateCreation() + { + return $this->container['lock_team_template_creation']; + } + + /** + * Sets lock_team_template_creation + * + * @param BooleanSettingUpdate|null $lock_team_template_creation whether team members are prevented from creating templates + * + * @return self + */ + public function setLockTeamTemplateCreation(?BooleanSettingUpdate $lock_team_template_creation) + { + if (is_null($lock_team_template_creation)) { + throw new InvalidArgumentException('non-nullable lock_team_template_creation cannot be null'); + } + $this->container['lock_team_template_creation'] = $lock_team_template_creation; + + return $this; + } + + /** + * Gets lock_team_template_gallery + * + * @return BooleanSettingUpdate|null + */ + public function getLockTeamTemplateGallery() + { + return $this->container['lock_team_template_gallery']; + } + + /** + * Sets lock_team_template_gallery + * + * @param BooleanSettingUpdate|null $lock_team_template_gallery whether team members are prevented from using the template gallery + * + * @return self + */ + public function setLockTeamTemplateGallery(?BooleanSettingUpdate $lock_team_template_gallery) + { + if (is_null($lock_team_template_gallery)) { + throw new InvalidArgumentException('non-nullable lock_team_template_gallery cannot be null'); + } + $this->container['lock_team_template_gallery'] = $lock_team_template_gallery; + + return $this; + } + + /** + * Gets self_sign_message + * + * @return StringSettingUpdate|null + */ + public function getSelfSignMessage() + { + return $this->container['self_sign_message']; + } + + /** + * Sets self_sign_message + * + * @param StringSettingUpdate|null $self_sign_message default message enforced for team members when they create self-signed documents + * + * @return self + */ + public function setSelfSignMessage(?StringSettingUpdate $self_sign_message) + { + if (is_null($self_sign_message)) { + throw new InvalidArgumentException('non-nullable self_sign_message cannot be null'); + } + $this->container['self_sign_message'] = $self_sign_message; + + return $this; + } + + /** + * Gets self_sign_title + * + * @return StringSettingUpdate|null + */ + public function getSelfSignTitle() + { + return $this->container['self_sign_title']; + } + + /** + * Sets self_sign_title + * + * @param StringSettingUpdate|null $self_sign_title default title enforced for team members when they create self-signed documents + * + * @return self + */ + public function setSelfSignTitle(?StringSettingUpdate $self_sign_title) + { + if (is_null($self_sign_title)) { + throw new InvalidArgumentException('non-nullable self_sign_title cannot be null'); + } + $this->container['self_sign_title'] = $self_sign_title; + + return $this; + } + + /** + * Gets signature_request_message + * + * @return StringSettingUpdate|null + */ + public function getSignatureRequestMessage() + { + return $this->container['signature_request_message']; + } + + /** + * Sets signature_request_message + * + * @param StringSettingUpdate|null $signature_request_message default message enforced for team members when they create signature requests + * + * @return self + */ + public function setSignatureRequestMessage(?StringSettingUpdate $signature_request_message) + { + if (is_null($signature_request_message)) { + throw new InvalidArgumentException('non-nullable signature_request_message cannot be null'); + } + $this->container['signature_request_message'] = $signature_request_message; + + return $this; + } + + /** + * Gets signature_request_title + * + * @return StringSettingUpdate|null + */ + public function getSignatureRequestTitle() + { + return $this->container['signature_request_title']; + } + + /** + * Sets signature_request_title + * + * @param StringSettingUpdate|null $signature_request_title default title enforced for team members when they create signature requests + * + * @return self + */ + public function setSignatureRequestTitle(?StringSettingUpdate $signature_request_title) + { + if (is_null($signature_request_title)) { + throw new InvalidArgumentException('non-nullable signature_request_title cannot be null'); + } + $this->container['signature_request_title'] = $signature_request_title; + + return $this; + } + + /** + * Gets multifactor_auth_app + * + * @return BooleanSettingUpdate|null + */ + public function getMultifactorAuthApp() + { + return $this->container['multifactor_auth_app']; + } + + /** + * Sets multifactor_auth_app + * + * @param BooleanSettingUpdate|null $multifactor_auth_app whether authenticator-app multifactor authentication is enabled for the team + * + * @return self + */ + public function setMultifactorAuthApp(?BooleanSettingUpdate $multifactor_auth_app) + { + if (is_null($multifactor_auth_app)) { + throw new InvalidArgumentException('non-nullable multifactor_auth_app cannot be null'); + } + $this->container['multifactor_auth_app'] = $multifactor_auth_app; + + return $this; + } + + /** + * Gets multifactor_auth_sms + * + * @return BooleanSettingUpdate|null + */ + public function getMultifactorAuthSms() + { + return $this->container['multifactor_auth_sms']; + } + + /** + * Sets multifactor_auth_sms + * + * @param BooleanSettingUpdate|null $multifactor_auth_sms whether SMS multifactor authentication is enabled for the team + * + * @return self + */ + public function setMultifactorAuthSms(?BooleanSettingUpdate $multifactor_auth_sms) + { + if (is_null($multifactor_auth_sms)) { + throw new InvalidArgumentException('non-nullable multifactor_auth_sms cannot be null'); + } + $this->container['multifactor_auth_sms'] = $multifactor_auth_sms; + + return $this; + } + + /** + * Gets unset + * + * @return string[]|null + */ + public function getUnset() + { + return $this->container['unset']; + } + + /** + * Sets unset + * + * @param string[]|null $unset Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + * + * @return self + */ + public function setUnset(?array $unset) + { + if (is_null($unset)) { + throw new InvalidArgumentException('non-nullable unset cannot be null'); + } + $allowedValues = $this->getUnsetAllowableValues(); + if (array_diff($unset, $allowedValues)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value for 'unset', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + + $this->container['unset'] = $unset; + + 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/python/README.md b/sdks/python/README.md index 820c67eb6..8dd9303dd 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -105,6 +105,8 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- |```AccountApi``` | [```account_create```](docs/AccountApi.md#account_create) | ```POST /account/create``` | Create Account| ```AccountApi``` | [```account_get```](docs/AccountApi.md#account_get) | ```GET /account``` | Get Account| +```AccountApi``` | [```account_settings_get```](docs/AccountApi.md#account_settings_get) | ```GET /account/settings``` | Get account settings| +```AccountApi``` | [```account_settings_update```](docs/AccountApi.md#account_settings_update) | ```POST /account/settings``` | Modify account settings| ```AccountApi``` | [```account_update```](docs/AccountApi.md#account_update) | ```PUT /account``` | Update Account| ```AccountApi``` | [```account_verify```](docs/AccountApi.md#account_verify) | ```POST /account/verify``` | Verify Account| |```ApiAppApi``` | [```api_app_create```](docs/ApiAppApi.md#api_app_create) | ```POST /api_app``` | Create API App| @@ -160,6 +162,8 @@ Class | Method | HTTP request | Description ```TeamApi``` | [```team_invites```](docs/TeamApi.md#team_invites) | ```GET /team/invites``` | List Team Invites| ```TeamApi``` | [```team_members```](docs/TeamApi.md#team_members) | ```GET /team/members/{team_id}``` | List Team Members| ```TeamApi``` | [```team_remove_member```](docs/TeamApi.md#team_remove_member) | ```POST /team/remove_member``` | Remove User from Team| +```TeamApi``` | [```team_settings_get```](docs/TeamApi.md#team_settings_get) | ```GET /team/settings``` | Get team settings| +```TeamApi``` | [```team_settings_update```](docs/TeamApi.md#team_settings_update) | ```POST /team/settings``` | Modify team settings| ```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| @@ -188,6 +192,9 @@ Class | Method | HTTP request | Description - [AccountResponseQuotas](docs/AccountResponseQuotas.md) - [AccountResponseSettings](docs/AccountResponseSettings.md) - [AccountResponseUsage](docs/AccountResponseUsage.md) + - [AccountSettingsResponse](docs/AccountSettingsResponse.md) + - [AccountSettingsResponseSettings](docs/AccountSettingsResponseSettings.md) + - [AccountSettingsUpdateRequest](docs/AccountSettingsUpdateRequest.md) - [AccountUpdateRequest](docs/AccountUpdateRequest.md) - [AccountVerifyRequest](docs/AccountVerifyRequest.md) - [AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -201,11 +208,16 @@ Class | Method | HTTP request | Description - [ApiAppResponseOwnerAccount](docs/ApiAppResponseOwnerAccount.md) - [ApiAppResponseWhiteLabelingOptions](docs/ApiAppResponseWhiteLabelingOptions.md) - [ApiAppUpdateRequest](docs/ApiAppUpdateRequest.md) + - [BooleanSettingUpdate](docs/BooleanSettingUpdate.md) - [BulkSendJobGetResponse](docs/BulkSendJobGetResponse.md) - [BulkSendJobGetResponseSignatureRequests](docs/BulkSendJobGetResponseSignatureRequests.md) - [BulkSendJobListResponse](docs/BulkSendJobListResponse.md) - [BulkSendJobResponse](docs/BulkSendJobResponse.md) - [BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md) + - [DataResidency](docs/DataResidency.md) + - [DataResidencySettingUpdate](docs/DataResidencySettingUpdate.md) + - [DateFormat](docs/DateFormat.md) + - [DateFormatSettingUpdate](docs/DateFormatSettingUpdate.md) - [DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md) - [DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md) - [DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md) @@ -244,6 +256,10 @@ Class | Method | HTTP request | Description - [ReportCreateRequest](docs/ReportCreateRequest.md) - [ReportCreateResponse](docs/ReportCreateResponse.md) - [ReportResponse](docs/ReportResponse.md) + - [RequiredSignatureType](docs/RequiredSignatureType.md) + - [RequiredSignatureTypesSettingUpdate](docs/RequiredSignatureTypesSettingUpdate.md) + - [SettingLockResponse](docs/SettingLockResponse.md) + - [SettingResponse](docs/SettingResponse.md) - [SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) @@ -276,6 +292,7 @@ Class | Method | HTTP request | Description - [SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) + - [StringSettingUpdate](docs/StringSettingUpdate.md) - [SubAttachment](docs/SubAttachment.md) - [SubBulkSignerList](docs/SubBulkSignerList.md) - [SubBulkSignerListCustomField](docs/SubBulkSignerListCustomField.md) @@ -324,6 +341,10 @@ Class | Method | HTTP request | Description - [TeamParentResponse](docs/TeamParentResponse.md) - [TeamRemoveMemberRequest](docs/TeamRemoveMemberRequest.md) - [TeamResponse](docs/TeamResponse.md) + - [TeamSettingLock](docs/TeamSettingLock.md) + - [TeamSettingsResponse](docs/TeamSettingsResponse.md) + - [TeamSettingsResponseSettings](docs/TeamSettingsResponseSettings.md) + - [TeamSettingsUpdateRequest](docs/TeamSettingsUpdateRequest.md) - [TeamSubTeamsResponse](docs/TeamSubTeamsResponse.md) - [TeamUpdateRequest](docs/TeamUpdateRequest.md) - [TemplateAddUserRequest](docs/TemplateAddUserRequest.md) diff --git a/sdks/python/docs/AccountApi.md b/sdks/python/docs/AccountApi.md index baf60a9f2..1ee4dd938 100644 --- a/sdks/python/docs/AccountApi.md +++ b/sdks/python/docs/AccountApi.md @@ -6,6 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- |[```account_create```](AccountApi.md#account_create) | ```POST /account/create``` | Create Account| |[```account_get```](AccountApi.md#account_get) | ```GET /account``` | Get Account| +|[```account_settings_get```](AccountApi.md#account_settings_get) | ```GET /account/settings``` | Get account settings| +|[```account_settings_update```](AccountApi.md#account_settings_update) | ```POST /account/settings``` | Modify account settings| |[```account_update```](AccountApi.md#account_update) | ```PUT /account``` | Update Account| |[```account_verify```](AccountApi.md#account_verify) | ```POST /account/verify``` | Verify Account| @@ -141,6 +143,157 @@ with ApiClient(configuration) as api_client: [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# ```account_settings_get``` +> ```AccountSettingsResponse account_settings_get()``` + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_settings_get() + company = response.settings.company + + pprint(response) + pprint( + { + "account_id": response.account_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "warnings": response.warnings, + } + ) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_get: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_id` | **str** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```account_settings_update``` +> ```AccountSettingsResponse account_settings_update(account_settings_update_request)``` + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_settings_update_request = models.AccountSettingsUpdateRequest( + date_format=models.DateFormat.MM_SLASH_DD_SLASH_YYYY, + required_signature_types=[ + models.RequiredSignatureType.DRAW, + models.RequiredSignatureType.TYPE, + ], + should_enable_tamper_proof=False, + unset=["company"], + ) + + try: + response = api.AccountApi(api_client).account_settings_update( + account_settings_update_request=account_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_settings_update: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_settings_update_request` | [**AccountSettingsUpdateRequest**](AccountSettingsUpdateRequest.md) | | | +| `account_id` | **str** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # ```account_update``` > ```AccountGetResponse account_update(account_update_request)``` diff --git a/sdks/python/docs/AccountSettingsResponse.md b/sdks/python/docs/AccountSettingsResponse.md new file mode 100644 index 000000000..57c513a79 --- /dev/null +++ b/sdks/python/docs/AccountSettingsResponse.md @@ -0,0 +1,14 @@ +# AccountSettingsResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `account_id`*_required_ | ```str``` | | | +| `settings`*_required_ | [```AccountSettingsResponseSettings```](AccountSettingsResponseSettings.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/AccountSettingsResponseSettings.md b/sdks/python/docs/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..10dd8ecf2 --- /dev/null +++ b/sdks/python/docs/AccountSettingsResponseSettings.md @@ -0,0 +1,37 @@ +# AccountSettingsResponseSettings + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + +[[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/AccountSettingsUpdateRequest.md b/sdks/python/docs/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..b08749b08 --- /dev/null +++ b/sdks/python/docs/AccountSettingsUpdateRequest.md @@ -0,0 +1,38 @@ +# AccountSettingsUpdateRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | ```str``` | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | ```bool``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | ```str``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | ```str``` | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```DateFormat```](DateFormat.md) | | | +| `is_signature_reminders_enabled` | ```bool``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | ```str``` | Sender name shown on signature request emails. | | +| `request_email_signature` | ```str``` | Signature appended to signature request emails. | | +| `required_signature_types` | [```List[RequiredSignatureType]```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | ```bool``` | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | ```bool``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | ```bool``` | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | ```bool``` | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | ```bool``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled` | ```bool``` | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled` | ```bool``` | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete` | ```bool``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs` | ```bool``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others` | ```bool``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs` | ```bool``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others` | ```bool``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary` | ```bool``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails` | ```bool``` | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email` | ```bool``` | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails` | ```bool``` | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled` | ```bool``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | ```List[str]``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[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/BooleanSettingUpdate.md b/sdks/python/docs/BooleanSettingUpdate.md new file mode 100644 index 000000000..8b56145bf --- /dev/null +++ b/sdks/python/docs/BooleanSettingUpdate.md @@ -0,0 +1,13 @@ +# BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```bool``` | Boolean value to store. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.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/DataResidency.md b/sdks/python/docs/DataResidency.md new file mode 100644 index 000000000..e2df7fdde --- /dev/null +++ b/sdks/python/docs/DataResidency.md @@ -0,0 +1,11 @@ +# DataResidency + +Storage region for team documents. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/DataResidencySettingUpdate.md b/sdks/python/docs/DataResidencySettingUpdate.md new file mode 100644 index 000000000..dfd2aaf57 --- /dev/null +++ b/sdks/python/docs/DataResidencySettingUpdate.md @@ -0,0 +1,13 @@ +# DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```DataResidency```](DataResidency.md) | | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.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/DateFormat.md b/sdks/python/docs/DateFormat.md new file mode 100644 index 000000000..cae779f14 --- /dev/null +++ b/sdks/python/docs/DateFormat.md @@ -0,0 +1,11 @@ +# DateFormat + +Date format used to display dates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/DateFormatSettingUpdate.md b/sdks/python/docs/DateFormatSettingUpdate.md new file mode 100644 index 000000000..88966a2da --- /dev/null +++ b/sdks/python/docs/DateFormatSettingUpdate.md @@ -0,0 +1,13 @@ +# DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```DateFormat```](DateFormat.md) | | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.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/RequiredSignatureType.md b/sdks/python/docs/RequiredSignatureType.md new file mode 100644 index 000000000..3370f2c80 --- /dev/null +++ b/sdks/python/docs/RequiredSignatureType.md @@ -0,0 +1,11 @@ +# RequiredSignatureType + +A signature creation method a signer may use. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/RequiredSignatureTypesSettingUpdate.md b/sdks/python/docs/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..d91ef19c8 --- /dev/null +++ b/sdks/python/docs/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,13 @@ +# RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | [```List[RequiredSignatureType]```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.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/SettingLockResponse.md b/sdks/python/docs/SettingLockResponse.md new file mode 100644 index 000000000..61b25dc10 --- /dev/null +++ b/sdks/python/docs/SettingLockResponse.md @@ -0,0 +1,13 @@ +# SettingLockResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `mode`*_required_ | [```TeamSettingLock```](TeamSettingLock.md) | | | +| `source`*_required_ | ```str``` | | | + +[[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/SettingResponse.md b/sdks/python/docs/SettingResponse.md new file mode 100644 index 000000000..606f640ab --- /dev/null +++ b/sdks/python/docs/SettingResponse.md @@ -0,0 +1,17 @@ +# SettingResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value`*_required_ | ```object``` | Current value of the setting. Null when the setting has no value. | | +| `is_inherited`*_required_ | ```bool``` | | | +| `source`*_required_ | ```str``` | | | +| `type`*_required_ | ```str``` | | | +| `writable`*_required_ | ```bool``` | | | +| `lock`*_required_ | [```SettingLockResponse```](SettingLockResponse.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/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 21530206a..9dca77ae2 100644 --- a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes | `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Dict[str, object]``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```str``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | diff --git a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md index f400bd969..16202828f 100644 --- a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes | `client_id` | ```str``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```str``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Dict[str, object]``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```str``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | diff --git a/sdks/python/docs/StringSettingUpdate.md b/sdks/python/docs/StringSettingUpdate.md new file mode 100644 index 000000000..27e195ec3 --- /dev/null +++ b/sdks/python/docs/StringSettingUpdate.md @@ -0,0 +1,13 @@ +# StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `value` | ```str``` | String value to store. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.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/SubBulkSignerList.md b/sdks/python/docs/SubBulkSignerList.md index 21df799f7..9206bd361 100644 --- a/sdks/python/docs/SubBulkSignerList.md +++ b/sdks/python/docs/SubBulkSignerList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `custom_fields` | [```List[SubBulkSignerListCustomField]```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```Dict[str, object]``` | _t__Sub::BulkSigner::METADATA | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamApi.md b/sdks/python/docs/TeamApi.md index e61896a51..e75fdbe80 100644 --- a/sdks/python/docs/TeamApi.md +++ b/sdks/python/docs/TeamApi.md @@ -12,6 +12,8 @@ Method | HTTP request | Description |[```team_invites```](TeamApi.md#team_invites) | ```GET /team/invites``` | List Team Invites| |[```team_members```](TeamApi.md#team_members) | ```GET /team/members/{team_id}``` | List Team Members| |[```team_remove_member```](TeamApi.md#team_remove_member) | ```POST /team/remove_member``` | Remove User from Team| +|[```team_settings_get```](TeamApi.md#team_settings_get) | ```GET /team/settings``` | Get team settings| +|[```team_settings_update```](TeamApi.md#team_settings_update) | ```POST /team/settings``` | Modify team settings| |[```team_sub_teams```](TeamApi.md#team_sub_teams) | ```GET /team/sub_teams/{team_id}``` | List Sub Teams| |[```team_update```](TeamApi.md#team_update) | ```PUT /team``` | Update Team| @@ -535,6 +537,169 @@ with ApiClient(configuration) as api_client: [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# ```team_settings_get``` +> ```TeamSettingsResponse team_settings_get()``` + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_settings_get() + company = response.settings.company + data_residency = response.settings.data_residency + + pprint(response) + pprint( + { + "team_id": response.team_id, + "company": { + "value": company.value, + "is_inherited": company.is_inherited, + "source": company.source, + "type": company.type, + "writable": company.writable, + "lock": { + "mode": company.lock.mode, + "source": company.lock.source, + }, + }, + "data_residency": { + "value": data_residency.value, + "is_inherited": data_residency.is_inherited, + "source": data_residency.source, + "type": data_residency.type, + "writable": data_residency.writable, + "lock": { + "mode": data_residency.lock.mode, + "source": data_residency.lock.source, + }, + }, + "warnings": response.warnings, + } + ) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_get: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `team_id` | **str** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```team_settings_update``` +> ```TeamSettingsResponse team_settings_update(team_settings_update_request)``` + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_settings_update_request = models.TeamSettingsUpdateRequest( + data_residency=models.DataResidencySettingUpdate( + value=models.DataResidency.EU, + ), + company=models.StringSettingUpdate( + value="Northwind", + lock_mode=models.TeamSettingLock.ORGANIZATION_ADMINS, + ), + ) + + try: + response = api.TeamApi(api_client).team_settings_update( + team_settings_update_request=team_settings_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_settings_update: %s\n" % e) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `team_settings_update_request` | [**TeamSettingsUpdateRequest**](TeamSettingsUpdateRequest.md) | | | +| `team_id` | **str** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # ```team_sub_teams``` > ```TeamSubTeamsResponse team_sub_teams(team_id)``` diff --git a/sdks/python/docs/TeamCreateRequest.md b/sdks/python/docs/TeamCreateRequest.md index 8491afc10..f33cdcb78 100644 --- a/sdks/python/docs/TeamCreateRequest.md +++ b/sdks/python/docs/TeamCreateRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `name` | ```str``` | The name of your Team. | [default to 'Untitled Team'] | +| `parent_team_id` | ```str``` | _t__TeamCreate::PARENT_TEAM_ID | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/docs/TeamResponse.md b/sdks/python/docs/TeamResponse.md index f8b211bdf..04c24ce1e 100644 --- a/sdks/python/docs/TeamResponse.md +++ b/sdks/python/docs/TeamResponse.md @@ -5,6 +5,8 @@ Contains information about your team and its members ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +| `team_id` | ```str``` | The id of a team | | +| `parent_team_id` | ```str``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```str``` | The name of your Team | | | `accounts` | [```List[AccountResponse]```](AccountResponse.md) | | | | `invited_accounts` | [```List[AccountResponse]```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/python/docs/TeamSettingLock.md b/sdks/python/docs/TeamSettingLock.md new file mode 100644 index 000000000..726899dcf --- /dev/null +++ b/sdks/python/docs/TeamSettingLock.md @@ -0,0 +1,11 @@ +# TeamSettingLock + +Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/TeamSettingsResponse.md b/sdks/python/docs/TeamSettingsResponse.md new file mode 100644 index 000000000..b9281a560 --- /dev/null +++ b/sdks/python/docs/TeamSettingsResponse.md @@ -0,0 +1,14 @@ +# TeamSettingsResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `team_id`*_required_ | ```str``` | | | +| `settings`*_required_ | [```TeamSettingsResponseSettings```](TeamSettingsResponseSettings.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/TeamSettingsResponseSettings.md b/sdks/python/docs/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..78e578584 --- /dev/null +++ b/sdks/python/docs/TeamSettingsResponseSettings.md @@ -0,0 +1,36 @@ +# TeamSettingsResponseSettings + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency`*_required_ | [```SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + +[[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/TeamSettingsUpdateRequest.md b/sdks/python/docs/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..d965f568a --- /dev/null +++ b/sdks/python/docs/TeamSettingsUpdateRequest.md @@ -0,0 +1,37 @@ +# TeamSettingsUpdateRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `company` | [```StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | [```StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | [```StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | [```StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `request_email_signature` | [```StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `required_signature_types` | [```RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency` | [```DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | ```List[str]``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + +[[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 7ce90d462..8cc07a8fc 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -39,6 +39,13 @@ from dropbox_sign.models.account_response_quotas import AccountResponseQuotas from dropbox_sign.models.account_response_settings import AccountResponseSettings from dropbox_sign.models.account_response_usage import AccountResponseUsage +from dropbox_sign.models.account_settings_response import AccountSettingsResponse +from dropbox_sign.models.account_settings_response_settings import ( + AccountSettingsResponseSettings, +) +from dropbox_sign.models.account_settings_update_request import ( + AccountSettingsUpdateRequest, +) from dropbox_sign.models.account_update_request import AccountUpdateRequest from dropbox_sign.models.account_verify_request import AccountVerifyRequest from dropbox_sign.models.account_verify_response import AccountVerifyResponse @@ -58,6 +65,7 @@ ApiAppResponseWhiteLabelingOptions, ) from dropbox_sign.models.api_app_update_request import ApiAppUpdateRequest +from dropbox_sign.models.boolean_setting_update import BooleanSettingUpdate from dropbox_sign.models.bulk_send_job_get_response import BulkSendJobGetResponse from dropbox_sign.models.bulk_send_job_get_response_signature_requests import ( BulkSendJobGetResponseSignatureRequests, @@ -65,6 +73,10 @@ from dropbox_sign.models.bulk_send_job_list_response import BulkSendJobListResponse from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse +from dropbox_sign.models.data_residency import DataResidency +from dropbox_sign.models.data_residency_setting_update import DataResidencySettingUpdate +from dropbox_sign.models.date_format import DateFormat +from dropbox_sign.models.date_format_setting_update import DateFormatSettingUpdate from dropbox_sign.models.document_field_detection_request import ( DocumentFieldDetectionRequest, ) @@ -123,6 +135,12 @@ from dropbox_sign.models.report_create_request import ReportCreateRequest from dropbox_sign.models.report_create_response import ReportCreateResponse from dropbox_sign.models.report_response import ReportResponse +from dropbox_sign.models.required_signature_type import RequiredSignatureType +from dropbox_sign.models.required_signature_types_setting_update import ( + RequiredSignatureTypesSettingUpdate, +) +from dropbox_sign.models.setting_lock_response import SettingLockResponse +from dropbox_sign.models.setting_response import SettingResponse from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import ( SignatureRequestBulkCreateEmbeddedWithTemplateRequest, ) @@ -217,6 +235,7 @@ from dropbox_sign.models.signature_request_update_request import ( SignatureRequestUpdateRequest, ) +from dropbox_sign.models.string_setting_update import StringSettingUpdate from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList from dropbox_sign.models.sub_bulk_signer_list_custom_field import ( @@ -299,6 +318,12 @@ from dropbox_sign.models.team_parent_response import TeamParentResponse from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest from dropbox_sign.models.team_response import TeamResponse +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from dropbox_sign.models.team_settings_response import TeamSettingsResponse +from dropbox_sign.models.team_settings_response_settings import ( + TeamSettingsResponseSettings, +) +from dropbox_sign.models.team_settings_update_request import TeamSettingsUpdateRequest from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse from dropbox_sign.models.team_update_request import TeamUpdateRequest from dropbox_sign.models.template_add_user_request import TemplateAddUserRequest diff --git a/sdks/python/dropbox_sign/api/account_api.py b/sdks/python/dropbox_sign/api/account_api.py index 887a72b51..ac61e1279 100644 --- a/sdks/python/dropbox_sign/api/account_api.py +++ b/sdks/python/dropbox_sign/api/account_api.py @@ -23,6 +23,10 @@ from dropbox_sign.models.account_create_request import AccountCreateRequest from dropbox_sign.models.account_create_response import AccountCreateResponse from dropbox_sign.models.account_get_response import AccountGetResponse +from dropbox_sign.models.account_settings_response import AccountSettingsResponse +from dropbox_sign.models.account_settings_update_request import ( + AccountSettingsUpdateRequest, +) from dropbox_sign.models.account_update_request import AccountUpdateRequest from dropbox_sign.models.account_verify_request import AccountVerifyRequest from dropbox_sign.models.account_verify_response import AccountVerifyResponse @@ -634,6 +638,595 @@ def _account_get_serialize( _request_auth=_request_auth, ) + @validate_call + def account_settings_get( + self, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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, + ) -> AccountSettingsResponse: + """Get account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsGetExample.py + + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_get_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "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 account_settings_get_with_http_info( + self, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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[AccountSettingsResponse]: + """Get account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsGetExample.py + + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_get_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "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 account_settings_get_without_preload_content( + self, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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: + """Get account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsGetExample.py + + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_get_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "4XX": "ErrorResponse", + } + + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _account_settings_get_serialize( + self, + account_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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(("account_id", account_id)) + + # 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", "oauth2"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/account/settings", + 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 account_settings_update( + self, + account_settings_update_request: AccountSettingsUpdateRequest, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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, + ) -> AccountSettingsResponse: + """Modify account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsUpdateExample.py + + :param account_settings_update_request: (required) + :type account_settings_update_request: AccountSettingsUpdateRequest + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_update_serialize( + account_settings_update_request=account_settings_update_request, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "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 account_settings_update_with_http_info( + self, + account_settings_update_request: AccountSettingsUpdateRequest, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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[AccountSettingsResponse]: + """Modify account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsUpdateExample.py + + :param account_settings_update_request: (required) + :type account_settings_update_request: AccountSettingsUpdateRequest + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_update_serialize( + account_settings_update_request=account_settings_update_request, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "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 account_settings_update_without_preload_content( + self, + account_settings_update_request: AccountSettingsUpdateRequest, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer." + ), + ] = 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: + """Modify account settings + + account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/AccountSettingsUpdateExample.py + + :param account_settings_update_request: (required) + :type account_settings_update_request: AccountSettingsUpdateRequest + :param account_id: Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + :type account_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._account_settings_update_serialize( + account_settings_update_request=account_settings_update_request, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountSettingsResponse", + "4XX": "ErrorResponse", + } + + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _account_settings_update_serialize( + self, + account_settings_update_request, + account_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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = account_settings_update_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 + if account_id is not None: + + _query_params.append(("account_id", account_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + if account_settings_update_request is not None and has_files is False: + _body_params = account_settings_update_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"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/account/settings", + 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 account_update( self, diff --git a/sdks/python/dropbox_sign/api/team_api.py b/sdks/python/dropbox_sign/api/team_api.py index db6adcc16..802b25de4 100644 --- a/sdks/python/dropbox_sign/api/team_api.py +++ b/sdks/python/dropbox_sign/api/team_api.py @@ -27,6 +27,8 @@ from dropbox_sign.models.team_invites_response import TeamInvitesResponse from dropbox_sign.models.team_members_response import TeamMembersResponse from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest +from dropbox_sign.models.team_settings_response import TeamSettingsResponse +from dropbox_sign.models.team_settings_update_request import TeamSettingsUpdateRequest from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse from dropbox_sign.models.team_update_request import TeamUpdateRequest @@ -2273,6 +2275,595 @@ def _team_remove_member_serialize( _request_auth=_request_auth, ) + @validate_call + def team_settings_get( + self, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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, + ) -> TeamSettingsResponse: + """Get team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsGetExample.py + + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_get_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "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 team_settings_get_with_http_info( + self, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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[TeamSettingsResponse]: + """Get team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsGetExample.py + + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_get_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "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 team_settings_get_without_preload_content( + self, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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: + """Get team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsGetExample.py + + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_get_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "4XX": "ErrorResponse", + } + + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _team_settings_get_serialize( + self, + team_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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if team_id is not None: + + _query_params.append(("team_id", team_id)) + + # 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", "oauth2"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/team/settings", + 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 team_settings_update( + self, + team_settings_update_request: TeamSettingsUpdateRequest, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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, + ) -> TeamSettingsResponse: + """Modify team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsUpdateExample.py + + :param team_settings_update_request: (required) + :type team_settings_update_request: TeamSettingsUpdateRequest + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_update_serialize( + team_settings_update_request=team_settings_update_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "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 team_settings_update_with_http_info( + self, + team_settings_update_request: TeamSettingsUpdateRequest, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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[TeamSettingsResponse]: + """Modify team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsUpdateExample.py + + :param team_settings_update_request: (required) + :type team_settings_update_request: TeamSettingsUpdateRequest + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_update_serialize( + team_settings_update_request=team_settings_update_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "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 team_settings_update_without_preload_content( + self, + team_settings_update_request: TeamSettingsUpdateRequest, + team_id: Annotated[ + Optional[StrictStr], + Field( + description="Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam." + ), + ] = 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: + """Modify team settings + + team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + + Example: https://github.com/hellosign/dropbox-sign-python/blob/main/examples/TeamSettingsUpdateExample.py + + :param team_settings_update_request: (required) + :type team_settings_update_request: TeamSettingsUpdateRequest + :param team_id: Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + :type team_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._team_settings_update_serialize( + team_settings_update_request=team_settings_update_request, + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "TeamSettingsResponse", + "4XX": "ErrorResponse", + } + + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _team_settings_update_serialize( + self, + team_settings_update_request, + team_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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = team_settings_update_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 + if team_id is not None: + + _query_params.append(("team_id", team_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + if team_settings_update_request is not None and has_files is False: + _body_params = team_settings_update_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"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/team/settings", + 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 team_sub_teams( self, diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index fd379ccb5..beb137268 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -22,6 +22,13 @@ from dropbox_sign.models.account_response_quotas import AccountResponseQuotas from dropbox_sign.models.account_response_settings import AccountResponseSettings from dropbox_sign.models.account_response_usage import AccountResponseUsage +from dropbox_sign.models.account_settings_response import AccountSettingsResponse +from dropbox_sign.models.account_settings_response_settings import ( + AccountSettingsResponseSettings, +) +from dropbox_sign.models.account_settings_update_request import ( + AccountSettingsUpdateRequest, +) from dropbox_sign.models.account_update_request import AccountUpdateRequest from dropbox_sign.models.account_verify_request import AccountVerifyRequest from dropbox_sign.models.account_verify_response import AccountVerifyResponse @@ -41,6 +48,7 @@ ApiAppResponseWhiteLabelingOptions, ) from dropbox_sign.models.api_app_update_request import ApiAppUpdateRequest +from dropbox_sign.models.boolean_setting_update import BooleanSettingUpdate from dropbox_sign.models.bulk_send_job_get_response import BulkSendJobGetResponse from dropbox_sign.models.bulk_send_job_get_response_signature_requests import ( BulkSendJobGetResponseSignatureRequests, @@ -48,6 +56,10 @@ from dropbox_sign.models.bulk_send_job_list_response import BulkSendJobListResponse from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse +from dropbox_sign.models.data_residency import DataResidency +from dropbox_sign.models.data_residency_setting_update import DataResidencySettingUpdate +from dropbox_sign.models.date_format import DateFormat +from dropbox_sign.models.date_format_setting_update import DateFormatSettingUpdate from dropbox_sign.models.document_field_detection_request import ( DocumentFieldDetectionRequest, ) @@ -106,6 +118,12 @@ from dropbox_sign.models.report_create_request import ReportCreateRequest from dropbox_sign.models.report_create_response import ReportCreateResponse from dropbox_sign.models.report_response import ReportResponse +from dropbox_sign.models.required_signature_type import RequiredSignatureType +from dropbox_sign.models.required_signature_types_setting_update import ( + RequiredSignatureTypesSettingUpdate, +) +from dropbox_sign.models.setting_lock_response import SettingLockResponse +from dropbox_sign.models.setting_response import SettingResponse from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import ( SignatureRequestBulkCreateEmbeddedWithTemplateRequest, ) @@ -200,6 +218,7 @@ from dropbox_sign.models.signature_request_update_request import ( SignatureRequestUpdateRequest, ) +from dropbox_sign.models.string_setting_update import StringSettingUpdate from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList from dropbox_sign.models.sub_bulk_signer_list_custom_field import ( @@ -282,6 +301,12 @@ from dropbox_sign.models.team_parent_response import TeamParentResponse from dropbox_sign.models.team_remove_member_request import TeamRemoveMemberRequest from dropbox_sign.models.team_response import TeamResponse +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from dropbox_sign.models.team_settings_response import TeamSettingsResponse +from dropbox_sign.models.team_settings_response_settings import ( + TeamSettingsResponseSettings, +) +from dropbox_sign.models.team_settings_update_request import TeamSettingsUpdateRequest from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse from dropbox_sign.models.team_update_request import TeamUpdateRequest from dropbox_sign.models.template_add_user_request import TemplateAddUserRequest diff --git a/sdks/python/dropbox_sign/models/account_settings_response.py b/sdks/python/dropbox_sign/models/account_settings_response.py new file mode 100644 index 000000000..e678289b6 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_settings_response.py @@ -0,0 +1,156 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.account_settings_response_settings import ( + AccountSettingsResponseSettings, +) +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class AccountSettingsResponse(BaseModel): + """ + AccountSettingsResponse + """ # noqa: E501 + + account_id: StrictStr + settings: AccountSettingsResponseSettings + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = ["account_id", "settings", "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 AccountSettingsResponse 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 settings + if self.settings: + _dict["settings"] = self.settings.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 AccountSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "settings": ( + AccountSettingsResponseSettings.from_dict(obj["settings"]) + if obj.get("settings") 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 { + "account_id": "(str,)", + "settings": "(AccountSettingsResponseSettings,)", + "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/account_settings_response_settings.py b/sdks/python/dropbox_sign/models/account_settings_response_settings.py new file mode 100644 index 000000000..465aaf0e0 --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_settings_response_settings.py @@ -0,0 +1,509 @@ +# 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 +from dropbox_sign.models.setting_response import SettingResponse +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class AccountSettingsResponseSettings(BaseModel): + """ + AccountSettingsResponseSettings + """ # noqa: E501 + + company: SettingResponse = Field( + description="Company name associated with this account or team." + ) + custom_signing_redirect_enabled: SettingResponse = Field( + description="Whether signers are redirected to a custom URL after completing a signature request." + ) + custom_signing_redirect_url: SettingResponse = Field( + description="URL where signers are redirected after completing a signature request when custom redirects are enabled." + ) + custom_tagline: SettingResponse = Field( + description="Custom tagline displayed with the account or team branding." + ) + date_format: SettingResponse = Field( + description="Date format used to display dates. List the setting in `unset` to inherit the default." + ) + is_signature_reminders_enabled: SettingResponse = Field( + description="Whether automatic reminder emails are enabled for incomplete signature requests." + ) + request_email_from: SettingResponse = Field( + description="Sender name shown on signature request emails." + ) + request_email_signature: SettingResponse = Field( + description="Signature appended to signature request emails." + ) + required_signature_types: SettingResponse = Field( + description="Signature creation methods signers may use." + ) + should_enable_tamper_proof: SettingResponse = Field( + description="Whether completed documents include a digital tamper-proof seal." + ) + should_include_distinct_pdfs: SettingResponse = Field( + description="Whether completed documents remain as separate PDF files instead of being merged into one PDF." + ) + should_offer_signer_access_code: SettingResponse = Field( + description="Whether senders can require an access code to verify a signer." + ) + should_offer_signer_sms_authentication: SettingResponse = Field( + description="Whether senders can require SMS authentication to verify a signer." + ) + should_remove_document_id: SettingResponse = Field( + description="Whether the Dropbox Sign document ID is hidden on sent documents." + ) + is_notify_on_sign_enabled: SettingResponse = Field( + description="Whether to notify the account when someone signs a document it sent." + ) + is_notify_on_view_enabled: SettingResponse = Field( + description="Whether to notify the account when someone opens a document it sent." + ) + should_autocomplete: SettingResponse = Field( + description="Whether values entered in text fields are saved and suggested for future signature requests." + ) + should_include_requested_pdfs: SettingResponse = Field( + description="Whether completed signature requests include PDF copies in emails sent to the account." + ) + should_include_requested_pdfs_for_others: SettingResponse = Field( + description="Whether completed signature requests include PDF copies in emails sent to signers and CC recipients." + ) + should_include_sent_doc_pdfs: SettingResponse = Field( + description="Whether emails sent to the account include PDF copies of documents it sends." + ) + should_include_sent_doc_pdfs_for_others: SettingResponse = Field( + description="Whether emails sent to recipients include PDF copies of documents the account sends." + ) + should_send_daily_summary: SettingResponse = Field( + description="Whether to send the account a daily email summarizing outstanding signature requests." + ) + should_send_embedded_signature_conf_emails: SettingResponse = Field( + description="Whether to notify the account when it signs a document on a third-party site." + ) + should_send_ordered_sr_email: SettingResponse = Field( + description="Whether to notify all parties when an ordered signature request starts." + ) + should_send_outbound_conf_emails: SettingResponse = Field( + description="Whether to notify the account when it signs and sends a document." + ) + template_link_signature_emails_enabled: SettingResponse = Field( + description="Whether to notify the account when someone signs a document sent by its team through a template link." + ) + __properties: ClassVar[List[str]] = [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "is_notify_on_sign_enabled", + "is_notify_on_view_enabled", + "should_autocomplete", + "should_include_requested_pdfs", + "should_include_requested_pdfs_for_others", + "should_include_sent_doc_pdfs", + "should_include_sent_doc_pdfs_for_others", + "should_send_daily_summary", + "should_send_embedded_signature_conf_emails", + "should_send_ordered_sr_email", + "should_send_outbound_conf_emails", + "template_link_signature_emails_enabled", + ] + + 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 AccountSettingsResponseSettings 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 company + if self.company: + _dict["company"] = self.company.to_dict() + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_enabled + if self.custom_signing_redirect_enabled: + _dict["custom_signing_redirect_enabled"] = ( + self.custom_signing_redirect_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_url + if self.custom_signing_redirect_url: + _dict["custom_signing_redirect_url"] = ( + self.custom_signing_redirect_url.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_tagline + if self.custom_tagline: + _dict["custom_tagline"] = self.custom_tagline.to_dict() + # override the default output from pydantic by calling `to_dict()` of date_format + if self.date_format: + _dict["date_format"] = self.date_format.to_dict() + # override the default output from pydantic by calling `to_dict()` of is_signature_reminders_enabled + if self.is_signature_reminders_enabled: + _dict["is_signature_reminders_enabled"] = ( + self.is_signature_reminders_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of request_email_from + if self.request_email_from: + _dict["request_email_from"] = self.request_email_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of request_email_signature + if self.request_email_signature: + _dict["request_email_signature"] = self.request_email_signature.to_dict() + # override the default output from pydantic by calling `to_dict()` of required_signature_types + if self.required_signature_types: + _dict["required_signature_types"] = self.required_signature_types.to_dict() + # override the default output from pydantic by calling `to_dict()` of should_enable_tamper_proof + if self.should_enable_tamper_proof: + _dict["should_enable_tamper_proof"] = ( + self.should_enable_tamper_proof.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_distinct_pdfs + if self.should_include_distinct_pdfs: + _dict["should_include_distinct_pdfs"] = ( + self.should_include_distinct_pdfs.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_access_code + if self.should_offer_signer_access_code: + _dict["should_offer_signer_access_code"] = ( + self.should_offer_signer_access_code.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_sms_authentication + if self.should_offer_signer_sms_authentication: + _dict["should_offer_signer_sms_authentication"] = ( + self.should_offer_signer_sms_authentication.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_remove_document_id + if self.should_remove_document_id: + _dict["should_remove_document_id"] = ( + self.should_remove_document_id.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of is_notify_on_sign_enabled + if self.is_notify_on_sign_enabled: + _dict["is_notify_on_sign_enabled"] = ( + self.is_notify_on_sign_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of is_notify_on_view_enabled + if self.is_notify_on_view_enabled: + _dict["is_notify_on_view_enabled"] = ( + self.is_notify_on_view_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_autocomplete + if self.should_autocomplete: + _dict["should_autocomplete"] = self.should_autocomplete.to_dict() + # override the default output from pydantic by calling `to_dict()` of should_include_requested_pdfs + if self.should_include_requested_pdfs: + _dict["should_include_requested_pdfs"] = ( + self.should_include_requested_pdfs.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_requested_pdfs_for_others + if self.should_include_requested_pdfs_for_others: + _dict["should_include_requested_pdfs_for_others"] = ( + self.should_include_requested_pdfs_for_others.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_sent_doc_pdfs + if self.should_include_sent_doc_pdfs: + _dict["should_include_sent_doc_pdfs"] = ( + self.should_include_sent_doc_pdfs.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_sent_doc_pdfs_for_others + if self.should_include_sent_doc_pdfs_for_others: + _dict["should_include_sent_doc_pdfs_for_others"] = ( + self.should_include_sent_doc_pdfs_for_others.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_send_daily_summary + if self.should_send_daily_summary: + _dict["should_send_daily_summary"] = ( + self.should_send_daily_summary.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_send_embedded_signature_conf_emails + if self.should_send_embedded_signature_conf_emails: + _dict["should_send_embedded_signature_conf_emails"] = ( + self.should_send_embedded_signature_conf_emails.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_send_ordered_sr_email + if self.should_send_ordered_sr_email: + _dict["should_send_ordered_sr_email"] = ( + self.should_send_ordered_sr_email.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_send_outbound_conf_emails + if self.should_send_outbound_conf_emails: + _dict["should_send_outbound_conf_emails"] = ( + self.should_send_outbound_conf_emails.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of template_link_signature_emails_enabled + if self.template_link_signature_emails_enabled: + _dict["template_link_signature_emails_enabled"] = ( + self.template_link_signature_emails_enabled.to_dict() + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountSettingsResponseSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "company": ( + SettingResponse.from_dict(obj["company"]) + if obj.get("company") is not None + else None + ), + "custom_signing_redirect_enabled": ( + SettingResponse.from_dict(obj["custom_signing_redirect_enabled"]) + if obj.get("custom_signing_redirect_enabled") is not None + else None + ), + "custom_signing_redirect_url": ( + SettingResponse.from_dict(obj["custom_signing_redirect_url"]) + if obj.get("custom_signing_redirect_url") is not None + else None + ), + "custom_tagline": ( + SettingResponse.from_dict(obj["custom_tagline"]) + if obj.get("custom_tagline") is not None + else None + ), + "date_format": ( + SettingResponse.from_dict(obj["date_format"]) + if obj.get("date_format") is not None + else None + ), + "is_signature_reminders_enabled": ( + SettingResponse.from_dict(obj["is_signature_reminders_enabled"]) + if obj.get("is_signature_reminders_enabled") is not None + else None + ), + "request_email_from": ( + SettingResponse.from_dict(obj["request_email_from"]) + if obj.get("request_email_from") is not None + else None + ), + "request_email_signature": ( + SettingResponse.from_dict(obj["request_email_signature"]) + if obj.get("request_email_signature") is not None + else None + ), + "required_signature_types": ( + SettingResponse.from_dict(obj["required_signature_types"]) + if obj.get("required_signature_types") is not None + else None + ), + "should_enable_tamper_proof": ( + SettingResponse.from_dict(obj["should_enable_tamper_proof"]) + if obj.get("should_enable_tamper_proof") is not None + else None + ), + "should_include_distinct_pdfs": ( + SettingResponse.from_dict(obj["should_include_distinct_pdfs"]) + if obj.get("should_include_distinct_pdfs") is not None + else None + ), + "should_offer_signer_access_code": ( + SettingResponse.from_dict(obj["should_offer_signer_access_code"]) + if obj.get("should_offer_signer_access_code") is not None + else None + ), + "should_offer_signer_sms_authentication": ( + SettingResponse.from_dict( + obj["should_offer_signer_sms_authentication"] + ) + if obj.get("should_offer_signer_sms_authentication") is not None + else None + ), + "should_remove_document_id": ( + SettingResponse.from_dict(obj["should_remove_document_id"]) + if obj.get("should_remove_document_id") is not None + else None + ), + "is_notify_on_sign_enabled": ( + SettingResponse.from_dict(obj["is_notify_on_sign_enabled"]) + if obj.get("is_notify_on_sign_enabled") is not None + else None + ), + "is_notify_on_view_enabled": ( + SettingResponse.from_dict(obj["is_notify_on_view_enabled"]) + if obj.get("is_notify_on_view_enabled") is not None + else None + ), + "should_autocomplete": ( + SettingResponse.from_dict(obj["should_autocomplete"]) + if obj.get("should_autocomplete") is not None + else None + ), + "should_include_requested_pdfs": ( + SettingResponse.from_dict(obj["should_include_requested_pdfs"]) + if obj.get("should_include_requested_pdfs") is not None + else None + ), + "should_include_requested_pdfs_for_others": ( + SettingResponse.from_dict( + obj["should_include_requested_pdfs_for_others"] + ) + if obj.get("should_include_requested_pdfs_for_others") is not None + else None + ), + "should_include_sent_doc_pdfs": ( + SettingResponse.from_dict(obj["should_include_sent_doc_pdfs"]) + if obj.get("should_include_sent_doc_pdfs") is not None + else None + ), + "should_include_sent_doc_pdfs_for_others": ( + SettingResponse.from_dict( + obj["should_include_sent_doc_pdfs_for_others"] + ) + if obj.get("should_include_sent_doc_pdfs_for_others") is not None + else None + ), + "should_send_daily_summary": ( + SettingResponse.from_dict(obj["should_send_daily_summary"]) + if obj.get("should_send_daily_summary") is not None + else None + ), + "should_send_embedded_signature_conf_emails": ( + SettingResponse.from_dict( + obj["should_send_embedded_signature_conf_emails"] + ) + if obj.get("should_send_embedded_signature_conf_emails") is not None + else None + ), + "should_send_ordered_sr_email": ( + SettingResponse.from_dict(obj["should_send_ordered_sr_email"]) + if obj.get("should_send_ordered_sr_email") is not None + else None + ), + "should_send_outbound_conf_emails": ( + SettingResponse.from_dict(obj["should_send_outbound_conf_emails"]) + if obj.get("should_send_outbound_conf_emails") is not None + else None + ), + "template_link_signature_emails_enabled": ( + SettingResponse.from_dict( + obj["template_link_signature_emails_enabled"] + ) + if obj.get("template_link_signature_emails_enabled") 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 { + "company": "(SettingResponse,)", + "custom_signing_redirect_enabled": "(SettingResponse,)", + "custom_signing_redirect_url": "(SettingResponse,)", + "custom_tagline": "(SettingResponse,)", + "date_format": "(SettingResponse,)", + "is_signature_reminders_enabled": "(SettingResponse,)", + "request_email_from": "(SettingResponse,)", + "request_email_signature": "(SettingResponse,)", + "required_signature_types": "(SettingResponse,)", + "should_enable_tamper_proof": "(SettingResponse,)", + "should_include_distinct_pdfs": "(SettingResponse,)", + "should_offer_signer_access_code": "(SettingResponse,)", + "should_offer_signer_sms_authentication": "(SettingResponse,)", + "should_remove_document_id": "(SettingResponse,)", + "is_notify_on_sign_enabled": "(SettingResponse,)", + "is_notify_on_view_enabled": "(SettingResponse,)", + "should_autocomplete": "(SettingResponse,)", + "should_include_requested_pdfs": "(SettingResponse,)", + "should_include_requested_pdfs_for_others": "(SettingResponse,)", + "should_include_sent_doc_pdfs": "(SettingResponse,)", + "should_include_sent_doc_pdfs_for_others": "(SettingResponse,)", + "should_send_daily_summary": "(SettingResponse,)", + "should_send_embedded_signature_conf_emails": "(SettingResponse,)", + "should_send_ordered_sr_email": "(SettingResponse,)", + "should_send_outbound_conf_emails": "(SettingResponse,)", + "template_link_signature_emails_enabled": "(SettingResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_settings_update_request.py b/sdks/python/dropbox_sign/models/account_settings_update_request.py new file mode 100644 index 000000000..1141449ac --- /dev/null +++ b/sdks/python/dropbox_sign/models/account_settings_update_request.py @@ -0,0 +1,378 @@ +# 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, + StrictStr, + field_validator, +) +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.date_format import DateFormat +from dropbox_sign.models.required_signature_type import RequiredSignatureType +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class AccountSettingsUpdateRequest(BaseModel): + """ + AccountSettingsUpdateRequest + """ # noqa: E501 + + company: Optional[StrictStr] = Field( + default=None, description="Company name associated with this account or team." + ) + custom_signing_redirect_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether signers are redirected to a custom URL after completing a signature request.", + ) + custom_signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="URL where signers are redirected after completing a signature request when custom redirects are enabled.", + ) + custom_tagline: Optional[StrictStr] = Field( + default=None, + description="Custom tagline displayed with the account or team branding.", + ) + date_format: Optional[DateFormat] = None + is_signature_reminders_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether automatic reminder emails are enabled for incomplete signature requests.", + ) + request_email_from: Optional[StrictStr] = Field( + default=None, description="Sender name shown on signature request emails." + ) + request_email_signature: Optional[StrictStr] = Field( + default=None, description="Signature appended to signature request emails." + ) + required_signature_types: Optional[List[RequiredSignatureType]] = Field( + default=None, description="Signature creation methods signers may use." + ) + should_enable_tamper_proof: Optional[StrictBool] = Field( + default=None, + description="Whether completed documents include a digital tamper-proof seal.", + ) + should_include_distinct_pdfs: Optional[StrictBool] = Field( + default=None, + description="Whether completed documents remain as separate PDF files instead of being merged into one PDF.", + ) + should_offer_signer_access_code: Optional[StrictBool] = Field( + default=None, + description="Whether senders can require an access code to verify a signer.", + ) + should_offer_signer_sms_authentication: Optional[StrictBool] = Field( + default=None, + description="Whether senders can require SMS authentication to verify a signer.", + ) + should_remove_document_id: Optional[StrictBool] = Field( + default=None, + description="Whether the Dropbox Sign document ID is hidden on sent documents.", + ) + is_notify_on_sign_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether to notify the account when someone signs a document it sent.", + ) + is_notify_on_view_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether to notify the account when someone opens a document it sent.", + ) + should_autocomplete: Optional[StrictBool] = Field( + default=None, + description="Whether values entered in text fields are saved and suggested for future signature requests.", + ) + should_include_requested_pdfs: Optional[StrictBool] = Field( + default=None, + description="Whether completed signature requests include PDF copies in emails sent to the account.", + ) + should_include_requested_pdfs_for_others: Optional[StrictBool] = Field( + default=None, + description="Whether completed signature requests include PDF copies in emails sent to signers and CC recipients.", + ) + should_include_sent_doc_pdfs: Optional[StrictBool] = Field( + default=None, + description="Whether emails sent to the account include PDF copies of documents it sends.", + ) + should_include_sent_doc_pdfs_for_others: Optional[StrictBool] = Field( + default=None, + description="Whether emails sent to recipients include PDF copies of documents the account sends.", + ) + should_send_daily_summary: Optional[StrictBool] = Field( + default=None, + description="Whether to send the account a daily email summarizing outstanding signature requests.", + ) + should_send_embedded_signature_conf_emails: Optional[StrictBool] = Field( + default=None, + description="Whether to notify the account when it signs a document on a third-party site.", + ) + should_send_ordered_sr_email: Optional[StrictBool] = Field( + default=None, + description="Whether to notify all parties when an ordered signature request starts.", + ) + should_send_outbound_conf_emails: Optional[StrictBool] = Field( + default=None, + description="Whether to notify the account when it signs and sends a document.", + ) + template_link_signature_emails_enabled: Optional[StrictBool] = Field( + default=None, + description="Whether to notify the account when someone signs a document sent by its team through a template link.", + ) + unset: Optional[List[StrictStr]] = Field( + default=None, + description="Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.", + ) + __properties: ClassVar[List[str]] = [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "is_notify_on_sign_enabled", + "is_notify_on_view_enabled", + "should_autocomplete", + "should_include_requested_pdfs", + "should_include_requested_pdfs_for_others", + "should_include_sent_doc_pdfs", + "should_include_sent_doc_pdfs_for_others", + "should_send_daily_summary", + "should_send_embedded_signature_conf_emails", + "should_send_ordered_sr_email", + "should_send_outbound_conf_emails", + "template_link_signature_emails_enabled", + "unset", + ] + + @field_validator("unset") + def unset_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set( + [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "is_notify_on_sign_enabled", + "is_notify_on_view_enabled", + "should_autocomplete", + "should_include_requested_pdfs", + "should_include_requested_pdfs_for_others", + "should_include_sent_doc_pdfs", + "should_include_sent_doc_pdfs_for_others", + "should_send_daily_summary", + "should_send_embedded_signature_conf_emails", + "should_send_ordered_sr_email", + "should_send_outbound_conf_emails", + "template_link_signature_emails_enabled", + ] + ): + raise ValueError( + "each list item must be one of ('company', 'custom_signing_redirect_enabled', 'custom_signing_redirect_url', 'custom_tagline', 'date_format', 'is_signature_reminders_enabled', 'request_email_from', 'request_email_signature', 'required_signature_types', 'should_enable_tamper_proof', 'should_include_distinct_pdfs', 'should_offer_signer_access_code', 'should_offer_signer_sms_authentication', 'should_remove_document_id', 'is_notify_on_sign_enabled', 'is_notify_on_view_enabled', 'should_autocomplete', 'should_include_requested_pdfs', 'should_include_requested_pdfs_for_others', 'should_include_sent_doc_pdfs', 'should_include_sent_doc_pdfs_for_others', 'should_send_daily_summary', 'should_send_embedded_signature_conf_emails', 'should_send_ordered_sr_email', 'should_send_outbound_conf_emails', 'template_link_signature_emails_enabled')" + ) + 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 AccountSettingsUpdateRequest 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 AccountSettingsUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "company": obj.get("company"), + "custom_signing_redirect_enabled": obj.get( + "custom_signing_redirect_enabled" + ), + "custom_signing_redirect_url": obj.get("custom_signing_redirect_url"), + "custom_tagline": obj.get("custom_tagline"), + "date_format": obj.get("date_format"), + "is_signature_reminders_enabled": obj.get( + "is_signature_reminders_enabled" + ), + "request_email_from": obj.get("request_email_from"), + "request_email_signature": obj.get("request_email_signature"), + "required_signature_types": obj.get("required_signature_types"), + "should_enable_tamper_proof": obj.get("should_enable_tamper_proof"), + "should_include_distinct_pdfs": obj.get("should_include_distinct_pdfs"), + "should_offer_signer_access_code": obj.get( + "should_offer_signer_access_code" + ), + "should_offer_signer_sms_authentication": obj.get( + "should_offer_signer_sms_authentication" + ), + "should_remove_document_id": obj.get("should_remove_document_id"), + "is_notify_on_sign_enabled": obj.get("is_notify_on_sign_enabled"), + "is_notify_on_view_enabled": obj.get("is_notify_on_view_enabled"), + "should_autocomplete": obj.get("should_autocomplete"), + "should_include_requested_pdfs": obj.get( + "should_include_requested_pdfs" + ), + "should_include_requested_pdfs_for_others": obj.get( + "should_include_requested_pdfs_for_others" + ), + "should_include_sent_doc_pdfs": obj.get("should_include_sent_doc_pdfs"), + "should_include_sent_doc_pdfs_for_others": obj.get( + "should_include_sent_doc_pdfs_for_others" + ), + "should_send_daily_summary": obj.get("should_send_daily_summary"), + "should_send_embedded_signature_conf_emails": obj.get( + "should_send_embedded_signature_conf_emails" + ), + "should_send_ordered_sr_email": obj.get("should_send_ordered_sr_email"), + "should_send_outbound_conf_emails": obj.get( + "should_send_outbound_conf_emails" + ), + "template_link_signature_emails_enabled": obj.get( + "template_link_signature_emails_enabled" + ), + "unset": obj.get("unset"), + } + ) + 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 { + "company": "(str,)", + "custom_signing_redirect_enabled": "(bool,)", + "custom_signing_redirect_url": "(str,)", + "custom_tagline": "(str,)", + "date_format": "(DateFormat,)", + "is_signature_reminders_enabled": "(bool,)", + "request_email_from": "(str,)", + "request_email_signature": "(str,)", + "required_signature_types": "(List[RequiredSignatureType],)", + "should_enable_tamper_proof": "(bool,)", + "should_include_distinct_pdfs": "(bool,)", + "should_offer_signer_access_code": "(bool,)", + "should_offer_signer_sms_authentication": "(bool,)", + "should_remove_document_id": "(bool,)", + "is_notify_on_sign_enabled": "(bool,)", + "is_notify_on_view_enabled": "(bool,)", + "should_autocomplete": "(bool,)", + "should_include_requested_pdfs": "(bool,)", + "should_include_requested_pdfs_for_others": "(bool,)", + "should_include_sent_doc_pdfs": "(bool,)", + "should_include_sent_doc_pdfs_for_others": "(bool,)", + "should_send_daily_summary": "(bool,)", + "should_send_embedded_signature_conf_emails": "(bool,)", + "should_send_ordered_sr_email": "(bool,)", + "should_send_outbound_conf_emails": "(bool,)", + "template_link_signature_emails_enabled": "(bool,)", + "unset": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "required_signature_types", + "unset", + ] diff --git a/sdks/python/dropbox_sign/models/boolean_setting_update.py b/sdks/python/dropbox_sign/models/boolean_setting_update.py new file mode 100644 index 000000000..eee2cb303 --- /dev/null +++ b/sdks/python/dropbox_sign/models/boolean_setting_update.py @@ -0,0 +1,127 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class BooleanSettingUpdate(BaseModel): + """ + Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + """ # noqa: E501 + + value: Optional[StrictBool] = Field( + default=None, description="Boolean value to store." + ) + lock_mode: Optional[TeamSettingLock] = None + __properties: ClassVar[List[str]] = ["value", "lock_mode"] + + 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 BooleanSettingUpdate 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 BooleanSettingUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "lock_mode": obj.get("lock_mode")} + ) + 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 { + "value": "(bool,)", + "lock_mode": "(TeamSettingLock,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/data_residency.py b/sdks/python/dropbox_sign/models/data_residency.py new file mode 100644 index 000000000..6b9fe5bc7 --- /dev/null +++ b/sdks/python/dropbox_sign/models/data_residency.py @@ -0,0 +1,40 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class DataResidency(str, Enum): + """ + Storage region for team documents. + """ + + """ + allowed enum values + """ + US = "us" + EU = "eu" + AU = "au" + JP = "jp" + UK = "uk" + CA = "ca" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DataResidency from a JSON string""" + return cls(json.loads(json_str)) diff --git a/sdks/python/dropbox_sign/models/data_residency_setting_update.py b/sdks/python/dropbox_sign/models/data_residency_setting_update.py new file mode 100644 index 000000000..861a61e56 --- /dev/null +++ b/sdks/python/dropbox_sign/models/data_residency_setting_update.py @@ -0,0 +1,126 @@ +# 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, Optional +from dropbox_sign.models.data_residency import DataResidency +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class DataResidencySettingUpdate(BaseModel): + """ + Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + """ # noqa: E501 + + value: Optional[DataResidency] = None + lock_mode: Optional[TeamSettingLock] = None + __properties: ClassVar[List[str]] = ["value", "lock_mode"] + + 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 DataResidencySettingUpdate 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 DataResidencySettingUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "lock_mode": obj.get("lock_mode")} + ) + 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 { + "value": "(DataResidency,)", + "lock_mode": "(TeamSettingLock,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/date_format.py b/sdks/python/dropbox_sign/models/date_format.py new file mode 100644 index 000000000..487f00b29 --- /dev/null +++ b/sdks/python/dropbox_sign/models/date_format.py @@ -0,0 +1,37 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class DateFormat(str, Enum): + """ + Date format used to display dates. + """ + + """ + allowed enum values + """ + MM_SLASH_DD_SLASH_YYYY = "MM/DD/YYYY" + DD_SLASH_MM_SLASH_YYYY = "DD/MM/YYYY" + YYYY_SLASH_MM_SLASH_DD = "YYYY/MM/DD" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DateFormat from a JSON string""" + return cls(json.loads(json_str)) diff --git a/sdks/python/dropbox_sign/models/date_format_setting_update.py b/sdks/python/dropbox_sign/models/date_format_setting_update.py new file mode 100644 index 000000000..05c519cf5 --- /dev/null +++ b/sdks/python/dropbox_sign/models/date_format_setting_update.py @@ -0,0 +1,126 @@ +# 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, Optional +from dropbox_sign.models.date_format import DateFormat +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class DateFormatSettingUpdate(BaseModel): + """ + Updates a date format team setting. Provide `value`, `lock_mode`, or both. + """ # noqa: E501 + + value: Optional[DateFormat] = None + lock_mode: Optional[TeamSettingLock] = None + __properties: ClassVar[List[str]] = ["value", "lock_mode"] + + 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 DateFormatSettingUpdate 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 DateFormatSettingUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "lock_mode": obj.get("lock_mode")} + ) + 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 { + "value": "(DateFormat,)", + "lock_mode": "(TeamSettingLock,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/required_signature_type.py b/sdks/python/dropbox_sign/models/required_signature_type.py new file mode 100644 index 000000000..7db797282 --- /dev/null +++ b/sdks/python/dropbox_sign/models/required_signature_type.py @@ -0,0 +1,38 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class RequiredSignatureType(str, Enum): + """ + A signature creation method a signer may use. + """ + + """ + allowed enum values + """ + DRAW = "draw" + PHONE = "phone" + TYPE = "type" + UPLOAD = "upload" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RequiredSignatureType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/sdks/python/dropbox_sign/models/required_signature_types_setting_update.py b/sdks/python/dropbox_sign/models/required_signature_types_setting_update.py new file mode 100644 index 000000000..fec1ab78e --- /dev/null +++ b/sdks/python/dropbox_sign/models/required_signature_types_setting_update.py @@ -0,0 +1,130 @@ +# 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.required_signature_type import RequiredSignatureType +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class RequiredSignatureTypesSettingUpdate(BaseModel): + """ + Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + """ # noqa: E501 + + value: Optional[List[RequiredSignatureType]] = Field( + default=None, description="Signature creation methods signers may use." + ) + lock_mode: Optional[TeamSettingLock] = None + __properties: ClassVar[List[str]] = ["value", "lock_mode"] + + 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 RequiredSignatureTypesSettingUpdate 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 RequiredSignatureTypesSettingUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "lock_mode": obj.get("lock_mode")} + ) + 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 { + "value": "(List[RequiredSignatureType],)", + "lock_mode": "(TeamSettingLock,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "value", + ] diff --git a/sdks/python/dropbox_sign/models/setting_lock_response.py b/sdks/python/dropbox_sign/models/setting_lock_response.py new file mode 100644 index 000000000..76f17383a --- /dev/null +++ b/sdks/python/dropbox_sign/models/setting_lock_response.py @@ -0,0 +1,134 @@ +# 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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SettingLockResponse(BaseModel): + """ + SettingLockResponse + """ # noqa: E501 + + mode: TeamSettingLock + source: StrictStr + __properties: ClassVar[List[str]] = ["mode", "source"] + + @field_validator("source") + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["team", "parent_team", "default"]): + raise ValueError( + "must be one of enum values ('team', 'parent_team', 'default')" + ) + 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 SettingLockResponse 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 SettingLockResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"mode": obj.get("mode"), "source": obj.get("source")} + ) + 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 { + "mode": "(TeamSettingLock,)", + "source": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/setting_response.py b/sdks/python/dropbox_sign/models/setting_response.py new file mode 100644 index 000000000..ac2ec039b --- /dev/null +++ b/sdks/python/dropbox_sign/models/setting_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, + StrictBool, + StrictStr, + field_validator, +) +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.setting_lock_response import SettingLockResponse +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SettingResponse(BaseModel): + """ + SettingResponse + """ # noqa: E501 + + value: Optional[Any] = Field( + description="Current value of the setting. Null when the setting has no value." + ) + is_inherited: StrictBool + source: StrictStr + type: StrictStr + writable: StrictBool + lock: SettingLockResponse + __properties: ClassVar[List[str]] = [ + "value", + "is_inherited", + "source", + "type", + "writable", + "lock", + ] + + @field_validator("source") + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["account", "team", "parent_team", "default"]): + raise ValueError( + "must be one of enum values ('account', 'team', 'parent_team', 'default')" + ) + return value + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["boolean", "integer", "string", "array"]): + raise ValueError( + "must be one of enum values ('boolean', 'integer', 'string', 'array')" + ) + 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 SettingResponse 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 lock + if self.lock: + _dict["lock"] = self.lock.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "value": obj.get("value"), + "is_inherited": obj.get("is_inherited"), + "source": obj.get("source"), + "type": obj.get("type"), + "writable": obj.get("writable"), + "lock": ( + SettingLockResponse.from_dict(obj["lock"]) + if obj.get("lock") 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 { + "value": "(object,)", + "is_inherited": "(bool,)", + "source": "(str,)", + "type": "(str,)", + "writable": "(bool,)", + "lock": "(SettingLockResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py index b1558bcc3..eac5cdfd4 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py @@ -78,7 +78,7 @@ class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): ) metadata: Optional[Dict[str, Any]] = Field( default=None, - description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + description="_t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA", ) signing_redirect_url: Optional[StrictStr] = Field( default=None, diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py index 80abb08a6..f70149c92 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py @@ -78,8 +78,7 @@ class SignatureRequestBulkSendWithTemplateRequest(BaseModel): description="The custom message in the email that will be sent to the signers.", ) metadata: Optional[Dict[str, Any]] = Field( - default=None, - description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + default=None, description="_t__SignatureRequestBulkSendWithTemplate::METADATA" ) signing_redirect_url: Optional[StrictStr] = Field( default=None, diff --git a/sdks/python/dropbox_sign/models/string_setting_update.py b/sdks/python/dropbox_sign/models/string_setting_update.py new file mode 100644 index 000000000..f040c038e --- /dev/null +++ b/sdks/python/dropbox_sign/models/string_setting_update.py @@ -0,0 +1,127 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_setting_lock import TeamSettingLock +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class StringSettingUpdate(BaseModel): + """ + Updates a string team setting. Provide `value`, `lock_mode`, or both. + """ # noqa: E501 + + value: Optional[StrictStr] = Field( + default=None, description="String value to store." + ) + lock_mode: Optional[TeamSettingLock] = None + __properties: ClassVar[List[str]] = ["value", "lock_mode"] + + 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 StringSettingUpdate 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 StringSettingUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "lock_mode": obj.get("lock_mode")} + ) + 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 { + "value": "(str,)", + "lock_mode": "(TeamSettingLock,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py index 899f57701..ccceeb851 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -45,7 +45,10 @@ class SubBulkSignerList(BaseModel): default=None, description="Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value.", ) - __properties: ClassVar[List[str]] = ["custom_fields", "signers"] + metadata: Optional[Dict[str, Any]] = Field( + default=None, description="_t__Sub::BulkSigner::METADATA" + ) + __properties: ClassVar[List[str]] = ["custom_fields", "signers", "metadata"] model_config = ConfigDict( populate_by_name=True, @@ -140,6 +143,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("signers") is not None else None ), + "metadata": obj.get("metadata"), } ) return _obj @@ -159,6 +163,7 @@ def openapi_types(cls) -> Dict[str, str]: return { "custom_fields": "(List[SubBulkSignerListCustomField],)", "signers": "(List[SubSignatureRequestTemplateSigner],)", + "metadata": "(Dict[str, object],)", } @classmethod diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 94d38e66b..6968d300a 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -35,7 +35,10 @@ class TeamCreateRequest(BaseModel): name: Optional[StrictStr] = Field( default="Untitled Team", description="The name of your Team." ) - __properties: ClassVar[List[str]] = ["name"] + parent_team_id: Optional[StrictStr] = Field( + default=None, description="_t__TeamCreate::PARENT_TEAM_ID" + ) + __properties: ClassVar[List[str]] = ["name", "parent_team_id"] model_config = ConfigDict( populate_by_name=True, @@ -102,7 +105,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: { "name": ( obj.get("name") if obj.get("name") is not None else "Untitled Team" - ) + ), + "parent_team_id": obj.get("parent_team_id"), } ) return _obj @@ -121,6 +125,7 @@ def init(cls, data: Any) -> Self: def openapi_types(cls) -> Dict[str, str]: return { "name": "(str,)", + "parent_team_id": "(str,)", } @classmethod diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index 9f72e11fe..40c31542f 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -33,6 +33,10 @@ class TeamResponse(BaseModel): Contains information about your team and its members """ # noqa: E501 + team_id: Optional[StrictStr] = Field(default=None, description="The id of a team") + parent_team_id: Optional[StrictStr] = Field( + default=None, description="_t__Team::PARENT_TEAM_ID" + ) name: Optional[StrictStr] = Field(default=None, description="The name of your Team") accounts: Optional[List[AccountResponse]] = None invited_accounts: Optional[List[AccountResponse]] = Field( @@ -44,6 +48,8 @@ class TeamResponse(BaseModel): description="A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.", ) __properties: ClassVar[List[str]] = [ + "team_id", + "parent_team_id", "name", "accounts", "invited_accounts", @@ -127,6 +133,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "team_id": obj.get("team_id"), + "parent_team_id": obj.get("parent_team_id"), "name": obj.get("name"), "accounts": ( [AccountResponse.from_dict(_item) for _item in obj["accounts"]] @@ -159,6 +167,8 @@ def init(cls, data: Any) -> Self: @classmethod def openapi_types(cls) -> Dict[str, str]: return { + "team_id": "(str,)", + "parent_team_id": "(str,)", "name": "(str,)", "accounts": "(List[AccountResponse],)", "invited_accounts": "(List[AccountResponse],)", diff --git a/sdks/python/dropbox_sign/models/team_setting_lock.py b/sdks/python/dropbox_sign/models/team_setting_lock.py new file mode 100644 index 000000000..e8e8bf2ad --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_setting_lock.py @@ -0,0 +1,37 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class TeamSettingLock(str, Enum): + """ + Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + """ + + """ + allowed enum values + """ + ORGANIZATION_ADMINS = "organization_admins" + TEAM_ADMINS = "team_admins" + MEMBERS = "members" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TeamSettingLock from a JSON string""" + return cls(json.loads(json_str)) diff --git a/sdks/python/dropbox_sign/models/team_settings_response.py b/sdks/python/dropbox_sign/models/team_settings_response.py new file mode 100644 index 000000000..b0f4d06a9 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_settings_response.py @@ -0,0 +1,156 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.team_settings_response_settings import ( + TeamSettingsResponseSettings, +) +from dropbox_sign.models.warning_response import WarningResponse +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class TeamSettingsResponse(BaseModel): + """ + TeamSettingsResponse + """ # noqa: E501 + + team_id: StrictStr + settings: TeamSettingsResponseSettings + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = ["team_id", "settings", "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 TeamSettingsResponse 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 settings + if self.settings: + _dict["settings"] = self.settings.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 TeamSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "team_id": obj.get("team_id"), + "settings": ( + TeamSettingsResponseSettings.from_dict(obj["settings"]) + if obj.get("settings") 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 { + "team_id": "(str,)", + "settings": "(TeamSettingsResponseSettings,)", + "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/team_settings_response_settings.py b/sdks/python/dropbox_sign/models/team_settings_response_settings.py new file mode 100644 index 000000000..61f69053f --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_settings_response_settings.py @@ -0,0 +1,476 @@ +# 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 +from dropbox_sign.models.setting_response import SettingResponse +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class TeamSettingsResponseSettings(BaseModel): + """ + TeamSettingsResponseSettings + """ # noqa: E501 + + company: SettingResponse = Field( + description="Company name associated with this account or team." + ) + custom_signing_redirect_enabled: SettingResponse = Field( + description="Whether signers are redirected to a custom URL after completing a signature request." + ) + custom_signing_redirect_url: SettingResponse = Field( + description="URL where signers are redirected after completing a signature request when custom redirects are enabled." + ) + custom_tagline: SettingResponse = Field( + description="Custom tagline displayed with the account or team branding." + ) + date_format: SettingResponse = Field( + description="Date format used to display dates. List the setting in `unset` to inherit the default." + ) + is_signature_reminders_enabled: SettingResponse = Field( + description="Whether automatic reminder emails are enabled for incomplete signature requests." + ) + request_email_from: SettingResponse = Field( + description="Sender name shown on signature request emails." + ) + request_email_signature: SettingResponse = Field( + description="Signature appended to signature request emails." + ) + required_signature_types: SettingResponse = Field( + description="Signature creation methods signers may use." + ) + should_enable_tamper_proof: SettingResponse = Field( + description="Whether completed documents include a digital tamper-proof seal." + ) + should_include_distinct_pdfs: SettingResponse = Field( + description="Whether completed documents remain as separate PDF files instead of being merged into one PDF." + ) + should_offer_signer_access_code: SettingResponse = Field( + description="Whether senders can require an access code to verify a signer." + ) + should_offer_signer_sms_authentication: SettingResponse = Field( + description="Whether senders can require SMS authentication to verify a signer." + ) + should_remove_document_id: SettingResponse = Field( + description="Whether the Dropbox Sign document ID is hidden on sent documents." + ) + data_residency: SettingResponse = Field( + description="Storage region for team documents." + ) + allow_team_delete_document_for_everyone: SettingResponse = Field( + description="Whether team members can delete a document for all participants." + ) + allow_team_download_csv: SettingResponse = Field( + description="Whether team members can download CSV files." + ) + lock_team_template_creation: SettingResponse = Field( + description="Whether team members are prevented from creating templates." + ) + lock_team_template_gallery: SettingResponse = Field( + description="Whether team members are prevented from using the template gallery." + ) + self_sign_message: SettingResponse = Field( + description="Default message enforced for team members when they create self-signed documents." + ) + self_sign_title: SettingResponse = Field( + description="Default title enforced for team members when they create self-signed documents." + ) + signature_request_message: SettingResponse = Field( + description="Default message enforced for team members when they create signature requests." + ) + signature_request_title: SettingResponse = Field( + description="Default title enforced for team members when they create signature requests." + ) + multifactor_auth_app: SettingResponse = Field( + description="Whether authenticator-app multifactor authentication is enabled for the team." + ) + multifactor_auth_sms: SettingResponse = Field( + description="Whether SMS multifactor authentication is enabled for the team." + ) + __properties: ClassVar[List[str]] = [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "data_residency", + "allow_team_delete_document_for_everyone", + "allow_team_download_csv", + "lock_team_template_creation", + "lock_team_template_gallery", + "self_sign_message", + "self_sign_title", + "signature_request_message", + "signature_request_title", + "multifactor_auth_app", + "multifactor_auth_sms", + ] + + 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 TeamSettingsResponseSettings 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 company + if self.company: + _dict["company"] = self.company.to_dict() + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_enabled + if self.custom_signing_redirect_enabled: + _dict["custom_signing_redirect_enabled"] = ( + self.custom_signing_redirect_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_url + if self.custom_signing_redirect_url: + _dict["custom_signing_redirect_url"] = ( + self.custom_signing_redirect_url.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_tagline + if self.custom_tagline: + _dict["custom_tagline"] = self.custom_tagline.to_dict() + # override the default output from pydantic by calling `to_dict()` of date_format + if self.date_format: + _dict["date_format"] = self.date_format.to_dict() + # override the default output from pydantic by calling `to_dict()` of is_signature_reminders_enabled + if self.is_signature_reminders_enabled: + _dict["is_signature_reminders_enabled"] = ( + self.is_signature_reminders_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of request_email_from + if self.request_email_from: + _dict["request_email_from"] = self.request_email_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of request_email_signature + if self.request_email_signature: + _dict["request_email_signature"] = self.request_email_signature.to_dict() + # override the default output from pydantic by calling `to_dict()` of required_signature_types + if self.required_signature_types: + _dict["required_signature_types"] = self.required_signature_types.to_dict() + # override the default output from pydantic by calling `to_dict()` of should_enable_tamper_proof + if self.should_enable_tamper_proof: + _dict["should_enable_tamper_proof"] = ( + self.should_enable_tamper_proof.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_distinct_pdfs + if self.should_include_distinct_pdfs: + _dict["should_include_distinct_pdfs"] = ( + self.should_include_distinct_pdfs.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_access_code + if self.should_offer_signer_access_code: + _dict["should_offer_signer_access_code"] = ( + self.should_offer_signer_access_code.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_sms_authentication + if self.should_offer_signer_sms_authentication: + _dict["should_offer_signer_sms_authentication"] = ( + self.should_offer_signer_sms_authentication.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_remove_document_id + if self.should_remove_document_id: + _dict["should_remove_document_id"] = ( + self.should_remove_document_id.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of data_residency + if self.data_residency: + _dict["data_residency"] = self.data_residency.to_dict() + # override the default output from pydantic by calling `to_dict()` of allow_team_delete_document_for_everyone + if self.allow_team_delete_document_for_everyone: + _dict["allow_team_delete_document_for_everyone"] = ( + self.allow_team_delete_document_for_everyone.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of allow_team_download_csv + if self.allow_team_download_csv: + _dict["allow_team_download_csv"] = self.allow_team_download_csv.to_dict() + # override the default output from pydantic by calling `to_dict()` of lock_team_template_creation + if self.lock_team_template_creation: + _dict["lock_team_template_creation"] = ( + self.lock_team_template_creation.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of lock_team_template_gallery + if self.lock_team_template_gallery: + _dict["lock_team_template_gallery"] = ( + self.lock_team_template_gallery.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of self_sign_message + if self.self_sign_message: + _dict["self_sign_message"] = self.self_sign_message.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_sign_title + if self.self_sign_title: + _dict["self_sign_title"] = self.self_sign_title.to_dict() + # override the default output from pydantic by calling `to_dict()` of signature_request_message + if self.signature_request_message: + _dict["signature_request_message"] = ( + self.signature_request_message.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of signature_request_title + if self.signature_request_title: + _dict["signature_request_title"] = self.signature_request_title.to_dict() + # override the default output from pydantic by calling `to_dict()` of multifactor_auth_app + if self.multifactor_auth_app: + _dict["multifactor_auth_app"] = self.multifactor_auth_app.to_dict() + # override the default output from pydantic by calling `to_dict()` of multifactor_auth_sms + if self.multifactor_auth_sms: + _dict["multifactor_auth_sms"] = self.multifactor_auth_sms.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamSettingsResponseSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "company": ( + SettingResponse.from_dict(obj["company"]) + if obj.get("company") is not None + else None + ), + "custom_signing_redirect_enabled": ( + SettingResponse.from_dict(obj["custom_signing_redirect_enabled"]) + if obj.get("custom_signing_redirect_enabled") is not None + else None + ), + "custom_signing_redirect_url": ( + SettingResponse.from_dict(obj["custom_signing_redirect_url"]) + if obj.get("custom_signing_redirect_url") is not None + else None + ), + "custom_tagline": ( + SettingResponse.from_dict(obj["custom_tagline"]) + if obj.get("custom_tagline") is not None + else None + ), + "date_format": ( + SettingResponse.from_dict(obj["date_format"]) + if obj.get("date_format") is not None + else None + ), + "is_signature_reminders_enabled": ( + SettingResponse.from_dict(obj["is_signature_reminders_enabled"]) + if obj.get("is_signature_reminders_enabled") is not None + else None + ), + "request_email_from": ( + SettingResponse.from_dict(obj["request_email_from"]) + if obj.get("request_email_from") is not None + else None + ), + "request_email_signature": ( + SettingResponse.from_dict(obj["request_email_signature"]) + if obj.get("request_email_signature") is not None + else None + ), + "required_signature_types": ( + SettingResponse.from_dict(obj["required_signature_types"]) + if obj.get("required_signature_types") is not None + else None + ), + "should_enable_tamper_proof": ( + SettingResponse.from_dict(obj["should_enable_tamper_proof"]) + if obj.get("should_enable_tamper_proof") is not None + else None + ), + "should_include_distinct_pdfs": ( + SettingResponse.from_dict(obj["should_include_distinct_pdfs"]) + if obj.get("should_include_distinct_pdfs") is not None + else None + ), + "should_offer_signer_access_code": ( + SettingResponse.from_dict(obj["should_offer_signer_access_code"]) + if obj.get("should_offer_signer_access_code") is not None + else None + ), + "should_offer_signer_sms_authentication": ( + SettingResponse.from_dict( + obj["should_offer_signer_sms_authentication"] + ) + if obj.get("should_offer_signer_sms_authentication") is not None + else None + ), + "should_remove_document_id": ( + SettingResponse.from_dict(obj["should_remove_document_id"]) + if obj.get("should_remove_document_id") is not None + else None + ), + "data_residency": ( + SettingResponse.from_dict(obj["data_residency"]) + if obj.get("data_residency") is not None + else None + ), + "allow_team_delete_document_for_everyone": ( + SettingResponse.from_dict( + obj["allow_team_delete_document_for_everyone"] + ) + if obj.get("allow_team_delete_document_for_everyone") is not None + else None + ), + "allow_team_download_csv": ( + SettingResponse.from_dict(obj["allow_team_download_csv"]) + if obj.get("allow_team_download_csv") is not None + else None + ), + "lock_team_template_creation": ( + SettingResponse.from_dict(obj["lock_team_template_creation"]) + if obj.get("lock_team_template_creation") is not None + else None + ), + "lock_team_template_gallery": ( + SettingResponse.from_dict(obj["lock_team_template_gallery"]) + if obj.get("lock_team_template_gallery") is not None + else None + ), + "self_sign_message": ( + SettingResponse.from_dict(obj["self_sign_message"]) + if obj.get("self_sign_message") is not None + else None + ), + "self_sign_title": ( + SettingResponse.from_dict(obj["self_sign_title"]) + if obj.get("self_sign_title") is not None + else None + ), + "signature_request_message": ( + SettingResponse.from_dict(obj["signature_request_message"]) + if obj.get("signature_request_message") is not None + else None + ), + "signature_request_title": ( + SettingResponse.from_dict(obj["signature_request_title"]) + if obj.get("signature_request_title") is not None + else None + ), + "multifactor_auth_app": ( + SettingResponse.from_dict(obj["multifactor_auth_app"]) + if obj.get("multifactor_auth_app") is not None + else None + ), + "multifactor_auth_sms": ( + SettingResponse.from_dict(obj["multifactor_auth_sms"]) + if obj.get("multifactor_auth_sms") 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 { + "company": "(SettingResponse,)", + "custom_signing_redirect_enabled": "(SettingResponse,)", + "custom_signing_redirect_url": "(SettingResponse,)", + "custom_tagline": "(SettingResponse,)", + "date_format": "(SettingResponse,)", + "is_signature_reminders_enabled": "(SettingResponse,)", + "request_email_from": "(SettingResponse,)", + "request_email_signature": "(SettingResponse,)", + "required_signature_types": "(SettingResponse,)", + "should_enable_tamper_proof": "(SettingResponse,)", + "should_include_distinct_pdfs": "(SettingResponse,)", + "should_offer_signer_access_code": "(SettingResponse,)", + "should_offer_signer_sms_authentication": "(SettingResponse,)", + "should_remove_document_id": "(SettingResponse,)", + "data_residency": "(SettingResponse,)", + "allow_team_delete_document_for_everyone": "(SettingResponse,)", + "allow_team_download_csv": "(SettingResponse,)", + "lock_team_template_creation": "(SettingResponse,)", + "lock_team_template_gallery": "(SettingResponse,)", + "self_sign_message": "(SettingResponse,)", + "self_sign_title": "(SettingResponse,)", + "signature_request_message": "(SettingResponse,)", + "signature_request_title": "(SettingResponse,)", + "multifactor_auth_app": "(SettingResponse,)", + "multifactor_auth_sms": "(SettingResponse,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_settings_update_request.py b/sdks/python/dropbox_sign/models/team_settings_update_request.py new file mode 100644 index 000000000..ea78d5e73 --- /dev/null +++ b/sdks/python/dropbox_sign/models/team_settings_update_request.py @@ -0,0 +1,559 @@ +# 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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from dropbox_sign.models.boolean_setting_update import BooleanSettingUpdate +from dropbox_sign.models.data_residency_setting_update import DataResidencySettingUpdate +from dropbox_sign.models.date_format_setting_update import DateFormatSettingUpdate +from dropbox_sign.models.required_signature_types_setting_update import ( + RequiredSignatureTypesSettingUpdate, +) +from dropbox_sign.models.string_setting_update import StringSettingUpdate +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class TeamSettingsUpdateRequest(BaseModel): + """ + TeamSettingsUpdateRequest + """ # noqa: E501 + + company: Optional[StringSettingUpdate] = Field( + default=None, description="Company name associated with this account or team." + ) + custom_signing_redirect_enabled: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether signers are redirected to a custom URL after completing a signature request.", + ) + custom_signing_redirect_url: Optional[StringSettingUpdate] = Field( + default=None, + description="URL where signers are redirected after completing a signature request when custom redirects are enabled.", + ) + custom_tagline: Optional[StringSettingUpdate] = Field( + default=None, + description="Custom tagline displayed with the account or team branding.", + ) + date_format: Optional[DateFormatSettingUpdate] = Field( + default=None, + description="Date format used to display dates. List the setting in `unset` to inherit the default.", + ) + is_signature_reminders_enabled: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether automatic reminder emails are enabled for incomplete signature requests.", + ) + request_email_from: Optional[StringSettingUpdate] = Field( + default=None, description="Sender name shown on signature request emails." + ) + request_email_signature: Optional[StringSettingUpdate] = Field( + default=None, description="Signature appended to signature request emails." + ) + required_signature_types: Optional[RequiredSignatureTypesSettingUpdate] = Field( + default=None, description="Signature creation methods signers may use." + ) + should_enable_tamper_proof: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether completed documents include a digital tamper-proof seal.", + ) + should_include_distinct_pdfs: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether completed documents remain as separate PDF files instead of being merged into one PDF.", + ) + should_offer_signer_access_code: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether senders can require an access code to verify a signer.", + ) + should_offer_signer_sms_authentication: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether senders can require SMS authentication to verify a signer.", + ) + should_remove_document_id: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether the Dropbox Sign document ID is hidden on sent documents.", + ) + data_residency: Optional[DataResidencySettingUpdate] = Field( + default=None, description="Storage region for team documents." + ) + allow_team_delete_document_for_everyone: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether team members can delete a document for all participants.", + ) + allow_team_download_csv: Optional[BooleanSettingUpdate] = Field( + default=None, description="Whether team members can download CSV files." + ) + lock_team_template_creation: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether team members are prevented from creating templates.", + ) + lock_team_template_gallery: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether team members are prevented from using the template gallery.", + ) + self_sign_message: Optional[StringSettingUpdate] = Field( + default=None, + description="Default message enforced for team members when they create self-signed documents.", + ) + self_sign_title: Optional[StringSettingUpdate] = Field( + default=None, + description="Default title enforced for team members when they create self-signed documents.", + ) + signature_request_message: Optional[StringSettingUpdate] = Field( + default=None, + description="Default message enforced for team members when they create signature requests.", + ) + signature_request_title: Optional[StringSettingUpdate] = Field( + default=None, + description="Default title enforced for team members when they create signature requests.", + ) + multifactor_auth_app: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether authenticator-app multifactor authentication is enabled for the team.", + ) + multifactor_auth_sms: Optional[BooleanSettingUpdate] = Field( + default=None, + description="Whether SMS multifactor authentication is enabled for the team.", + ) + unset: Optional[List[StrictStr]] = Field( + default=None, + description="Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request.", + ) + __properties: ClassVar[List[str]] = [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "data_residency", + "allow_team_delete_document_for_everyone", + "allow_team_download_csv", + "lock_team_template_creation", + "lock_team_template_gallery", + "self_sign_message", + "self_sign_title", + "signature_request_message", + "signature_request_title", + "multifactor_auth_app", + "multifactor_auth_sms", + "unset", + ] + + @field_validator("unset") + def unset_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set( + [ + "company", + "custom_signing_redirect_enabled", + "custom_signing_redirect_url", + "custom_tagline", + "date_format", + "is_signature_reminders_enabled", + "request_email_from", + "request_email_signature", + "required_signature_types", + "should_enable_tamper_proof", + "should_include_distinct_pdfs", + "should_offer_signer_access_code", + "should_offer_signer_sms_authentication", + "should_remove_document_id", + "data_residency", + "allow_team_delete_document_for_everyone", + "allow_team_download_csv", + "lock_team_template_creation", + "lock_team_template_gallery", + "self_sign_message", + "self_sign_title", + "signature_request_message", + "signature_request_title", + "multifactor_auth_app", + "multifactor_auth_sms", + ] + ): + raise ValueError( + "each list item must be one of ('company', 'custom_signing_redirect_enabled', 'custom_signing_redirect_url', 'custom_tagline', 'date_format', 'is_signature_reminders_enabled', 'request_email_from', 'request_email_signature', 'required_signature_types', 'should_enable_tamper_proof', 'should_include_distinct_pdfs', 'should_offer_signer_access_code', 'should_offer_signer_sms_authentication', 'should_remove_document_id', 'data_residency', 'allow_team_delete_document_for_everyone', 'allow_team_download_csv', 'lock_team_template_creation', 'lock_team_template_gallery', 'self_sign_message', 'self_sign_title', 'signature_request_message', 'signature_request_title', 'multifactor_auth_app', 'multifactor_auth_sms')" + ) + 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 TeamSettingsUpdateRequest 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 company + if self.company: + _dict["company"] = self.company.to_dict() + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_enabled + if self.custom_signing_redirect_enabled: + _dict["custom_signing_redirect_enabled"] = ( + self.custom_signing_redirect_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_signing_redirect_url + if self.custom_signing_redirect_url: + _dict["custom_signing_redirect_url"] = ( + self.custom_signing_redirect_url.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of custom_tagline + if self.custom_tagline: + _dict["custom_tagline"] = self.custom_tagline.to_dict() + # override the default output from pydantic by calling `to_dict()` of date_format + if self.date_format: + _dict["date_format"] = self.date_format.to_dict() + # override the default output from pydantic by calling `to_dict()` of is_signature_reminders_enabled + if self.is_signature_reminders_enabled: + _dict["is_signature_reminders_enabled"] = ( + self.is_signature_reminders_enabled.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of request_email_from + if self.request_email_from: + _dict["request_email_from"] = self.request_email_from.to_dict() + # override the default output from pydantic by calling `to_dict()` of request_email_signature + if self.request_email_signature: + _dict["request_email_signature"] = self.request_email_signature.to_dict() + # override the default output from pydantic by calling `to_dict()` of required_signature_types + if self.required_signature_types: + _dict["required_signature_types"] = self.required_signature_types.to_dict() + # override the default output from pydantic by calling `to_dict()` of should_enable_tamper_proof + if self.should_enable_tamper_proof: + _dict["should_enable_tamper_proof"] = ( + self.should_enable_tamper_proof.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_include_distinct_pdfs + if self.should_include_distinct_pdfs: + _dict["should_include_distinct_pdfs"] = ( + self.should_include_distinct_pdfs.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_access_code + if self.should_offer_signer_access_code: + _dict["should_offer_signer_access_code"] = ( + self.should_offer_signer_access_code.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_offer_signer_sms_authentication + if self.should_offer_signer_sms_authentication: + _dict["should_offer_signer_sms_authentication"] = ( + self.should_offer_signer_sms_authentication.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of should_remove_document_id + if self.should_remove_document_id: + _dict["should_remove_document_id"] = ( + self.should_remove_document_id.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of data_residency + if self.data_residency: + _dict["data_residency"] = self.data_residency.to_dict() + # override the default output from pydantic by calling `to_dict()` of allow_team_delete_document_for_everyone + if self.allow_team_delete_document_for_everyone: + _dict["allow_team_delete_document_for_everyone"] = ( + self.allow_team_delete_document_for_everyone.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of allow_team_download_csv + if self.allow_team_download_csv: + _dict["allow_team_download_csv"] = self.allow_team_download_csv.to_dict() + # override the default output from pydantic by calling `to_dict()` of lock_team_template_creation + if self.lock_team_template_creation: + _dict["lock_team_template_creation"] = ( + self.lock_team_template_creation.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of lock_team_template_gallery + if self.lock_team_template_gallery: + _dict["lock_team_template_gallery"] = ( + self.lock_team_template_gallery.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of self_sign_message + if self.self_sign_message: + _dict["self_sign_message"] = self.self_sign_message.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_sign_title + if self.self_sign_title: + _dict["self_sign_title"] = self.self_sign_title.to_dict() + # override the default output from pydantic by calling `to_dict()` of signature_request_message + if self.signature_request_message: + _dict["signature_request_message"] = ( + self.signature_request_message.to_dict() + ) + # override the default output from pydantic by calling `to_dict()` of signature_request_title + if self.signature_request_title: + _dict["signature_request_title"] = self.signature_request_title.to_dict() + # override the default output from pydantic by calling `to_dict()` of multifactor_auth_app + if self.multifactor_auth_app: + _dict["multifactor_auth_app"] = self.multifactor_auth_app.to_dict() + # override the default output from pydantic by calling `to_dict()` of multifactor_auth_sms + if self.multifactor_auth_sms: + _dict["multifactor_auth_sms"] = self.multifactor_auth_sms.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamSettingsUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "company": ( + StringSettingUpdate.from_dict(obj["company"]) + if obj.get("company") is not None + else None + ), + "custom_signing_redirect_enabled": ( + BooleanSettingUpdate.from_dict( + obj["custom_signing_redirect_enabled"] + ) + if obj.get("custom_signing_redirect_enabled") is not None + else None + ), + "custom_signing_redirect_url": ( + StringSettingUpdate.from_dict(obj["custom_signing_redirect_url"]) + if obj.get("custom_signing_redirect_url") is not None + else None + ), + "custom_tagline": ( + StringSettingUpdate.from_dict(obj["custom_tagline"]) + if obj.get("custom_tagline") is not None + else None + ), + "date_format": ( + DateFormatSettingUpdate.from_dict(obj["date_format"]) + if obj.get("date_format") is not None + else None + ), + "is_signature_reminders_enabled": ( + BooleanSettingUpdate.from_dict( + obj["is_signature_reminders_enabled"] + ) + if obj.get("is_signature_reminders_enabled") is not None + else None + ), + "request_email_from": ( + StringSettingUpdate.from_dict(obj["request_email_from"]) + if obj.get("request_email_from") is not None + else None + ), + "request_email_signature": ( + StringSettingUpdate.from_dict(obj["request_email_signature"]) + if obj.get("request_email_signature") is not None + else None + ), + "required_signature_types": ( + RequiredSignatureTypesSettingUpdate.from_dict( + obj["required_signature_types"] + ) + if obj.get("required_signature_types") is not None + else None + ), + "should_enable_tamper_proof": ( + BooleanSettingUpdate.from_dict(obj["should_enable_tamper_proof"]) + if obj.get("should_enable_tamper_proof") is not None + else None + ), + "should_include_distinct_pdfs": ( + BooleanSettingUpdate.from_dict(obj["should_include_distinct_pdfs"]) + if obj.get("should_include_distinct_pdfs") is not None + else None + ), + "should_offer_signer_access_code": ( + BooleanSettingUpdate.from_dict( + obj["should_offer_signer_access_code"] + ) + if obj.get("should_offer_signer_access_code") is not None + else None + ), + "should_offer_signer_sms_authentication": ( + BooleanSettingUpdate.from_dict( + obj["should_offer_signer_sms_authentication"] + ) + if obj.get("should_offer_signer_sms_authentication") is not None + else None + ), + "should_remove_document_id": ( + BooleanSettingUpdate.from_dict(obj["should_remove_document_id"]) + if obj.get("should_remove_document_id") is not None + else None + ), + "data_residency": ( + DataResidencySettingUpdate.from_dict(obj["data_residency"]) + if obj.get("data_residency") is not None + else None + ), + "allow_team_delete_document_for_everyone": ( + BooleanSettingUpdate.from_dict( + obj["allow_team_delete_document_for_everyone"] + ) + if obj.get("allow_team_delete_document_for_everyone") is not None + else None + ), + "allow_team_download_csv": ( + BooleanSettingUpdate.from_dict(obj["allow_team_download_csv"]) + if obj.get("allow_team_download_csv") is not None + else None + ), + "lock_team_template_creation": ( + BooleanSettingUpdate.from_dict(obj["lock_team_template_creation"]) + if obj.get("lock_team_template_creation") is not None + else None + ), + "lock_team_template_gallery": ( + BooleanSettingUpdate.from_dict(obj["lock_team_template_gallery"]) + if obj.get("lock_team_template_gallery") is not None + else None + ), + "self_sign_message": ( + StringSettingUpdate.from_dict(obj["self_sign_message"]) + if obj.get("self_sign_message") is not None + else None + ), + "self_sign_title": ( + StringSettingUpdate.from_dict(obj["self_sign_title"]) + if obj.get("self_sign_title") is not None + else None + ), + "signature_request_message": ( + StringSettingUpdate.from_dict(obj["signature_request_message"]) + if obj.get("signature_request_message") is not None + else None + ), + "signature_request_title": ( + StringSettingUpdate.from_dict(obj["signature_request_title"]) + if obj.get("signature_request_title") is not None + else None + ), + "multifactor_auth_app": ( + BooleanSettingUpdate.from_dict(obj["multifactor_auth_app"]) + if obj.get("multifactor_auth_app") is not None + else None + ), + "multifactor_auth_sms": ( + BooleanSettingUpdate.from_dict(obj["multifactor_auth_sms"]) + if obj.get("multifactor_auth_sms") is not None + else None + ), + "unset": obj.get("unset"), + } + ) + 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 { + "company": "(StringSettingUpdate,)", + "custom_signing_redirect_enabled": "(BooleanSettingUpdate,)", + "custom_signing_redirect_url": "(StringSettingUpdate,)", + "custom_tagline": "(StringSettingUpdate,)", + "date_format": "(DateFormatSettingUpdate,)", + "is_signature_reminders_enabled": "(BooleanSettingUpdate,)", + "request_email_from": "(StringSettingUpdate,)", + "request_email_signature": "(StringSettingUpdate,)", + "required_signature_types": "(RequiredSignatureTypesSettingUpdate,)", + "should_enable_tamper_proof": "(BooleanSettingUpdate,)", + "should_include_distinct_pdfs": "(BooleanSettingUpdate,)", + "should_offer_signer_access_code": "(BooleanSettingUpdate,)", + "should_offer_signer_sms_authentication": "(BooleanSettingUpdate,)", + "should_remove_document_id": "(BooleanSettingUpdate,)", + "data_residency": "(DataResidencySettingUpdate,)", + "allow_team_delete_document_for_everyone": "(BooleanSettingUpdate,)", + "allow_team_download_csv": "(BooleanSettingUpdate,)", + "lock_team_template_creation": "(BooleanSettingUpdate,)", + "lock_team_template_gallery": "(BooleanSettingUpdate,)", + "self_sign_message": "(StringSettingUpdate,)", + "self_sign_title": "(StringSettingUpdate,)", + "signature_request_message": "(StringSettingUpdate,)", + "signature_request_title": "(StringSettingUpdate,)", + "multifactor_auth_app": "(BooleanSettingUpdate,)", + "multifactor_auth_sms": "(BooleanSettingUpdate,)", + "unset": "(List[str],)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "unset", + ] diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 206a50a34..ddc001d60 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -109,6 +109,8 @@ All URIs are relative to *https://api.hellosign.com/v3* |------------ | ------------- | ------------- | -------------| |*Dropbox::Sign::AccountApi* | [**account_create**](docs/AccountApi.md#account_create) | **POST** /account/create | Create Account | |*Dropbox::Sign::AccountApi* | [**account_get**](docs/AccountApi.md#account_get) | **GET** /account | Get Account | +|*Dropbox::Sign::AccountApi* | [**account_settings_get**](docs/AccountApi.md#account_settings_get) | **GET** /account/settings | Get account settings | +|*Dropbox::Sign::AccountApi* | [**account_settings_update**](docs/AccountApi.md#account_settings_update) | **POST** /account/settings | Modify account settings | |*Dropbox::Sign::AccountApi* | [**account_update**](docs/AccountApi.md#account_update) | **PUT** /account | Update Account | |*Dropbox::Sign::AccountApi* | [**account_verify**](docs/AccountApi.md#account_verify) | **POST** /account/verify | Verify Account | |*Dropbox::Sign::ApiAppApi* | [**api_app_create**](docs/ApiAppApi.md#api_app_create) | **POST** /api_app | Create API App | @@ -164,6 +166,8 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::TeamApi* | [**team_invites**](docs/TeamApi.md#team_invites) | **GET** /team/invites | List Team Invites | |*Dropbox::Sign::TeamApi* | [**team_members**](docs/TeamApi.md#team_members) | **GET** /team/members/{team_id} | List Team Members | |*Dropbox::Sign::TeamApi* | [**team_remove_member**](docs/TeamApi.md#team_remove_member) | **POST** /team/remove_member | Remove User from Team | +|*Dropbox::Sign::TeamApi* | [**team_settings_get**](docs/TeamApi.md#team_settings_get) | **GET** /team/settings | Get team settings | +|*Dropbox::Sign::TeamApi* | [**team_settings_update**](docs/TeamApi.md#team_settings_update) | **POST** /team/settings | Modify team settings | |*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 | @@ -192,6 +196,9 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::AccountResponseQuotas](docs/AccountResponseQuotas.md) - [Dropbox::Sign::AccountResponseSettings](docs/AccountResponseSettings.md) - [Dropbox::Sign::AccountResponseUsage](docs/AccountResponseUsage.md) + - [Dropbox::Sign::AccountSettingsResponse](docs/AccountSettingsResponse.md) + - [Dropbox::Sign::AccountSettingsResponseSettings](docs/AccountSettingsResponseSettings.md) + - [Dropbox::Sign::AccountSettingsUpdateRequest](docs/AccountSettingsUpdateRequest.md) - [Dropbox::Sign::AccountUpdateRequest](docs/AccountUpdateRequest.md) - [Dropbox::Sign::AccountVerifyRequest](docs/AccountVerifyRequest.md) - [Dropbox::Sign::AccountVerifyResponse](docs/AccountVerifyResponse.md) @@ -205,11 +212,16 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::ApiAppResponseOwnerAccount](docs/ApiAppResponseOwnerAccount.md) - [Dropbox::Sign::ApiAppResponseWhiteLabelingOptions](docs/ApiAppResponseWhiteLabelingOptions.md) - [Dropbox::Sign::ApiAppUpdateRequest](docs/ApiAppUpdateRequest.md) + - [Dropbox::Sign::BooleanSettingUpdate](docs/BooleanSettingUpdate.md) - [Dropbox::Sign::BulkSendJobGetResponse](docs/BulkSendJobGetResponse.md) - [Dropbox::Sign::BulkSendJobGetResponseSignatureRequests](docs/BulkSendJobGetResponseSignatureRequests.md) - [Dropbox::Sign::BulkSendJobListResponse](docs/BulkSendJobListResponse.md) - [Dropbox::Sign::BulkSendJobResponse](docs/BulkSendJobResponse.md) - [Dropbox::Sign::BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md) + - [Dropbox::Sign::DataResidency](docs/DataResidency.md) + - [Dropbox::Sign::DataResidencySettingUpdate](docs/DataResidencySettingUpdate.md) + - [Dropbox::Sign::DateFormat](docs/DateFormat.md) + - [Dropbox::Sign::DateFormatSettingUpdate](docs/DateFormatSettingUpdate.md) - [Dropbox::Sign::DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md) - [Dropbox::Sign::DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md) - [Dropbox::Sign::DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md) @@ -248,6 +260,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::ReportCreateRequest](docs/ReportCreateRequest.md) - [Dropbox::Sign::ReportCreateResponse](docs/ReportCreateResponse.md) - [Dropbox::Sign::ReportResponse](docs/ReportResponse.md) + - [Dropbox::Sign::RequiredSignatureType](docs/RequiredSignatureType.md) + - [Dropbox::Sign::RequiredSignatureTypesSettingUpdate](docs/RequiredSignatureTypesSettingUpdate.md) + - [Dropbox::Sign::SettingLockResponse](docs/SettingLockResponse.md) + - [Dropbox::Sign::SettingResponse](docs/SettingResponse.md) - [Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest](docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md) - [Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [Dropbox::Sign::SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) @@ -280,6 +296,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::SignatureRequestSendRequest](docs/SignatureRequestSendRequest.md) - [Dropbox::Sign::SignatureRequestSendWithTemplateRequest](docs/SignatureRequestSendWithTemplateRequest.md) - [Dropbox::Sign::SignatureRequestUpdateRequest](docs/SignatureRequestUpdateRequest.md) + - [Dropbox::Sign::StringSettingUpdate](docs/StringSettingUpdate.md) - [Dropbox::Sign::SubAttachment](docs/SubAttachment.md) - [Dropbox::Sign::SubBulkSignerList](docs/SubBulkSignerList.md) - [Dropbox::Sign::SubBulkSignerListCustomField](docs/SubBulkSignerListCustomField.md) @@ -328,6 +345,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::TeamParentResponse](docs/TeamParentResponse.md) - [Dropbox::Sign::TeamRemoveMemberRequest](docs/TeamRemoveMemberRequest.md) - [Dropbox::Sign::TeamResponse](docs/TeamResponse.md) + - [Dropbox::Sign::TeamSettingLock](docs/TeamSettingLock.md) + - [Dropbox::Sign::TeamSettingsResponse](docs/TeamSettingsResponse.md) + - [Dropbox::Sign::TeamSettingsResponseSettings](docs/TeamSettingsResponseSettings.md) + - [Dropbox::Sign::TeamSettingsUpdateRequest](docs/TeamSettingsUpdateRequest.md) - [Dropbox::Sign::TeamSubTeamsResponse](docs/TeamSubTeamsResponse.md) - [Dropbox::Sign::TeamUpdateRequest](docs/TeamUpdateRequest.md) - [Dropbox::Sign::TemplateAddUserRequest](docs/TemplateAddUserRequest.md) diff --git a/sdks/ruby/docs/AccountApi.md b/sdks/ruby/docs/AccountApi.md index ebae7148b..95044e5da 100644 --- a/sdks/ruby/docs/AccountApi.md +++ b/sdks/ruby/docs/AccountApi.md @@ -6,6 +6,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | ------ | ------------ | ----------- | | [`account_create`](AccountApi.md#account_create) | **POST** `/account/create` | Create Account | | [`account_get`](AccountApi.md#account_get) | **GET** `/account` | Get Account | +| [`account_settings_get`](AccountApi.md#account_settings_get) | **GET** `/account/settings` | Get account settings | +| [`account_settings_update`](AccountApi.md#account_settings_update) | **POST** `/account/settings` | Modify account settings | | [`account_update`](AccountApi.md#account_update) | **PUT** `/account` | Update Account | | [`account_verify`](AccountApi.md#account_verify) | **POST** `/account/verify` | Verify Account | @@ -150,6 +152,166 @@ end - **Accept**: application/json +## `account_settings_get` + +> ` account_settings_get(opts)` + +Get account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_get + company = response.settings.company + + p response + p({ + account_id: response.account_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_get: #{e}" +end + +``` + +#### Using the `account_settings_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> account_settings_get_with_http_info(opts)` + +```ruby +begin + # Get account settings + data, status_code, headers = api_instance.account_settings_get_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling AccountApi->account_settings_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_id` | **String** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `account_settings_update` + +> ` account_settings_update(account_settings_update_request, opts)` + +Modify account settings + +account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_settings_update_request = Dropbox::Sign::AccountSettingsUpdateRequest.new +account_settings_update_request.date_format = Dropbox::Sign::DateFormat::MM_DD_YYYY +account_settings_update_request.required_signature_types = [ + Dropbox::Sign::RequiredSignatureType::DRAW, + Dropbox::Sign::RequiredSignatureType::TYPE, +] +account_settings_update_request.should_enable_tamper_proof = false +account_settings_update_request.unset = ["company"] + +begin + response = Dropbox::Sign::AccountApi.new.account_settings_update( + account_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_settings_update: #{e}" +end + +``` + +#### Using the `account_settings_update_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> account_settings_update_with_http_info(account_settings_update_request, opts)` + +```ruby +begin + # Modify account settings + data, status_code, headers = api_instance.account_settings_update_with_http_info(account_settings_update_request, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling AccountApi->account_settings_update_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_settings_update_request` | [**AccountSettingsUpdateRequest**](AccountSettingsUpdateRequest.md) | | | +| `account_id` | **String** | Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. | [optional] | + +### Return type + +[**AccountSettingsResponse**](AccountSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## `account_update` > ` account_update(account_update_request)` diff --git a/sdks/ruby/docs/AccountSettingsResponse.md b/sdks/ruby/docs/AccountSettingsResponse.md new file mode 100644 index 000000000..a99088708 --- /dev/null +++ b/sdks/ruby/docs/AccountSettingsResponse.md @@ -0,0 +1,12 @@ +# Dropbox::Sign::AccountSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_id`*_required_ | ```String``` | | | +| `settings`*_required_ | [```AccountSettingsResponseSettings```](AccountSettingsResponseSettings.md) | | | +| `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | + diff --git a/sdks/ruby/docs/AccountSettingsResponseSettings.md b/sdks/ruby/docs/AccountSettingsResponseSettings.md new file mode 100644 index 000000000..df1071a06 --- /dev/null +++ b/sdks/ruby/docs/AccountSettingsResponseSettings.md @@ -0,0 +1,35 @@ +# Dropbox::Sign::AccountSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether to notify the account when someone signs a document sent by its team through a template link. | | + diff --git a/sdks/ruby/docs/AccountSettingsUpdateRequest.md b/sdks/ruby/docs/AccountSettingsUpdateRequest.md new file mode 100644 index 000000000..2fa28e61c --- /dev/null +++ b/sdks/ruby/docs/AccountSettingsUpdateRequest.md @@ -0,0 +1,36 @@ +# Dropbox::Sign::AccountSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `company` | ```String``` | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | ```Boolean``` | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | ```String``` | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | ```String``` | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```DateFormat```](DateFormat.md) | | | +| `is_signature_reminders_enabled` | ```Boolean``` | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | ```String``` | Sender name shown on signature request emails. | | +| `request_email_signature` | ```String``` | Signature appended to signature request emails. | | +| `required_signature_types` | [```Array```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | ```Boolean``` | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | ```Boolean``` | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | ```Boolean``` | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | ```Boolean``` | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | ```Boolean``` | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `is_notify_on_sign_enabled` | ```Boolean``` | Whether to notify the account when someone signs a document it sent. | | +| `is_notify_on_view_enabled` | ```Boolean``` | Whether to notify the account when someone opens a document it sent. | | +| `should_autocomplete` | ```Boolean``` | Whether values entered in text fields are saved and suggested for future signature requests. | | +| `should_include_requested_pdfs` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to the account. | | +| `should_include_requested_pdfs_for_others` | ```Boolean``` | Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. | | +| `should_include_sent_doc_pdfs` | ```Boolean``` | Whether emails sent to the account include PDF copies of documents it sends. | | +| `should_include_sent_doc_pdfs_for_others` | ```Boolean``` | Whether emails sent to recipients include PDF copies of documents the account sends. | | +| `should_send_daily_summary` | ```Boolean``` | Whether to send the account a daily email summarizing outstanding signature requests. | | +| `should_send_embedded_signature_conf_emails` | ```Boolean``` | Whether to notify the account when it signs a document on a third-party site. | | +| `should_send_ordered_sr_email` | ```Boolean``` | Whether to notify all parties when an ordered signature request starts. | | +| `should_send_outbound_conf_emails` | ```Boolean``` | Whether to notify the account when it signs and sends a document. | | +| `template_link_signature_emails_enabled` | ```Boolean``` | Whether to notify the account when someone signs a document sent by its team through a template link. | | +| `unset` | ```Array``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + diff --git a/sdks/ruby/docs/BooleanSettingUpdate.md b/sdks/ruby/docs/BooleanSettingUpdate.md new file mode 100644 index 000000000..d6a75c17b --- /dev/null +++ b/sdks/ruby/docs/BooleanSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::BooleanSettingUpdate + +Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value` | ```Boolean``` | Boolean value to store. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.md) | | | + diff --git a/sdks/ruby/docs/DataResidency.md b/sdks/ruby/docs/DataResidency.md new file mode 100644 index 000000000..5ffee18a2 --- /dev/null +++ b/sdks/ruby/docs/DataResidency.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::DataResidency + +Storage region for team documents. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/DataResidencySettingUpdate.md b/sdks/ruby/docs/DataResidencySettingUpdate.md new file mode 100644 index 000000000..21c9ea3a8 --- /dev/null +++ b/sdks/ruby/docs/DataResidencySettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::DataResidencySettingUpdate + +Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value` | [```DataResidency```](DataResidency.md) | | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.md) | | | + diff --git a/sdks/ruby/docs/DateFormat.md b/sdks/ruby/docs/DateFormat.md new file mode 100644 index 000000000..bfc5a6ba4 --- /dev/null +++ b/sdks/ruby/docs/DateFormat.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::DateFormat + +Date format used to display dates. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/DateFormatSettingUpdate.md b/sdks/ruby/docs/DateFormatSettingUpdate.md new file mode 100644 index 000000000..5922d73c7 --- /dev/null +++ b/sdks/ruby/docs/DateFormatSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::DateFormatSettingUpdate + +Updates a date format team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value` | [```DateFormat```](DateFormat.md) | | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.md) | | | + diff --git a/sdks/ruby/docs/RequiredSignatureType.md b/sdks/ruby/docs/RequiredSignatureType.md new file mode 100644 index 000000000..1cf45c18e --- /dev/null +++ b/sdks/ruby/docs/RequiredSignatureType.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::RequiredSignatureType + +A signature creation method a signer may use. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/RequiredSignatureTypesSettingUpdate.md b/sdks/ruby/docs/RequiredSignatureTypesSettingUpdate.md new file mode 100644 index 000000000..10ff746cb --- /dev/null +++ b/sdks/ruby/docs/RequiredSignatureTypesSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::RequiredSignatureTypesSettingUpdate + +Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value` | [```Array```](RequiredSignatureType.md) | Signature creation methods signers may use. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.md) | | | + diff --git a/sdks/ruby/docs/SettingLockResponse.md b/sdks/ruby/docs/SettingLockResponse.md new file mode 100644 index 000000000..389a39541 --- /dev/null +++ b/sdks/ruby/docs/SettingLockResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::SettingLockResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `mode`*_required_ | [```TeamSettingLock```](TeamSettingLock.md) | | | +| `source`*_required_ | ```String``` | | | + diff --git a/sdks/ruby/docs/SettingResponse.md b/sdks/ruby/docs/SettingResponse.md new file mode 100644 index 000000000..6f381aa12 --- /dev/null +++ b/sdks/ruby/docs/SettingResponse.md @@ -0,0 +1,15 @@ +# Dropbox::Sign::SettingResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value`*_required_ | ```Object``` | Current value of the setting. Null when the setting has no value. | | +| `is_inherited`*_required_ | ```Boolean``` | | | +| `source`*_required_ | ```String``` | | | +| `type`*_required_ | ```String``` | | | +| `writable`*_required_ | ```Boolean``` | | | +| `lock`*_required_ | [```SettingLockResponse```](SettingLockResponse.md) | | | + diff --git a/sdks/ruby/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/ruby/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 68e91f635..069612c68 100644 --- a/sdks/ruby/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/ruby/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -14,7 +14,7 @@ | `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | | `custom_fields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Hash``` | _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA | | | `signing_redirect_url` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/ruby/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/ruby/docs/SignatureRequestBulkSendWithTemplateRequest.md index 2c1ca54e7..81901cf58 100644 --- a/sdks/ruby/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/ruby/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -14,7 +14,7 @@ | `client_id` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | | `custom_fields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

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

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | | `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `metadata` | ```Hash``` | _t__SignatureRequestBulkSendWithTemplate::METADATA | | | `signing_redirect_url` | ```String``` | The URL you want signers redirected to after they successfully sign. | | | `subject` | ```String``` | The subject in the email that will be sent to the signers. | | | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | diff --git a/sdks/ruby/docs/StringSettingUpdate.md b/sdks/ruby/docs/StringSettingUpdate.md new file mode 100644 index 000000000..cc5767f54 --- /dev/null +++ b/sdks/ruby/docs/StringSettingUpdate.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::StringSettingUpdate + +Updates a string team setting. Provide `value`, `lock_mode`, or both. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `value` | ```String``` | String value to store. | | +| `lock_mode` | [```TeamSettingLock```](TeamSettingLock.md) | | | + diff --git a/sdks/ruby/docs/SubBulkSignerList.md b/sdks/ruby/docs/SubBulkSignerList.md index 8bc4c101c..b46f17653 100644 --- a/sdks/ruby/docs/SubBulkSignerList.md +++ b/sdks/ruby/docs/SubBulkSignerList.md @@ -8,4 +8,5 @@ | ---- | ---- | ----------- | ----- | | `custom_fields` | [```Array```](SubBulkSignerListCustomField.md) | An array of custom field values. | | | `signers` | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | +| `metadata` | ```Hash``` | _t__Sub::BulkSigner::METADATA | | diff --git a/sdks/ruby/docs/TeamApi.md b/sdks/ruby/docs/TeamApi.md index b8279a3b9..010fd5456 100644 --- a/sdks/ruby/docs/TeamApi.md +++ b/sdks/ruby/docs/TeamApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.hellosign.com/v3* | [`team_invites`](TeamApi.md#team_invites) | **GET** `/team/invites` | List Team Invites | | [`team_members`](TeamApi.md#team_members) | **GET** `/team/members/{team_id}` | List Team Members | | [`team_remove_member`](TeamApi.md#team_remove_member) | **POST** `/team/remove_member` | Remove User from Team | +| [`team_settings_get`](TeamApi.md#team_settings_get) | **GET** `/team/settings` | Get team settings | +| [`team_settings_update`](TeamApi.md#team_settings_update) | **POST** `/team/settings` | Modify team settings | | [`team_sub_teams`](TeamApi.md#team_sub_teams) | **GET** `/team/sub_teams/{team_id}` | List Sub Teams | | [`team_update`](TeamApi.md#team_update) | **PUT** `/team` | Update Team | @@ -578,6 +580,176 @@ end - **Accept**: application/json +## `team_settings_get` + +> ` team_settings_get(opts)` + +Get team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_get + company = response.settings.company + data_residency = response.settings.data_residency + + p response + p({ + team_id: response.team_id, + company: { + value: company.value, + is_inherited: company.is_inherited, + source: company.source, + type: company.type, + writable: company.writable, + lock: { + mode: company.lock.mode, + source: company.lock.source, + }, + }, + data_residency: { + value: data_residency.value, + is_inherited: data_residency.is_inherited, + source: data_residency.source, + type: data_residency.type, + writable: data_residency.writable, + lock: { + mode: data_residency.lock.mode, + source: data_residency.lock.source, + }, + }, + warnings: response.warnings, + }) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_get: #{e}" +end + +``` + +#### Using the `team_settings_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> team_settings_get_with_http_info(opts)` + +```ruby +begin + # Get team settings + data, status_code, headers = api_instance.team_settings_get_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling TeamApi->team_settings_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `team_id` | **String** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `team_settings_update` + +> ` team_settings_update(team_settings_update_request, opts)` + +Modify team settings + +team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_settings_update_request = Dropbox::Sign::TeamSettingsUpdateRequest.new +team_settings_update_request.data_residency = Dropbox::Sign::DataResidencySettingUpdate.new +team_settings_update_request.data_residency.value = Dropbox::Sign::DataResidency::EU +team_settings_update_request.company = Dropbox::Sign::StringSettingUpdate.new +team_settings_update_request.company.value = "Northwind" +team_settings_update_request.company.lock_mode = Dropbox::Sign::TeamSettingLock::ORGANIZATION_ADMINS + +begin + response = Dropbox::Sign::TeamApi.new.team_settings_update( + team_settings_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_settings_update: #{e}" +end + +``` + +#### Using the `team_settings_update_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> team_settings_update_with_http_info(team_settings_update_request, opts)` + +```ruby +begin + # Modify team settings + data, status_code, headers = api_instance.team_settings_update_with_http_info(team_settings_update_request, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling TeamApi->team_settings_update_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `team_settings_update_request` | [**TeamSettingsUpdateRequest**](TeamSettingsUpdateRequest.md) | | | +| `team_id` | **String** | Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. | [optional] | + +### Return type + +[**TeamSettingsResponse**](TeamSettingsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## `team_sub_teams` > ` team_sub_teams(team_id, opts)` diff --git a/sdks/ruby/docs/TeamCreateRequest.md b/sdks/ruby/docs/TeamCreateRequest.md index 739b81f65..25b3d75be 100644 --- a/sdks/ruby/docs/TeamCreateRequest.md +++ b/sdks/ruby/docs/TeamCreateRequest.md @@ -7,4 +7,5 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `name` | ```String``` | The name of your Team. | [default to 'Untitled Team'] | +| `parent_team_id` | ```String``` | _t__TeamCreate::PARENT_TEAM_ID | | diff --git a/sdks/ruby/docs/TeamResponse.md b/sdks/ruby/docs/TeamResponse.md index b7b847604..57c56480e 100644 --- a/sdks/ruby/docs/TeamResponse.md +++ b/sdks/ruby/docs/TeamResponse.md @@ -6,6 +6,8 @@ Contains information about your team and its members | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| `team_id` | ```String``` | The id of a team | | +| `parent_team_id` | ```String``` | _t__Team::PARENT_TEAM_ID | | | `name` | ```String``` | The name of your Team | | | `accounts` | [```Array```](AccountResponse.md) | | | | `invited_accounts` | [```Array```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | diff --git a/sdks/ruby/docs/TeamSettingLock.md b/sdks/ruby/docs/TeamSettingLock.md new file mode 100644 index 000000000..864be5abd --- /dev/null +++ b/sdks/ruby/docs/TeamSettingLock.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::TeamSettingLock + +Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/TeamSettingsResponse.md b/sdks/ruby/docs/TeamSettingsResponse.md new file mode 100644 index 000000000..f72eb5460 --- /dev/null +++ b/sdks/ruby/docs/TeamSettingsResponse.md @@ -0,0 +1,12 @@ +# Dropbox::Sign::TeamSettingsResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `team_id`*_required_ | ```String``` | | | +| `settings`*_required_ | [```TeamSettingsResponseSettings```](TeamSettingsResponseSettings.md) | | | +| `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | + diff --git a/sdks/ruby/docs/TeamSettingsResponseSettings.md b/sdks/ruby/docs/TeamSettingsResponseSettings.md new file mode 100644 index 000000000..3a2cc9f31 --- /dev/null +++ b/sdks/ruby/docs/TeamSettingsResponseSettings.md @@ -0,0 +1,34 @@ +# Dropbox::Sign::TeamSettingsResponseSettings + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `company`*_required_ | [```SettingResponse```](SettingResponse.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url`*_required_ | [```SettingResponse```](SettingResponse.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline`*_required_ | [```SettingResponse```](SettingResponse.md) | Custom tagline displayed with the account or team branding. | | +| `date_format`*_required_ | [```SettingResponse```](SettingResponse.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from`*_required_ | [```SettingResponse```](SettingResponse.md) | Sender name shown on signature request emails. | | +| `request_email_signature`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature appended to signature request emails. | | +| `required_signature_types`*_required_ | [```SettingResponse```](SettingResponse.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency`*_required_ | [```SettingResponse```](SettingResponse.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message`*_required_ | [```SettingResponse```](SettingResponse.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title`*_required_ | [```SettingResponse```](SettingResponse.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms`*_required_ | [```SettingResponse```](SettingResponse.md) | Whether SMS multifactor authentication is enabled for the team. | | + diff --git a/sdks/ruby/docs/TeamSettingsUpdateRequest.md b/sdks/ruby/docs/TeamSettingsUpdateRequest.md new file mode 100644 index 000000000..fc6096bb8 --- /dev/null +++ b/sdks/ruby/docs/TeamSettingsUpdateRequest.md @@ -0,0 +1,35 @@ +# Dropbox::Sign::TeamSettingsUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `company` | [```StringSettingUpdate```](StringSettingUpdate.md) | Company name associated with this account or team. | | +| `custom_signing_redirect_enabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether signers are redirected to a custom URL after completing a signature request. | | +| `custom_signing_redirect_url` | [```StringSettingUpdate```](StringSettingUpdate.md) | URL where signers are redirected after completing a signature request when custom redirects are enabled. | | +| `custom_tagline` | [```StringSettingUpdate```](StringSettingUpdate.md) | Custom tagline displayed with the account or team branding. | | +| `date_format` | [```DateFormatSettingUpdate```](DateFormatSettingUpdate.md) | Date format used to display dates. List the setting in `unset` to inherit the default. | | +| `is_signature_reminders_enabled` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether automatic reminder emails are enabled for incomplete signature requests. | | +| `request_email_from` | [```StringSettingUpdate```](StringSettingUpdate.md) | Sender name shown on signature request emails. | | +| `request_email_signature` | [```StringSettingUpdate```](StringSettingUpdate.md) | Signature appended to signature request emails. | | +| `required_signature_types` | [```RequiredSignatureTypesSettingUpdate```](RequiredSignatureTypesSettingUpdate.md) | Signature creation methods signers may use. | | +| `should_enable_tamper_proof` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents include a digital tamper-proof seal. | | +| `should_include_distinct_pdfs` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether completed documents remain as separate PDF files instead of being merged into one PDF. | | +| `should_offer_signer_access_code` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require an access code to verify a signer. | | +| `should_offer_signer_sms_authentication` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether senders can require SMS authentication to verify a signer. | | +| `should_remove_document_id` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether the Dropbox Sign document ID is hidden on sent documents. | | +| `data_residency` | [```DataResidencySettingUpdate```](DataResidencySettingUpdate.md) | Storage region for team documents. | | +| `allow_team_delete_document_for_everyone` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can delete a document for all participants. | | +| `allow_team_download_csv` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members can download CSV files. | | +| `lock_team_template_creation` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from creating templates. | | +| `lock_team_template_gallery` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether team members are prevented from using the template gallery. | | +| `self_sign_message` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create self-signed documents. | | +| `self_sign_title` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create self-signed documents. | | +| `signature_request_message` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default message enforced for team members when they create signature requests. | | +| `signature_request_title` | [```StringSettingUpdate```](StringSettingUpdate.md) | Default title enforced for team members when they create signature requests. | | +| `multifactor_auth_app` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether authenticator-app multifactor authentication is enabled for the team. | | +| `multifactor_auth_sms` | [```BooleanSettingUpdate```](BooleanSettingUpdate.md) | Whether SMS multifactor authentication is enabled for the team. | | +| `unset` | ```Array``` | Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. | | + diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index e83c59754..926f200a8 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -24,6 +24,9 @@ require 'dropbox-sign/models/account_response_quotas' require 'dropbox-sign/models/account_response_settings' require 'dropbox-sign/models/account_response_usage' +require 'dropbox-sign/models/account_settings_response' +require 'dropbox-sign/models/account_settings_response_settings' +require 'dropbox-sign/models/account_settings_update_request' require 'dropbox-sign/models/account_update_request' require 'dropbox-sign/models/account_verify_request' require 'dropbox-sign/models/account_verify_response' @@ -37,11 +40,16 @@ require 'dropbox-sign/models/api_app_response_owner_account' require 'dropbox-sign/models/api_app_response_white_labeling_options' require 'dropbox-sign/models/api_app_update_request' +require 'dropbox-sign/models/boolean_setting_update' require 'dropbox-sign/models/bulk_send_job_get_response' require 'dropbox-sign/models/bulk_send_job_get_response_signature_requests' require 'dropbox-sign/models/bulk_send_job_list_response' require 'dropbox-sign/models/bulk_send_job_response' require 'dropbox-sign/models/bulk_send_job_send_response' +require 'dropbox-sign/models/data_residency' +require 'dropbox-sign/models/data_residency_setting_update' +require 'dropbox-sign/models/date_format' +require 'dropbox-sign/models/date_format_setting_update' require 'dropbox-sign/models/document_field_detection_request' require 'dropbox-sign/models/document_field_detection_response' require 'dropbox-sign/models/document_field_detection_response_detection_result' @@ -80,6 +88,10 @@ require 'dropbox-sign/models/report_create_request' require 'dropbox-sign/models/report_create_response' require 'dropbox-sign/models/report_response' +require 'dropbox-sign/models/required_signature_type' +require 'dropbox-sign/models/required_signature_types_setting_update' +require 'dropbox-sign/models/setting_lock_response' +require 'dropbox-sign/models/setting_response' require 'dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request' require 'dropbox-sign/models/signature_request_bulk_send_with_template_request' require 'dropbox-sign/models/signature_request_create_embedded_request' @@ -101,6 +113,7 @@ require 'dropbox-sign/models/signature_request_send_request' require 'dropbox-sign/models/signature_request_send_with_template_request' require 'dropbox-sign/models/signature_request_update_request' +require 'dropbox-sign/models/string_setting_update' require 'dropbox-sign/models/sub_attachment' require 'dropbox-sign/models/sub_bulk_signer_list' require 'dropbox-sign/models/sub_bulk_signer_list_custom_field' @@ -139,6 +152,10 @@ require 'dropbox-sign/models/team_parent_response' require 'dropbox-sign/models/team_remove_member_request' require 'dropbox-sign/models/team_response' +require 'dropbox-sign/models/team_setting_lock' +require 'dropbox-sign/models/team_settings_response' +require 'dropbox-sign/models/team_settings_response_settings' +require 'dropbox-sign/models/team_settings_update_request' require 'dropbox-sign/models/team_sub_teams_response' require 'dropbox-sign/models/team_update_request' require 'dropbox-sign/models/template_add_user_request' diff --git a/sdks/ruby/lib/dropbox-sign/api/account_api.rb b/sdks/ruby/lib/dropbox-sign/api/account_api.rb index 873531b58..78ea8240e 100644 --- a/sdks/ruby/lib/dropbox-sign/api/account_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/account_api.rb @@ -231,6 +231,215 @@ def account_get_with_http_info(opts = {}) return data, status_code, headers end + # Get account settings + # account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountSettingsGetExample.rb + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + # @return [AccountSettingsResponse] + def account_settings_get(opts = {}) + data, _status_code, _headers = account_settings_get_with_http_info(opts) + data + end + + # Get account settings + # account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountSettingsGetExample.rb + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + # @return [Array<(AccountSettingsResponse, Integer, Hash)>] AccountSettingsResponse data, response status code and response headers + def account_settings_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountApi.account_settings_get ...' + end + # resource path + local_var_path = '/account/settings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].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] || 'AccountSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"AccountApi.account_settings_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::AccountSettingsResponse" + ) + + 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 && 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 + + raise e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountApi#account_settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Modify account settings + # account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountSettingsUpdateExample.rb + # @param account_settings_update_request [AccountSettingsUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + # @return [AccountSettingsResponse] + def account_settings_update(account_settings_update_request, opts = {}) + data, _status_code, _headers = account_settings_update_with_http_info(account_settings_update_request, opts) + data + end + + # Modify account settings + # account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountSettingsUpdateExample.rb + # @param account_settings_update_request [AccountSettingsUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. + # @return [Array<(AccountSettingsResponse, Integer, Hash)>] AccountSettingsResponse data, response status code and response headers + def account_settings_update_with_http_info(account_settings_update_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountApi.account_settings_update ...' + end + # verify the required parameter 'account_settings_update_request' is set + if @api_client.config.client_side_validation && account_settings_update_request.nil? + fail ArgumentError, "Missing the required parameter 'account_settings_update_request' when calling AccountApi.account_settings_update" + end + # resource path + local_var_path = '/account/settings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].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'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + account_settings_update_request, + Dropbox::Sign::AccountSettingsUpdateRequest.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] || 'AccountSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"AccountApi.account_settings_update", + :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::AccountSettingsResponse" + ) + + 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 && 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 + + raise e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountApi#account_settings_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update Account # Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountUpdateExample.rb diff --git a/sdks/ruby/lib/dropbox-sign/api/team_api.rb b/sdks/ruby/lib/dropbox-sign/api/team_api.rb index bafc56226..524db27fc 100644 --- a/sdks/ruby/lib/dropbox-sign/api/team_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/team_api.rb @@ -815,6 +815,215 @@ def team_remove_member_with_http_info(team_remove_member_request, opts = {}) return data, status_code, headers end + # Get team settings + # team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/TeamSettingsGetExample.rb + # @param [Hash] opts the optional parameters + # @option opts [String] :team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + # @return [TeamSettingsResponse] + def team_settings_get(opts = {}) + data, _status_code, _headers = team_settings_get_with_http_info(opts) + data + end + + # Get team settings + # team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/TeamSettingsGetExample.rb + # @param [Hash] opts the optional parameters + # @option opts [String] :team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + # @return [Array<(TeamSettingsResponse, Integer, Hash)>] TeamSettingsResponse data, response status code and response headers + def team_settings_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamApi.team_settings_get ...' + end + # resource path + local_var_path = '/team/settings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].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] || 'TeamSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"TeamApi.team_settings_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::TeamSettingsResponse" + ) + + 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 && 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 + + raise e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamApi#team_settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Modify team settings + # team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/TeamSettingsUpdateExample.rb + # @param team_settings_update_request [TeamSettingsUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + # @return [TeamSettingsResponse] + def team_settings_update(team_settings_update_request, opts = {}) + data, _status_code, _headers = team_settings_update_with_http_info(team_settings_update_request, opts) + data + end + + # Modify team settings + # team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. + # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/TeamSettingsUpdateExample.rb + # @param team_settings_update_request [TeamSettingsUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :team_id Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + # @return [Array<(TeamSettingsResponse, Integer, Hash)>] TeamSettingsResponse data, response status code and response headers + def team_settings_update_with_http_info(team_settings_update_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamApi.team_settings_update ...' + end + # verify the required parameter 'team_settings_update_request' is set + if @api_client.config.client_side_validation && team_settings_update_request.nil? + fail ArgumentError, "Missing the required parameter 'team_settings_update_request' when calling TeamApi.team_settings_update" + end + # resource path + local_var_path = '/team/settings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].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'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + team_settings_update_request, + Dropbox::Sign::TeamSettingsUpdateRequest.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] || 'TeamSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"TeamApi.team_settings_update", + :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::TeamSettingsResponse" + ) + + 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 && 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 + + raise e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamApi#team_settings_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List Sub Teams # Provides a paginated list of sub teams that belong to a given team. # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/TeamSubTeamsExample.rb diff --git a/sdks/ruby/lib/dropbox-sign/models/account_settings_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_settings_response.rb new file mode 100644 index 000000000..e0bdfb703 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/account_settings_response.rb @@ -0,0 +1,304 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class AccountSettingsResponse + # @return [String] + attr_accessor :account_id + + # @return [AccountSettingsResponseSettings] + attr_accessor :settings + + # A list of warnings. + # @return [Array] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'account_id', + :'settings' => :'settings', + :'warnings' => :'warnings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_id' => :'String', + :'settings' => :'AccountSettingsResponseSettings', + :'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 [AccountSettingsResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "AccountSettingsResponse" + ) || AccountSettingsResponse.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::AccountSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + 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 @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @settings.nil? + invalid_properties.push('invalid value for "settings", settings 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 @account_id.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] account_id Value to be assigned + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'account_id cannot be nil' + end + + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param [Object] settings Value to be assigned + def settings=(settings) + if settings.nil? + fail ArgumentError, 'settings cannot be nil' + end + + @settings = settings + 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 && + account_id == o.account_id && + settings == o.settings && + 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 + [account_id, settings, 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/account_settings_response_settings.rb b/sdks/ruby/lib/dropbox-sign/models/account_settings_response_settings.rb new file mode 100644 index 000000000..1fd9a152b --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/account_settings_response_settings.rb @@ -0,0 +1,917 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class AccountSettingsResponseSettings + # Company name associated with this account or team. + # @return [SettingResponse] + attr_accessor :company + + # Whether signers are redirected to a custom URL after completing a signature request. + # @return [SettingResponse] + attr_accessor :custom_signing_redirect_enabled + + # URL where signers are redirected after completing a signature request when custom redirects are enabled. + # @return [SettingResponse] + attr_accessor :custom_signing_redirect_url + + # Custom tagline displayed with the account or team branding. + # @return [SettingResponse] + attr_accessor :custom_tagline + + # Date format used to display dates. List the setting in `unset` to inherit the default. + # @return [SettingResponse] + attr_accessor :date_format + + # Whether automatic reminder emails are enabled for incomplete signature requests. + # @return [SettingResponse] + attr_accessor :is_signature_reminders_enabled + + # Sender name shown on signature request emails. + # @return [SettingResponse] + attr_accessor :request_email_from + + # Signature appended to signature request emails. + # @return [SettingResponse] + attr_accessor :request_email_signature + + # Signature creation methods signers may use. + # @return [SettingResponse] + attr_accessor :required_signature_types + + # Whether completed documents include a digital tamper-proof seal. + # @return [SettingResponse] + attr_accessor :should_enable_tamper_proof + + # Whether completed documents remain as separate PDF files instead of being merged into one PDF. + # @return [SettingResponse] + attr_accessor :should_include_distinct_pdfs + + # Whether senders can require an access code to verify a signer. + # @return [SettingResponse] + attr_accessor :should_offer_signer_access_code + + # Whether senders can require SMS authentication to verify a signer. + # @return [SettingResponse] + attr_accessor :should_offer_signer_sms_authentication + + # Whether the Dropbox Sign document ID is hidden on sent documents. + # @return [SettingResponse] + attr_accessor :should_remove_document_id + + # Whether to notify the account when someone signs a document it sent. + # @return [SettingResponse] + attr_accessor :is_notify_on_sign_enabled + + # Whether to notify the account when someone opens a document it sent. + # @return [SettingResponse] + attr_accessor :is_notify_on_view_enabled + + # Whether values entered in text fields are saved and suggested for future signature requests. + # @return [SettingResponse] + attr_accessor :should_autocomplete + + # Whether completed signature requests include PDF copies in emails sent to the account. + # @return [SettingResponse] + attr_accessor :should_include_requested_pdfs + + # Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + # @return [SettingResponse] + attr_accessor :should_include_requested_pdfs_for_others + + # Whether emails sent to the account include PDF copies of documents it sends. + # @return [SettingResponse] + attr_accessor :should_include_sent_doc_pdfs + + # Whether emails sent to recipients include PDF copies of documents the account sends. + # @return [SettingResponse] + attr_accessor :should_include_sent_doc_pdfs_for_others + + # Whether to send the account a daily email summarizing outstanding signature requests. + # @return [SettingResponse] + attr_accessor :should_send_daily_summary + + # Whether to notify the account when it signs a document on a third-party site. + # @return [SettingResponse] + attr_accessor :should_send_embedded_signature_conf_emails + + # Whether to notify all parties when an ordered signature request starts. + # @return [SettingResponse] + attr_accessor :should_send_ordered_sr_email + + # Whether to notify the account when it signs and sends a document. + # @return [SettingResponse] + attr_accessor :should_send_outbound_conf_emails + + # Whether to notify the account when someone signs a document sent by its team through a template link. + # @return [SettingResponse] + attr_accessor :template_link_signature_emails_enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'company' => :'company', + :'custom_signing_redirect_enabled' => :'custom_signing_redirect_enabled', + :'custom_signing_redirect_url' => :'custom_signing_redirect_url', + :'custom_tagline' => :'custom_tagline', + :'date_format' => :'date_format', + :'is_signature_reminders_enabled' => :'is_signature_reminders_enabled', + :'request_email_from' => :'request_email_from', + :'request_email_signature' => :'request_email_signature', + :'required_signature_types' => :'required_signature_types', + :'should_enable_tamper_proof' => :'should_enable_tamper_proof', + :'should_include_distinct_pdfs' => :'should_include_distinct_pdfs', + :'should_offer_signer_access_code' => :'should_offer_signer_access_code', + :'should_offer_signer_sms_authentication' => :'should_offer_signer_sms_authentication', + :'should_remove_document_id' => :'should_remove_document_id', + :'is_notify_on_sign_enabled' => :'is_notify_on_sign_enabled', + :'is_notify_on_view_enabled' => :'is_notify_on_view_enabled', + :'should_autocomplete' => :'should_autocomplete', + :'should_include_requested_pdfs' => :'should_include_requested_pdfs', + :'should_include_requested_pdfs_for_others' => :'should_include_requested_pdfs_for_others', + :'should_include_sent_doc_pdfs' => :'should_include_sent_doc_pdfs', + :'should_include_sent_doc_pdfs_for_others' => :'should_include_sent_doc_pdfs_for_others', + :'should_send_daily_summary' => :'should_send_daily_summary', + :'should_send_embedded_signature_conf_emails' => :'should_send_embedded_signature_conf_emails', + :'should_send_ordered_sr_email' => :'should_send_ordered_sr_email', + :'should_send_outbound_conf_emails' => :'should_send_outbound_conf_emails', + :'template_link_signature_emails_enabled' => :'template_link_signature_emails_enabled' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'company' => :'SettingResponse', + :'custom_signing_redirect_enabled' => :'SettingResponse', + :'custom_signing_redirect_url' => :'SettingResponse', + :'custom_tagline' => :'SettingResponse', + :'date_format' => :'SettingResponse', + :'is_signature_reminders_enabled' => :'SettingResponse', + :'request_email_from' => :'SettingResponse', + :'request_email_signature' => :'SettingResponse', + :'required_signature_types' => :'SettingResponse', + :'should_enable_tamper_proof' => :'SettingResponse', + :'should_include_distinct_pdfs' => :'SettingResponse', + :'should_offer_signer_access_code' => :'SettingResponse', + :'should_offer_signer_sms_authentication' => :'SettingResponse', + :'should_remove_document_id' => :'SettingResponse', + :'is_notify_on_sign_enabled' => :'SettingResponse', + :'is_notify_on_view_enabled' => :'SettingResponse', + :'should_autocomplete' => :'SettingResponse', + :'should_include_requested_pdfs' => :'SettingResponse', + :'should_include_requested_pdfs_for_others' => :'SettingResponse', + :'should_include_sent_doc_pdfs' => :'SettingResponse', + :'should_include_sent_doc_pdfs_for_others' => :'SettingResponse', + :'should_send_daily_summary' => :'SettingResponse', + :'should_send_embedded_signature_conf_emails' => :'SettingResponse', + :'should_send_ordered_sr_email' => :'SettingResponse', + :'should_send_outbound_conf_emails' => :'SettingResponse', + :'template_link_signature_emails_enabled' => :'SettingResponse' + } + 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 [AccountSettingsResponseSettings] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "AccountSettingsResponseSettings" + ) || AccountSettingsResponseSettings.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::AccountSettingsResponseSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountSettingsResponseSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'custom_signing_redirect_enabled') + self.custom_signing_redirect_enabled = attributes[:'custom_signing_redirect_enabled'] + end + + if attributes.key?(:'custom_signing_redirect_url') + self.custom_signing_redirect_url = attributes[:'custom_signing_redirect_url'] + end + + if attributes.key?(:'custom_tagline') + self.custom_tagline = attributes[:'custom_tagline'] + end + + if attributes.key?(:'date_format') + self.date_format = attributes[:'date_format'] + end + + if attributes.key?(:'is_signature_reminders_enabled') + self.is_signature_reminders_enabled = attributes[:'is_signature_reminders_enabled'] + end + + if attributes.key?(:'request_email_from') + self.request_email_from = attributes[:'request_email_from'] + end + + if attributes.key?(:'request_email_signature') + self.request_email_signature = attributes[:'request_email_signature'] + end + + if attributes.key?(:'required_signature_types') + self.required_signature_types = attributes[:'required_signature_types'] + end + + if attributes.key?(:'should_enable_tamper_proof') + self.should_enable_tamper_proof = attributes[:'should_enable_tamper_proof'] + end + + if attributes.key?(:'should_include_distinct_pdfs') + self.should_include_distinct_pdfs = attributes[:'should_include_distinct_pdfs'] + end + + if attributes.key?(:'should_offer_signer_access_code') + self.should_offer_signer_access_code = attributes[:'should_offer_signer_access_code'] + end + + if attributes.key?(:'should_offer_signer_sms_authentication') + self.should_offer_signer_sms_authentication = attributes[:'should_offer_signer_sms_authentication'] + end + + if attributes.key?(:'should_remove_document_id') + self.should_remove_document_id = attributes[:'should_remove_document_id'] + end + + if attributes.key?(:'is_notify_on_sign_enabled') + self.is_notify_on_sign_enabled = attributes[:'is_notify_on_sign_enabled'] + end + + if attributes.key?(:'is_notify_on_view_enabled') + self.is_notify_on_view_enabled = attributes[:'is_notify_on_view_enabled'] + end + + if attributes.key?(:'should_autocomplete') + self.should_autocomplete = attributes[:'should_autocomplete'] + end + + if attributes.key?(:'should_include_requested_pdfs') + self.should_include_requested_pdfs = attributes[:'should_include_requested_pdfs'] + end + + if attributes.key?(:'should_include_requested_pdfs_for_others') + self.should_include_requested_pdfs_for_others = attributes[:'should_include_requested_pdfs_for_others'] + end + + if attributes.key?(:'should_include_sent_doc_pdfs') + self.should_include_sent_doc_pdfs = attributes[:'should_include_sent_doc_pdfs'] + end + + if attributes.key?(:'should_include_sent_doc_pdfs_for_others') + self.should_include_sent_doc_pdfs_for_others = attributes[:'should_include_sent_doc_pdfs_for_others'] + end + + if attributes.key?(:'should_send_daily_summary') + self.should_send_daily_summary = attributes[:'should_send_daily_summary'] + end + + if attributes.key?(:'should_send_embedded_signature_conf_emails') + self.should_send_embedded_signature_conf_emails = attributes[:'should_send_embedded_signature_conf_emails'] + end + + if attributes.key?(:'should_send_ordered_sr_email') + self.should_send_ordered_sr_email = attributes[:'should_send_ordered_sr_email'] + end + + if attributes.key?(:'should_send_outbound_conf_emails') + self.should_send_outbound_conf_emails = attributes[:'should_send_outbound_conf_emails'] + end + + if attributes.key?(:'template_link_signature_emails_enabled') + self.template_link_signature_emails_enabled = attributes[:'template_link_signature_emails_enabled'] + 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 @company.nil? + invalid_properties.push('invalid value for "company", company cannot be nil.') + end + + if @custom_signing_redirect_enabled.nil? + invalid_properties.push('invalid value for "custom_signing_redirect_enabled", custom_signing_redirect_enabled cannot be nil.') + end + + if @custom_signing_redirect_url.nil? + invalid_properties.push('invalid value for "custom_signing_redirect_url", custom_signing_redirect_url cannot be nil.') + end + + if @custom_tagline.nil? + invalid_properties.push('invalid value for "custom_tagline", custom_tagline cannot be nil.') + end + + if @date_format.nil? + invalid_properties.push('invalid value for "date_format", date_format cannot be nil.') + end + + if @is_signature_reminders_enabled.nil? + invalid_properties.push('invalid value for "is_signature_reminders_enabled", is_signature_reminders_enabled cannot be nil.') + end + + if @request_email_from.nil? + invalid_properties.push('invalid value for "request_email_from", request_email_from cannot be nil.') + end + + if @request_email_signature.nil? + invalid_properties.push('invalid value for "request_email_signature", request_email_signature cannot be nil.') + end + + if @required_signature_types.nil? + invalid_properties.push('invalid value for "required_signature_types", required_signature_types cannot be nil.') + end + + if @should_enable_tamper_proof.nil? + invalid_properties.push('invalid value for "should_enable_tamper_proof", should_enable_tamper_proof cannot be nil.') + end + + if @should_include_distinct_pdfs.nil? + invalid_properties.push('invalid value for "should_include_distinct_pdfs", should_include_distinct_pdfs cannot be nil.') + end + + if @should_offer_signer_access_code.nil? + invalid_properties.push('invalid value for "should_offer_signer_access_code", should_offer_signer_access_code cannot be nil.') + end + + if @should_offer_signer_sms_authentication.nil? + invalid_properties.push('invalid value for "should_offer_signer_sms_authentication", should_offer_signer_sms_authentication cannot be nil.') + end + + if @should_remove_document_id.nil? + invalid_properties.push('invalid value for "should_remove_document_id", should_remove_document_id cannot be nil.') + end + + if @is_notify_on_sign_enabled.nil? + invalid_properties.push('invalid value for "is_notify_on_sign_enabled", is_notify_on_sign_enabled cannot be nil.') + end + + if @is_notify_on_view_enabled.nil? + invalid_properties.push('invalid value for "is_notify_on_view_enabled", is_notify_on_view_enabled cannot be nil.') + end + + if @should_autocomplete.nil? + invalid_properties.push('invalid value for "should_autocomplete", should_autocomplete cannot be nil.') + end + + if @should_include_requested_pdfs.nil? + invalid_properties.push('invalid value for "should_include_requested_pdfs", should_include_requested_pdfs cannot be nil.') + end + + if @should_include_requested_pdfs_for_others.nil? + invalid_properties.push('invalid value for "should_include_requested_pdfs_for_others", should_include_requested_pdfs_for_others cannot be nil.') + end + + if @should_include_sent_doc_pdfs.nil? + invalid_properties.push('invalid value for "should_include_sent_doc_pdfs", should_include_sent_doc_pdfs cannot be nil.') + end + + if @should_include_sent_doc_pdfs_for_others.nil? + invalid_properties.push('invalid value for "should_include_sent_doc_pdfs_for_others", should_include_sent_doc_pdfs_for_others cannot be nil.') + end + + if @should_send_daily_summary.nil? + invalid_properties.push('invalid value for "should_send_daily_summary", should_send_daily_summary cannot be nil.') + end + + if @should_send_embedded_signature_conf_emails.nil? + invalid_properties.push('invalid value for "should_send_embedded_signature_conf_emails", should_send_embedded_signature_conf_emails cannot be nil.') + end + + if @should_send_ordered_sr_email.nil? + invalid_properties.push('invalid value for "should_send_ordered_sr_email", should_send_ordered_sr_email cannot be nil.') + end + + if @should_send_outbound_conf_emails.nil? + invalid_properties.push('invalid value for "should_send_outbound_conf_emails", should_send_outbound_conf_emails cannot be nil.') + end + + if @template_link_signature_emails_enabled.nil? + invalid_properties.push('invalid value for "template_link_signature_emails_enabled", template_link_signature_emails_enabled 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 @company.nil? + return false if @custom_signing_redirect_enabled.nil? + return false if @custom_signing_redirect_url.nil? + return false if @custom_tagline.nil? + return false if @date_format.nil? + return false if @is_signature_reminders_enabled.nil? + return false if @request_email_from.nil? + return false if @request_email_signature.nil? + return false if @required_signature_types.nil? + return false if @should_enable_tamper_proof.nil? + return false if @should_include_distinct_pdfs.nil? + return false if @should_offer_signer_access_code.nil? + return false if @should_offer_signer_sms_authentication.nil? + return false if @should_remove_document_id.nil? + return false if @is_notify_on_sign_enabled.nil? + return false if @is_notify_on_view_enabled.nil? + return false if @should_autocomplete.nil? + return false if @should_include_requested_pdfs.nil? + return false if @should_include_requested_pdfs_for_others.nil? + return false if @should_include_sent_doc_pdfs.nil? + return false if @should_include_sent_doc_pdfs_for_others.nil? + return false if @should_send_daily_summary.nil? + return false if @should_send_embedded_signature_conf_emails.nil? + return false if @should_send_ordered_sr_email.nil? + return false if @should_send_outbound_conf_emails.nil? + return false if @template_link_signature_emails_enabled.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] company Value to be assigned + def company=(company) + if company.nil? + fail ArgumentError, 'company cannot be nil' + end + + @company = company + end + + # Custom attribute writer method with validation + # @param [Object] custom_signing_redirect_enabled Value to be assigned + def custom_signing_redirect_enabled=(custom_signing_redirect_enabled) + if custom_signing_redirect_enabled.nil? + fail ArgumentError, 'custom_signing_redirect_enabled cannot be nil' + end + + @custom_signing_redirect_enabled = custom_signing_redirect_enabled + end + + # Custom attribute writer method with validation + # @param [Object] custom_signing_redirect_url Value to be assigned + def custom_signing_redirect_url=(custom_signing_redirect_url) + if custom_signing_redirect_url.nil? + fail ArgumentError, 'custom_signing_redirect_url cannot be nil' + end + + @custom_signing_redirect_url = custom_signing_redirect_url + end + + # Custom attribute writer method with validation + # @param [Object] custom_tagline Value to be assigned + def custom_tagline=(custom_tagline) + if custom_tagline.nil? + fail ArgumentError, 'custom_tagline cannot be nil' + end + + @custom_tagline = custom_tagline + end + + # Custom attribute writer method with validation + # @param [Object] date_format Value to be assigned + def date_format=(date_format) + if date_format.nil? + fail ArgumentError, 'date_format cannot be nil' + end + + @date_format = date_format + end + + # Custom attribute writer method with validation + # @param [Object] is_signature_reminders_enabled Value to be assigned + def is_signature_reminders_enabled=(is_signature_reminders_enabled) + if is_signature_reminders_enabled.nil? + fail ArgumentError, 'is_signature_reminders_enabled cannot be nil' + end + + @is_signature_reminders_enabled = is_signature_reminders_enabled + end + + # Custom attribute writer method with validation + # @param [Object] request_email_from Value to be assigned + def request_email_from=(request_email_from) + if request_email_from.nil? + fail ArgumentError, 'request_email_from cannot be nil' + end + + @request_email_from = request_email_from + end + + # Custom attribute writer method with validation + # @param [Object] request_email_signature Value to be assigned + def request_email_signature=(request_email_signature) + if request_email_signature.nil? + fail ArgumentError, 'request_email_signature cannot be nil' + end + + @request_email_signature = request_email_signature + end + + # Custom attribute writer method with validation + # @param [Object] required_signature_types Value to be assigned + def required_signature_types=(required_signature_types) + if required_signature_types.nil? + fail ArgumentError, 'required_signature_types cannot be nil' + end + + @required_signature_types = required_signature_types + end + + # Custom attribute writer method with validation + # @param [Object] should_enable_tamper_proof Value to be assigned + def should_enable_tamper_proof=(should_enable_tamper_proof) + if should_enable_tamper_proof.nil? + fail ArgumentError, 'should_enable_tamper_proof cannot be nil' + end + + @should_enable_tamper_proof = should_enable_tamper_proof + end + + # Custom attribute writer method with validation + # @param [Object] should_include_distinct_pdfs Value to be assigned + def should_include_distinct_pdfs=(should_include_distinct_pdfs) + if should_include_distinct_pdfs.nil? + fail ArgumentError, 'should_include_distinct_pdfs cannot be nil' + end + + @should_include_distinct_pdfs = should_include_distinct_pdfs + end + + # Custom attribute writer method with validation + # @param [Object] should_offer_signer_access_code Value to be assigned + def should_offer_signer_access_code=(should_offer_signer_access_code) + if should_offer_signer_access_code.nil? + fail ArgumentError, 'should_offer_signer_access_code cannot be nil' + end + + @should_offer_signer_access_code = should_offer_signer_access_code + end + + # Custom attribute writer method with validation + # @param [Object] should_offer_signer_sms_authentication Value to be assigned + def should_offer_signer_sms_authentication=(should_offer_signer_sms_authentication) + if should_offer_signer_sms_authentication.nil? + fail ArgumentError, 'should_offer_signer_sms_authentication cannot be nil' + end + + @should_offer_signer_sms_authentication = should_offer_signer_sms_authentication + end + + # Custom attribute writer method with validation + # @param [Object] should_remove_document_id Value to be assigned + def should_remove_document_id=(should_remove_document_id) + if should_remove_document_id.nil? + fail ArgumentError, 'should_remove_document_id cannot be nil' + end + + @should_remove_document_id = should_remove_document_id + end + + # Custom attribute writer method with validation + # @param [Object] is_notify_on_sign_enabled Value to be assigned + def is_notify_on_sign_enabled=(is_notify_on_sign_enabled) + if is_notify_on_sign_enabled.nil? + fail ArgumentError, 'is_notify_on_sign_enabled cannot be nil' + end + + @is_notify_on_sign_enabled = is_notify_on_sign_enabled + end + + # Custom attribute writer method with validation + # @param [Object] is_notify_on_view_enabled Value to be assigned + def is_notify_on_view_enabled=(is_notify_on_view_enabled) + if is_notify_on_view_enabled.nil? + fail ArgumentError, 'is_notify_on_view_enabled cannot be nil' + end + + @is_notify_on_view_enabled = is_notify_on_view_enabled + end + + # Custom attribute writer method with validation + # @param [Object] should_autocomplete Value to be assigned + def should_autocomplete=(should_autocomplete) + if should_autocomplete.nil? + fail ArgumentError, 'should_autocomplete cannot be nil' + end + + @should_autocomplete = should_autocomplete + end + + # Custom attribute writer method with validation + # @param [Object] should_include_requested_pdfs Value to be assigned + def should_include_requested_pdfs=(should_include_requested_pdfs) + if should_include_requested_pdfs.nil? + fail ArgumentError, 'should_include_requested_pdfs cannot be nil' + end + + @should_include_requested_pdfs = should_include_requested_pdfs + end + + # Custom attribute writer method with validation + # @param [Object] should_include_requested_pdfs_for_others Value to be assigned + def should_include_requested_pdfs_for_others=(should_include_requested_pdfs_for_others) + if should_include_requested_pdfs_for_others.nil? + fail ArgumentError, 'should_include_requested_pdfs_for_others cannot be nil' + end + + @should_include_requested_pdfs_for_others = should_include_requested_pdfs_for_others + end + + # Custom attribute writer method with validation + # @param [Object] should_include_sent_doc_pdfs Value to be assigned + def should_include_sent_doc_pdfs=(should_include_sent_doc_pdfs) + if should_include_sent_doc_pdfs.nil? + fail ArgumentError, 'should_include_sent_doc_pdfs cannot be nil' + end + + @should_include_sent_doc_pdfs = should_include_sent_doc_pdfs + end + + # Custom attribute writer method with validation + # @param [Object] should_include_sent_doc_pdfs_for_others Value to be assigned + def should_include_sent_doc_pdfs_for_others=(should_include_sent_doc_pdfs_for_others) + if should_include_sent_doc_pdfs_for_others.nil? + fail ArgumentError, 'should_include_sent_doc_pdfs_for_others cannot be nil' + end + + @should_include_sent_doc_pdfs_for_others = should_include_sent_doc_pdfs_for_others + end + + # Custom attribute writer method with validation + # @param [Object] should_send_daily_summary Value to be assigned + def should_send_daily_summary=(should_send_daily_summary) + if should_send_daily_summary.nil? + fail ArgumentError, 'should_send_daily_summary cannot be nil' + end + + @should_send_daily_summary = should_send_daily_summary + end + + # Custom attribute writer method with validation + # @param [Object] should_send_embedded_signature_conf_emails Value to be assigned + def should_send_embedded_signature_conf_emails=(should_send_embedded_signature_conf_emails) + if should_send_embedded_signature_conf_emails.nil? + fail ArgumentError, 'should_send_embedded_signature_conf_emails cannot be nil' + end + + @should_send_embedded_signature_conf_emails = should_send_embedded_signature_conf_emails + end + + # Custom attribute writer method with validation + # @param [Object] should_send_ordered_sr_email Value to be assigned + def should_send_ordered_sr_email=(should_send_ordered_sr_email) + if should_send_ordered_sr_email.nil? + fail ArgumentError, 'should_send_ordered_sr_email cannot be nil' + end + + @should_send_ordered_sr_email = should_send_ordered_sr_email + end + + # Custom attribute writer method with validation + # @param [Object] should_send_outbound_conf_emails Value to be assigned + def should_send_outbound_conf_emails=(should_send_outbound_conf_emails) + if should_send_outbound_conf_emails.nil? + fail ArgumentError, 'should_send_outbound_conf_emails cannot be nil' + end + + @should_send_outbound_conf_emails = should_send_outbound_conf_emails + end + + # Custom attribute writer method with validation + # @param [Object] template_link_signature_emails_enabled Value to be assigned + def template_link_signature_emails_enabled=(template_link_signature_emails_enabled) + if template_link_signature_emails_enabled.nil? + fail ArgumentError, 'template_link_signature_emails_enabled cannot be nil' + end + + @template_link_signature_emails_enabled = template_link_signature_emails_enabled + 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 && + company == o.company && + custom_signing_redirect_enabled == o.custom_signing_redirect_enabled && + custom_signing_redirect_url == o.custom_signing_redirect_url && + custom_tagline == o.custom_tagline && + date_format == o.date_format && + is_signature_reminders_enabled == o.is_signature_reminders_enabled && + request_email_from == o.request_email_from && + request_email_signature == o.request_email_signature && + required_signature_types == o.required_signature_types && + should_enable_tamper_proof == o.should_enable_tamper_proof && + should_include_distinct_pdfs == o.should_include_distinct_pdfs && + should_offer_signer_access_code == o.should_offer_signer_access_code && + should_offer_signer_sms_authentication == o.should_offer_signer_sms_authentication && + should_remove_document_id == o.should_remove_document_id && + is_notify_on_sign_enabled == o.is_notify_on_sign_enabled && + is_notify_on_view_enabled == o.is_notify_on_view_enabled && + should_autocomplete == o.should_autocomplete && + should_include_requested_pdfs == o.should_include_requested_pdfs && + should_include_requested_pdfs_for_others == o.should_include_requested_pdfs_for_others && + should_include_sent_doc_pdfs == o.should_include_sent_doc_pdfs && + should_include_sent_doc_pdfs_for_others == o.should_include_sent_doc_pdfs_for_others && + should_send_daily_summary == o.should_send_daily_summary && + should_send_embedded_signature_conf_emails == o.should_send_embedded_signature_conf_emails && + should_send_ordered_sr_email == o.should_send_ordered_sr_email && + should_send_outbound_conf_emails == o.should_send_outbound_conf_emails && + template_link_signature_emails_enabled == o.template_link_signature_emails_enabled + 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 + [company, custom_signing_redirect_enabled, custom_signing_redirect_url, custom_tagline, date_format, is_signature_reminders_enabled, request_email_from, request_email_signature, required_signature_types, should_enable_tamper_proof, should_include_distinct_pdfs, should_offer_signer_access_code, should_offer_signer_sms_authentication, should_remove_document_id, is_notify_on_sign_enabled, is_notify_on_view_enabled, should_autocomplete, should_include_requested_pdfs, should_include_requested_pdfs_for_others, should_include_sent_doc_pdfs, should_include_sent_doc_pdfs_for_others, should_send_daily_summary, should_send_embedded_signature_conf_emails, should_send_ordered_sr_email, should_send_outbound_conf_emails, template_link_signature_emails_enabled].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/account_settings_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_settings_update_request.rb new file mode 100644 index 000000000..c3142fe86 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/account_settings_update_request.rb @@ -0,0 +1,569 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class AccountSettingsUpdateRequest + # Company name associated with this account or team. + # @return [String] + attr_accessor :company + + # Whether signers are redirected to a custom URL after completing a signature request. + # @return [Boolean] + attr_accessor :custom_signing_redirect_enabled + + # URL where signers are redirected after completing a signature request when custom redirects are enabled. + # @return [String] + attr_accessor :custom_signing_redirect_url + + # Custom tagline displayed with the account or team branding. + # @return [String] + attr_accessor :custom_tagline + + # @return [DateFormat] + attr_accessor :date_format + + # Whether automatic reminder emails are enabled for incomplete signature requests. + # @return [Boolean] + attr_accessor :is_signature_reminders_enabled + + # Sender name shown on signature request emails. + # @return [String] + attr_accessor :request_email_from + + # Signature appended to signature request emails. + # @return [String] + attr_accessor :request_email_signature + + # Signature creation methods signers may use. + # @return [Array] + attr_accessor :required_signature_types + + # Whether completed documents include a digital tamper-proof seal. + # @return [Boolean] + attr_accessor :should_enable_tamper_proof + + # Whether completed documents remain as separate PDF files instead of being merged into one PDF. + # @return [Boolean] + attr_accessor :should_include_distinct_pdfs + + # Whether senders can require an access code to verify a signer. + # @return [Boolean] + attr_accessor :should_offer_signer_access_code + + # Whether senders can require SMS authentication to verify a signer. + # @return [Boolean] + attr_accessor :should_offer_signer_sms_authentication + + # Whether the Dropbox Sign document ID is hidden on sent documents. + # @return [Boolean] + attr_accessor :should_remove_document_id + + # Whether to notify the account when someone signs a document it sent. + # @return [Boolean] + attr_accessor :is_notify_on_sign_enabled + + # Whether to notify the account when someone opens a document it sent. + # @return [Boolean] + attr_accessor :is_notify_on_view_enabled + + # Whether values entered in text fields are saved and suggested for future signature requests. + # @return [Boolean] + attr_accessor :should_autocomplete + + # Whether completed signature requests include PDF copies in emails sent to the account. + # @return [Boolean] + attr_accessor :should_include_requested_pdfs + + # Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. + # @return [Boolean] + attr_accessor :should_include_requested_pdfs_for_others + + # Whether emails sent to the account include PDF copies of documents it sends. + # @return [Boolean] + attr_accessor :should_include_sent_doc_pdfs + + # Whether emails sent to recipients include PDF copies of documents the account sends. + # @return [Boolean] + attr_accessor :should_include_sent_doc_pdfs_for_others + + # Whether to send the account a daily email summarizing outstanding signature requests. + # @return [Boolean] + attr_accessor :should_send_daily_summary + + # Whether to notify the account when it signs a document on a third-party site. + # @return [Boolean] + attr_accessor :should_send_embedded_signature_conf_emails + + # Whether to notify all parties when an ordered signature request starts. + # @return [Boolean] + attr_accessor :should_send_ordered_sr_email + + # Whether to notify the account when it signs and sends a document. + # @return [Boolean] + attr_accessor :should_send_outbound_conf_emails + + # Whether to notify the account when someone signs a document sent by its team through a template link. + # @return [Boolean] + attr_accessor :template_link_signature_emails_enabled + + # Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + # @return [Array] + attr_accessor :unset + + 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 + { + :'company' => :'company', + :'custom_signing_redirect_enabled' => :'custom_signing_redirect_enabled', + :'custom_signing_redirect_url' => :'custom_signing_redirect_url', + :'custom_tagline' => :'custom_tagline', + :'date_format' => :'date_format', + :'is_signature_reminders_enabled' => :'is_signature_reminders_enabled', + :'request_email_from' => :'request_email_from', + :'request_email_signature' => :'request_email_signature', + :'required_signature_types' => :'required_signature_types', + :'should_enable_tamper_proof' => :'should_enable_tamper_proof', + :'should_include_distinct_pdfs' => :'should_include_distinct_pdfs', + :'should_offer_signer_access_code' => :'should_offer_signer_access_code', + :'should_offer_signer_sms_authentication' => :'should_offer_signer_sms_authentication', + :'should_remove_document_id' => :'should_remove_document_id', + :'is_notify_on_sign_enabled' => :'is_notify_on_sign_enabled', + :'is_notify_on_view_enabled' => :'is_notify_on_view_enabled', + :'should_autocomplete' => :'should_autocomplete', + :'should_include_requested_pdfs' => :'should_include_requested_pdfs', + :'should_include_requested_pdfs_for_others' => :'should_include_requested_pdfs_for_others', + :'should_include_sent_doc_pdfs' => :'should_include_sent_doc_pdfs', + :'should_include_sent_doc_pdfs_for_others' => :'should_include_sent_doc_pdfs_for_others', + :'should_send_daily_summary' => :'should_send_daily_summary', + :'should_send_embedded_signature_conf_emails' => :'should_send_embedded_signature_conf_emails', + :'should_send_ordered_sr_email' => :'should_send_ordered_sr_email', + :'should_send_outbound_conf_emails' => :'should_send_outbound_conf_emails', + :'template_link_signature_emails_enabled' => :'template_link_signature_emails_enabled', + :'unset' => :'unset' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'company' => :'String', + :'custom_signing_redirect_enabled' => :'Boolean', + :'custom_signing_redirect_url' => :'String', + :'custom_tagline' => :'String', + :'date_format' => :'DateFormat', + :'is_signature_reminders_enabled' => :'Boolean', + :'request_email_from' => :'String', + :'request_email_signature' => :'String', + :'required_signature_types' => :'Array', + :'should_enable_tamper_proof' => :'Boolean', + :'should_include_distinct_pdfs' => :'Boolean', + :'should_offer_signer_access_code' => :'Boolean', + :'should_offer_signer_sms_authentication' => :'Boolean', + :'should_remove_document_id' => :'Boolean', + :'is_notify_on_sign_enabled' => :'Boolean', + :'is_notify_on_view_enabled' => :'Boolean', + :'should_autocomplete' => :'Boolean', + :'should_include_requested_pdfs' => :'Boolean', + :'should_include_requested_pdfs_for_others' => :'Boolean', + :'should_include_sent_doc_pdfs' => :'Boolean', + :'should_include_sent_doc_pdfs_for_others' => :'Boolean', + :'should_send_daily_summary' => :'Boolean', + :'should_send_embedded_signature_conf_emails' => :'Boolean', + :'should_send_ordered_sr_email' => :'Boolean', + :'should_send_outbound_conf_emails' => :'Boolean', + :'template_link_signature_emails_enabled' => :'Boolean', + :'unset' => :'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 [AccountSettingsUpdateRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "AccountSettingsUpdateRequest" + ) || AccountSettingsUpdateRequest.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::AccountSettingsUpdateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountSettingsUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'custom_signing_redirect_enabled') + self.custom_signing_redirect_enabled = attributes[:'custom_signing_redirect_enabled'] + end + + if attributes.key?(:'custom_signing_redirect_url') + self.custom_signing_redirect_url = attributes[:'custom_signing_redirect_url'] + end + + if attributes.key?(:'custom_tagline') + self.custom_tagline = attributes[:'custom_tagline'] + end + + if attributes.key?(:'date_format') + self.date_format = attributes[:'date_format'] + end + + if attributes.key?(:'is_signature_reminders_enabled') + self.is_signature_reminders_enabled = attributes[:'is_signature_reminders_enabled'] + end + + if attributes.key?(:'request_email_from') + self.request_email_from = attributes[:'request_email_from'] + end + + if attributes.key?(:'request_email_signature') + self.request_email_signature = attributes[:'request_email_signature'] + end + + if attributes.key?(:'required_signature_types') + if (value = attributes[:'required_signature_types']).is_a?(Array) + self.required_signature_types = value + end + end + + if attributes.key?(:'should_enable_tamper_proof') + self.should_enable_tamper_proof = attributes[:'should_enable_tamper_proof'] + end + + if attributes.key?(:'should_include_distinct_pdfs') + self.should_include_distinct_pdfs = attributes[:'should_include_distinct_pdfs'] + end + + if attributes.key?(:'should_offer_signer_access_code') + self.should_offer_signer_access_code = attributes[:'should_offer_signer_access_code'] + end + + if attributes.key?(:'should_offer_signer_sms_authentication') + self.should_offer_signer_sms_authentication = attributes[:'should_offer_signer_sms_authentication'] + end + + if attributes.key?(:'should_remove_document_id') + self.should_remove_document_id = attributes[:'should_remove_document_id'] + end + + if attributes.key?(:'is_notify_on_sign_enabled') + self.is_notify_on_sign_enabled = attributes[:'is_notify_on_sign_enabled'] + end + + if attributes.key?(:'is_notify_on_view_enabled') + self.is_notify_on_view_enabled = attributes[:'is_notify_on_view_enabled'] + end + + if attributes.key?(:'should_autocomplete') + self.should_autocomplete = attributes[:'should_autocomplete'] + end + + if attributes.key?(:'should_include_requested_pdfs') + self.should_include_requested_pdfs = attributes[:'should_include_requested_pdfs'] + end + + if attributes.key?(:'should_include_requested_pdfs_for_others') + self.should_include_requested_pdfs_for_others = attributes[:'should_include_requested_pdfs_for_others'] + end + + if attributes.key?(:'should_include_sent_doc_pdfs') + self.should_include_sent_doc_pdfs = attributes[:'should_include_sent_doc_pdfs'] + end + + if attributes.key?(:'should_include_sent_doc_pdfs_for_others') + self.should_include_sent_doc_pdfs_for_others = attributes[:'should_include_sent_doc_pdfs_for_others'] + end + + if attributes.key?(:'should_send_daily_summary') + self.should_send_daily_summary = attributes[:'should_send_daily_summary'] + end + + if attributes.key?(:'should_send_embedded_signature_conf_emails') + self.should_send_embedded_signature_conf_emails = attributes[:'should_send_embedded_signature_conf_emails'] + end + + if attributes.key?(:'should_send_ordered_sr_email') + self.should_send_ordered_sr_email = attributes[:'should_send_ordered_sr_email'] + end + + if attributes.key?(:'should_send_outbound_conf_emails') + self.should_send_outbound_conf_emails = attributes[:'should_send_outbound_conf_emails'] + end + + if attributes.key?(:'template_link_signature_emails_enabled') + self.template_link_signature_emails_enabled = attributes[:'template_link_signature_emails_enabled'] + end + + if attributes.key?(:'unset') + if (value = attributes[:'unset']).is_a?(Array) + self.unset = 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 + 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? + true + end + + # Custom attribute writer method with validation + # @param [Object] required_signature_types Value to be assigned + def required_signature_types=(required_signature_types) + @required_signature_types = required_signature_types + 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 && + company == o.company && + custom_signing_redirect_enabled == o.custom_signing_redirect_enabled && + custom_signing_redirect_url == o.custom_signing_redirect_url && + custom_tagline == o.custom_tagline && + date_format == o.date_format && + is_signature_reminders_enabled == o.is_signature_reminders_enabled && + request_email_from == o.request_email_from && + request_email_signature == o.request_email_signature && + required_signature_types == o.required_signature_types && + should_enable_tamper_proof == o.should_enable_tamper_proof && + should_include_distinct_pdfs == o.should_include_distinct_pdfs && + should_offer_signer_access_code == o.should_offer_signer_access_code && + should_offer_signer_sms_authentication == o.should_offer_signer_sms_authentication && + should_remove_document_id == o.should_remove_document_id && + is_notify_on_sign_enabled == o.is_notify_on_sign_enabled && + is_notify_on_view_enabled == o.is_notify_on_view_enabled && + should_autocomplete == o.should_autocomplete && + should_include_requested_pdfs == o.should_include_requested_pdfs && + should_include_requested_pdfs_for_others == o.should_include_requested_pdfs_for_others && + should_include_sent_doc_pdfs == o.should_include_sent_doc_pdfs && + should_include_sent_doc_pdfs_for_others == o.should_include_sent_doc_pdfs_for_others && + should_send_daily_summary == o.should_send_daily_summary && + should_send_embedded_signature_conf_emails == o.should_send_embedded_signature_conf_emails && + should_send_ordered_sr_email == o.should_send_ordered_sr_email && + should_send_outbound_conf_emails == o.should_send_outbound_conf_emails && + template_link_signature_emails_enabled == o.template_link_signature_emails_enabled && + unset == o.unset + 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 + [company, custom_signing_redirect_enabled, custom_signing_redirect_url, custom_tagline, date_format, is_signature_reminders_enabled, request_email_from, request_email_signature, required_signature_types, should_enable_tamper_proof, should_include_distinct_pdfs, should_offer_signer_access_code, should_offer_signer_sms_authentication, should_remove_document_id, is_notify_on_sign_enabled, is_notify_on_view_enabled, should_autocomplete, should_include_requested_pdfs, should_include_requested_pdfs_for_others, should_include_sent_doc_pdfs, should_include_sent_doc_pdfs_for_others, should_send_daily_summary, should_send_embedded_signature_conf_emails, should_send_ordered_sr_email, should_send_outbound_conf_emails, template_link_signature_emails_enabled, unset].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/boolean_setting_update.rb b/sdks/ruby/lib/dropbox-sign/models/boolean_setting_update.rb new file mode 100644 index 000000000..225a635a9 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/boolean_setting_update.rb @@ -0,0 +1,285 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Updates a boolean team setting. Provide `value`, `lock_mode`, or both. + class BooleanSettingUpdate + # Boolean value to store. + # @return [Boolean] + attr_accessor :value + + # @return [TeamSettingLock] + attr_accessor :lock_mode + + 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 + { + :'value' => :'value', + :'lock_mode' => :'lock_mode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Boolean', + :'lock_mode' => :'TeamSettingLock' + } + 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 [BooleanSettingUpdate] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "BooleanSettingUpdate" + ) || BooleanSettingUpdate.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::BooleanSettingUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BooleanSettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'lock_mode') + self.lock_mode = attributes[:'lock_mode'] + 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 + 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? + 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 && + value == o.value && + lock_mode == o.lock_mode + 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 + [value, lock_mode].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/data_residency.rb b/sdks/ruby/lib/dropbox-sign/models/data_residency.rb new file mode 100644 index 000000000..3d07a45b8 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/data_residency.rb @@ -0,0 +1,47 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class DataResidency + US = "us".freeze + EU = "eu".freeze + AU = "au".freeze + JP = "jp".freeze + UK = "uk".freeze + CA = "ca".freeze + + def self.all_vars + @all_vars ||= [US, EU, AU, JP, UK, CA].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if DataResidency.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DataResidency" + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/data_residency_setting_update.rb b/sdks/ruby/lib/dropbox-sign/models/data_residency_setting_update.rb new file mode 100644 index 000000000..b99310dde --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/data_residency_setting_update.rb @@ -0,0 +1,284 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Updates the data residency team setting. Provide `value`, `lock_mode`, or both. + class DataResidencySettingUpdate + # @return [DataResidency] + attr_accessor :value + + # @return [TeamSettingLock] + attr_accessor :lock_mode + + 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 + { + :'value' => :'value', + :'lock_mode' => :'lock_mode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'DataResidency', + :'lock_mode' => :'TeamSettingLock' + } + 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 [DataResidencySettingUpdate] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "DataResidencySettingUpdate" + ) || DataResidencySettingUpdate.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::DataResidencySettingUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::DataResidencySettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'lock_mode') + self.lock_mode = attributes[:'lock_mode'] + 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 + 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? + 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 && + value == o.value && + lock_mode == o.lock_mode + 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 + [value, lock_mode].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/date_format.rb b/sdks/ruby/lib/dropbox-sign/models/date_format.rb new file mode 100644 index 000000000..9505cad14 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/date_format.rb @@ -0,0 +1,44 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class DateFormat + MM_DD_YYYY = "MM/DD/YYYY".freeze + DD_MM_YYYY = "DD/MM/YYYY".freeze + YYYY_MM_DD = "YYYY/MM/DD".freeze + + def self.all_vars + @all_vars ||= [MM_DD_YYYY, DD_MM_YYYY, YYYY_MM_DD].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if DateFormat.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DateFormat" + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/date_format_setting_update.rb b/sdks/ruby/lib/dropbox-sign/models/date_format_setting_update.rb new file mode 100644 index 000000000..165a0074a --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/date_format_setting_update.rb @@ -0,0 +1,284 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Updates a date format team setting. Provide `value`, `lock_mode`, or both. + class DateFormatSettingUpdate + # @return [DateFormat] + attr_accessor :value + + # @return [TeamSettingLock] + attr_accessor :lock_mode + + 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 + { + :'value' => :'value', + :'lock_mode' => :'lock_mode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'DateFormat', + :'lock_mode' => :'TeamSettingLock' + } + 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 [DateFormatSettingUpdate] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "DateFormatSettingUpdate" + ) || DateFormatSettingUpdate.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::DateFormatSettingUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::DateFormatSettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'lock_mode') + self.lock_mode = attributes[:'lock_mode'] + 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 + 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? + 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 && + value == o.value && + lock_mode == o.lock_mode + 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 + [value, lock_mode].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/required_signature_type.rb b/sdks/ruby/lib/dropbox-sign/models/required_signature_type.rb new file mode 100644 index 000000000..7923694c2 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/required_signature_type.rb @@ -0,0 +1,45 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class RequiredSignatureType + DRAW = "draw".freeze + PHONE = "phone".freeze + TYPE = "type".freeze + UPLOAD = "upload".freeze + + def self.all_vars + @all_vars ||= [DRAW, PHONE, TYPE, UPLOAD].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if RequiredSignatureType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #RequiredSignatureType" + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/required_signature_types_setting_update.rb b/sdks/ruby/lib/dropbox-sign/models/required_signature_types_setting_update.rb new file mode 100644 index 000000000..f5d978403 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/required_signature_types_setting_update.rb @@ -0,0 +1,293 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. + class RequiredSignatureTypesSettingUpdate + # Signature creation methods signers may use. + # @return [Array] + attr_accessor :value + + # @return [TeamSettingLock] + attr_accessor :lock_mode + + 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 + { + :'value' => :'value', + :'lock_mode' => :'lock_mode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Array', + :'lock_mode' => :'TeamSettingLock' + } + 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 [RequiredSignatureTypesSettingUpdate] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "RequiredSignatureTypesSettingUpdate" + ) || RequiredSignatureTypesSettingUpdate.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::RequiredSignatureTypesSettingUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::RequiredSignatureTypesSettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = value + end + end + + if attributes.key?(:'lock_mode') + self.lock_mode = attributes[:'lock_mode'] + 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 + 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? + true + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + @value = value + 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 && + value == o.value && + lock_mode == o.lock_mode + 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 + [value, lock_mode].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/setting_lock_response.rb b/sdks/ruby/lib/dropbox-sign/models/setting_lock_response.rb new file mode 100644 index 000000000..2d0fd3976 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/setting_lock_response.rb @@ -0,0 +1,315 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SettingLockResponse + # @return [TeamSettingLock] + attr_accessor :mode + + # @return [String] + attr_accessor :source + + 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 + { + :'mode' => :'mode', + :'source' => :'source' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'mode' => :'TeamSettingLock', + :'source' => :'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 [SettingLockResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SettingLockResponse" + ) || SettingLockResponse.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::SettingLockResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SettingLockResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + 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 @mode.nil? + invalid_properties.push('invalid value for "mode", mode cannot be nil.') + end + + if @source.nil? + invalid_properties.push('invalid value for "source", source 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 @mode.nil? + return false if @source.nil? + source_validator = EnumAttributeValidator.new('String', ["team", "parent_team", "default"]) + return false unless source_validator.valid?(@source) + true + end + + # Custom attribute writer method with validation + # @param [Object] mode Value to be assigned + def mode=(mode) + if mode.nil? + fail ArgumentError, 'mode cannot be nil' + end + + @mode = mode + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] source Object to be assigned + def source=(source) + validator = EnumAttributeValidator.new('String', ["team", "parent_team", "default"]) + unless validator.valid?(source) + fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." + end + @source = source + 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 && + mode == o.mode && + source == o.source + 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 + [mode, source].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/setting_response.rb b/sdks/ruby/lib/dropbox-sign/models/setting_response.rb new file mode 100644 index 000000000..cf93021d3 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/setting_response.rb @@ -0,0 +1,404 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SettingResponse + # Current value of the setting. Null when the setting has no value. + # @return [Object, nil] + attr_accessor :value + + # @return [Boolean] + attr_accessor :is_inherited + + # @return [String] + attr_accessor :source + + # @return [String] + attr_accessor :type + + # @return [Boolean] + attr_accessor :writable + + # @return [SettingLockResponse] + attr_accessor :lock + + 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 + { + :'value' => :'value', + :'is_inherited' => :'is_inherited', + :'source' => :'source', + :'type' => :'type', + :'writable' => :'writable', + :'lock' => :'lock' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'Object', + :'is_inherited' => :'Boolean', + :'source' => :'String', + :'type' => :'String', + :'writable' => :'Boolean', + :'lock' => :'SettingLockResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'value', + ]) + 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 [SettingResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SettingResponse" + ) || SettingResponse.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::SettingResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SettingResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'is_inherited') + self.is_inherited = attributes[:'is_inherited'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'writable') + self.writable = attributes[:'writable'] + end + + if attributes.key?(:'lock') + self.lock = attributes[:'lock'] + 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 @is_inherited.nil? + invalid_properties.push('invalid value for "is_inherited", is_inherited cannot be nil.') + end + + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @writable.nil? + invalid_properties.push('invalid value for "writable", writable cannot be nil.') + end + + if @lock.nil? + invalid_properties.push('invalid value for "lock", lock 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 @is_inherited.nil? + return false if @source.nil? + source_validator = EnumAttributeValidator.new('String', ["account", "team", "parent_team", "default"]) + return false unless source_validator.valid?(@source) + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["boolean", "integer", "string", "array"]) + return false unless type_validator.valid?(@type) + return false if @writable.nil? + return false if @lock.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] is_inherited Value to be assigned + def is_inherited=(is_inherited) + if is_inherited.nil? + fail ArgumentError, 'is_inherited cannot be nil' + end + + @is_inherited = is_inherited + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] source Object to be assigned + def source=(source) + validator = EnumAttributeValidator.new('String', ["account", "team", "parent_team", "default"]) + unless validator.valid?(source) + fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." + end + @source = source + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["boolean", "integer", "string", "array"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] writable Value to be assigned + def writable=(writable) + if writable.nil? + fail ArgumentError, 'writable cannot be nil' + end + + @writable = writable + end + + # Custom attribute writer method with validation + # @param [Object] lock Value to be assigned + def lock=(lock) + if lock.nil? + fail ArgumentError, 'lock cannot be nil' + end + + @lock = lock + 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 && + value == o.value && + is_inherited == o.is_inherited && + source == o.source && + type == o.type && + writable == o.writable && + lock == o.lock + 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 + [value, is_inherited, source, type, writable, lock].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb index d3f3e4b76..ea6c75e1d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb @@ -50,7 +50,7 @@ class SignatureRequestBulkCreateEmbeddedWithTemplateRequest # @return [String] attr_accessor :message - # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # _t__SignatureRequestBulkCreateEmbeddedWithTemplate::METADATA # @return [Hash] attr_accessor :metadata @@ -259,6 +259,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') end + if !@metadata.nil? && @metadata.length > 10 + invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 10.') + end + if !@subject.nil? && @subject.to_s.length > 255 invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') end @@ -276,6 +280,7 @@ def valid? return false if @template_ids.nil? return false if @client_id.nil? return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@metadata.nil? && @metadata.length > 10 return false if !@subject.nil? && @subject.to_s.length > 255 return false if !@title.nil? && @title.to_s.length > 255 true @@ -314,6 +319,10 @@ def message=(message) # Custom attribute writer method with validation # @param [Object] metadata Value to be assigned def metadata=(metadata) + if metadata.length > 10 + fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 10.' + end + @metadata = metadata end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb index b4d9c432e..88d09d058 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb @@ -50,7 +50,7 @@ class SignatureRequestBulkSendWithTemplateRequest # @return [String] attr_accessor :message - # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # _t__SignatureRequestBulkSendWithTemplate::METADATA # @return [Hash] attr_accessor :metadata @@ -255,6 +255,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') end + if !@metadata.nil? && @metadata.length > 10 + invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 10.') + end + if !@subject.nil? && @subject.to_s.length > 255 invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') end @@ -271,6 +275,7 @@ def list_invalid_properties def valid? return false if @template_ids.nil? return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@metadata.nil? && @metadata.length > 10 return false if !@subject.nil? && @subject.to_s.length > 255 return false if !@title.nil? && @title.to_s.length > 255 true @@ -299,6 +304,10 @@ def message=(message) # Custom attribute writer method with validation # @param [Object] metadata Value to be assigned def metadata=(metadata) + if metadata.length > 10 + fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 10.' + end + @metadata = metadata end diff --git a/sdks/ruby/lib/dropbox-sign/models/string_setting_update.rb b/sdks/ruby/lib/dropbox-sign/models/string_setting_update.rb new file mode 100644 index 000000000..0065a3dae --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/string_setting_update.rb @@ -0,0 +1,285 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Updates a string team setting. Provide `value`, `lock_mode`, or both. + class StringSettingUpdate + # String value to store. + # @return [String] + attr_accessor :value + + # @return [TeamSettingLock] + attr_accessor :lock_mode + + 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 + { + :'value' => :'value', + :'lock_mode' => :'lock_mode' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'String', + :'lock_mode' => :'TeamSettingLock' + } + 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 [StringSettingUpdate] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "StringSettingUpdate" + ) || StringSettingUpdate.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::StringSettingUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::StringSettingUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'lock_mode') + self.lock_mode = attributes[:'lock_mode'] + 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 + 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? + 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 && + value == o.value && + lock_mode == o.lock_mode + 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 + [value, lock_mode].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/sub_bulk_signer_list.rb b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb index 80085f38d..3d0342907 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb @@ -26,11 +26,16 @@ class SubBulkSignerList # @return [Array] attr_accessor :signers + # _t__Sub::BulkSigner::METADATA + # @return [Hash] + attr_accessor :metadata + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'custom_fields' => :'custom_fields', - :'signers' => :'signers' + :'signers' => :'signers', + :'metadata' => :'metadata' } end @@ -48,7 +53,8 @@ def self.acceptable_attributes def self.openapi_types { :'custom_fields' => :'Array', - :'signers' => :'Array' + :'signers' => :'Array', + :'metadata' => :'Hash' } end @@ -110,28 +116,50 @@ def initialize(attributes = {}) self.signers = value end end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = 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 !@metadata.nil? && @metadata.length > 10 + invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 10.') + 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 !@metadata.nil? && @metadata.length > 10 true end + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + if metadata.length > 10 + fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 10.' + end + + @metadata = metadata + 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 && custom_fields == o.custom_fields && - signers == o.signers + signers == o.signers && + metadata == o.metadata end # @see the `==` method @@ -143,7 +171,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [custom_fields, signers].hash + [custom_fields, signers, metadata].hash end # Builds the object from hash diff --git a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb index 3c1e69f5b..8fbe1a8f8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb @@ -22,10 +22,15 @@ class TeamCreateRequest # @return [String] attr_accessor :name + # _t__TeamCreate::PARENT_TEAM_ID + # @return [String] + attr_accessor :parent_team_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'name' => :'name' + :'name' => :'name', + :'parent_team_id' => :'parent_team_id' } end @@ -42,7 +47,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'name' => :'String' + :'name' => :'String', + :'parent_team_id' => :'String' } end @@ -98,6 +104,10 @@ def initialize(attributes = {}) else self.name = 'Untitled Team' end + + if attributes.key?(:'parent_team_id') + self.parent_team_id = attributes[:'parent_team_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -118,7 +128,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - name == o.name + name == o.name && + parent_team_id == o.parent_team_id end # @see the `==` method @@ -130,7 +141,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name].hash + [name, parent_team_id].hash end # Builds the object from hash diff --git a/sdks/ruby/lib/dropbox-sign/models/team_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_response.rb index c239735dd..ac9b19d3c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_response.rb @@ -19,6 +19,14 @@ module Dropbox module Dropbox::Sign # Contains information about your team and its members class TeamResponse + # The id of a team + # @return [String] + attr_accessor :team_id + + # _t__Team::PARENT_TEAM_ID + # @return [String] + attr_accessor :parent_team_id + # The name of your Team # @return [String] attr_accessor :name @@ -37,6 +45,8 @@ class TeamResponse # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'team_id' => :'team_id', + :'parent_team_id' => :'parent_team_id', :'name' => :'name', :'accounts' => :'accounts', :'invited_accounts' => :'invited_accounts', @@ -57,6 +67,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'team_id' => :'String', + :'parent_team_id' => :'String', :'name' => :'String', :'accounts' => :'Array', :'invited_accounts' => :'Array', @@ -111,6 +123,14 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'parent_team_id') + self.parent_team_id = attributes[:'parent_team_id'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -152,6 +172,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + team_id == o.team_id && + parent_team_id == o.parent_team_id && name == o.name && accounts == o.accounts && invited_accounts == o.invited_accounts && @@ -167,7 +189,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, accounts, invited_accounts, invited_emails].hash + [team_id, parent_team_id, name, accounts, invited_accounts, invited_emails].hash end # Builds the object from hash diff --git a/sdks/ruby/lib/dropbox-sign/models/team_setting_lock.rb b/sdks/ruby/lib/dropbox-sign/models/team_setting_lock.rb new file mode 100644 index 000000000..4c7759170 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/team_setting_lock.rb @@ -0,0 +1,44 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class TeamSettingLock + ORGANIZATION_ADMINS = "organization_admins".freeze + TEAM_ADMINS = "team_admins".freeze + MEMBERS = "members".freeze + + def self.all_vars + @all_vars ||= [ORGANIZATION_ADMINS, TEAM_ADMINS, MEMBERS].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if TeamSettingLock.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #TeamSettingLock" + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/team_settings_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_settings_response.rb new file mode 100644 index 000000000..7d3b4e250 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/team_settings_response.rb @@ -0,0 +1,304 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class TeamSettingsResponse + # @return [String] + attr_accessor :team_id + + # @return [TeamSettingsResponseSettings] + attr_accessor :settings + + # A list of warnings. + # @return [Array] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'team_id' => :'team_id', + :'settings' => :'settings', + :'warnings' => :'warnings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'team_id' => :'String', + :'settings' => :'TeamSettingsResponseSettings', + :'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 [TeamSettingsResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "TeamSettingsResponse" + ) || TeamSettingsResponse.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::TeamSettingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamSettingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + 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 @team_id.nil? + invalid_properties.push('invalid value for "team_id", team_id cannot be nil.') + end + + if @settings.nil? + invalid_properties.push('invalid value for "settings", settings 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 @team_id.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] team_id Value to be assigned + def team_id=(team_id) + if team_id.nil? + fail ArgumentError, 'team_id cannot be nil' + end + + @team_id = team_id + end + + # Custom attribute writer method with validation + # @param [Object] settings Value to be assigned + def settings=(settings) + if settings.nil? + fail ArgumentError, 'settings cannot be nil' + end + + @settings = settings + 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 && + team_id == o.team_id && + settings == o.settings && + 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 + [team_id, settings, 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/team_settings_response_settings.rb b/sdks/ruby/lib/dropbox-sign/models/team_settings_response_settings.rb new file mode 100644 index 000000000..67461a82d --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/team_settings_response_settings.rb @@ -0,0 +1,891 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class TeamSettingsResponseSettings + # Company name associated with this account or team. + # @return [SettingResponse] + attr_accessor :company + + # Whether signers are redirected to a custom URL after completing a signature request. + # @return [SettingResponse] + attr_accessor :custom_signing_redirect_enabled + + # URL where signers are redirected after completing a signature request when custom redirects are enabled. + # @return [SettingResponse] + attr_accessor :custom_signing_redirect_url + + # Custom tagline displayed with the account or team branding. + # @return [SettingResponse] + attr_accessor :custom_tagline + + # Date format used to display dates. List the setting in `unset` to inherit the default. + # @return [SettingResponse] + attr_accessor :date_format + + # Whether automatic reminder emails are enabled for incomplete signature requests. + # @return [SettingResponse] + attr_accessor :is_signature_reminders_enabled + + # Sender name shown on signature request emails. + # @return [SettingResponse] + attr_accessor :request_email_from + + # Signature appended to signature request emails. + # @return [SettingResponse] + attr_accessor :request_email_signature + + # Signature creation methods signers may use. + # @return [SettingResponse] + attr_accessor :required_signature_types + + # Whether completed documents include a digital tamper-proof seal. + # @return [SettingResponse] + attr_accessor :should_enable_tamper_proof + + # Whether completed documents remain as separate PDF files instead of being merged into one PDF. + # @return [SettingResponse] + attr_accessor :should_include_distinct_pdfs + + # Whether senders can require an access code to verify a signer. + # @return [SettingResponse] + attr_accessor :should_offer_signer_access_code + + # Whether senders can require SMS authentication to verify a signer. + # @return [SettingResponse] + attr_accessor :should_offer_signer_sms_authentication + + # Whether the Dropbox Sign document ID is hidden on sent documents. + # @return [SettingResponse] + attr_accessor :should_remove_document_id + + # Storage region for team documents. + # @return [SettingResponse] + attr_accessor :data_residency + + # Whether team members can delete a document for all participants. + # @return [SettingResponse] + attr_accessor :allow_team_delete_document_for_everyone + + # Whether team members can download CSV files. + # @return [SettingResponse] + attr_accessor :allow_team_download_csv + + # Whether team members are prevented from creating templates. + # @return [SettingResponse] + attr_accessor :lock_team_template_creation + + # Whether team members are prevented from using the template gallery. + # @return [SettingResponse] + attr_accessor :lock_team_template_gallery + + # Default message enforced for team members when they create self-signed documents. + # @return [SettingResponse] + attr_accessor :self_sign_message + + # Default title enforced for team members when they create self-signed documents. + # @return [SettingResponse] + attr_accessor :self_sign_title + + # Default message enforced for team members when they create signature requests. + # @return [SettingResponse] + attr_accessor :signature_request_message + + # Default title enforced for team members when they create signature requests. + # @return [SettingResponse] + attr_accessor :signature_request_title + + # Whether authenticator-app multifactor authentication is enabled for the team. + # @return [SettingResponse] + attr_accessor :multifactor_auth_app + + # Whether SMS multifactor authentication is enabled for the team. + # @return [SettingResponse] + attr_accessor :multifactor_auth_sms + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'company' => :'company', + :'custom_signing_redirect_enabled' => :'custom_signing_redirect_enabled', + :'custom_signing_redirect_url' => :'custom_signing_redirect_url', + :'custom_tagline' => :'custom_tagline', + :'date_format' => :'date_format', + :'is_signature_reminders_enabled' => :'is_signature_reminders_enabled', + :'request_email_from' => :'request_email_from', + :'request_email_signature' => :'request_email_signature', + :'required_signature_types' => :'required_signature_types', + :'should_enable_tamper_proof' => :'should_enable_tamper_proof', + :'should_include_distinct_pdfs' => :'should_include_distinct_pdfs', + :'should_offer_signer_access_code' => :'should_offer_signer_access_code', + :'should_offer_signer_sms_authentication' => :'should_offer_signer_sms_authentication', + :'should_remove_document_id' => :'should_remove_document_id', + :'data_residency' => :'data_residency', + :'allow_team_delete_document_for_everyone' => :'allow_team_delete_document_for_everyone', + :'allow_team_download_csv' => :'allow_team_download_csv', + :'lock_team_template_creation' => :'lock_team_template_creation', + :'lock_team_template_gallery' => :'lock_team_template_gallery', + :'self_sign_message' => :'self_sign_message', + :'self_sign_title' => :'self_sign_title', + :'signature_request_message' => :'signature_request_message', + :'signature_request_title' => :'signature_request_title', + :'multifactor_auth_app' => :'multifactor_auth_app', + :'multifactor_auth_sms' => :'multifactor_auth_sms' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'company' => :'SettingResponse', + :'custom_signing_redirect_enabled' => :'SettingResponse', + :'custom_signing_redirect_url' => :'SettingResponse', + :'custom_tagline' => :'SettingResponse', + :'date_format' => :'SettingResponse', + :'is_signature_reminders_enabled' => :'SettingResponse', + :'request_email_from' => :'SettingResponse', + :'request_email_signature' => :'SettingResponse', + :'required_signature_types' => :'SettingResponse', + :'should_enable_tamper_proof' => :'SettingResponse', + :'should_include_distinct_pdfs' => :'SettingResponse', + :'should_offer_signer_access_code' => :'SettingResponse', + :'should_offer_signer_sms_authentication' => :'SettingResponse', + :'should_remove_document_id' => :'SettingResponse', + :'data_residency' => :'SettingResponse', + :'allow_team_delete_document_for_everyone' => :'SettingResponse', + :'allow_team_download_csv' => :'SettingResponse', + :'lock_team_template_creation' => :'SettingResponse', + :'lock_team_template_gallery' => :'SettingResponse', + :'self_sign_message' => :'SettingResponse', + :'self_sign_title' => :'SettingResponse', + :'signature_request_message' => :'SettingResponse', + :'signature_request_title' => :'SettingResponse', + :'multifactor_auth_app' => :'SettingResponse', + :'multifactor_auth_sms' => :'SettingResponse' + } + 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 [TeamSettingsResponseSettings] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "TeamSettingsResponseSettings" + ) || TeamSettingsResponseSettings.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::TeamSettingsResponseSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamSettingsResponseSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'custom_signing_redirect_enabled') + self.custom_signing_redirect_enabled = attributes[:'custom_signing_redirect_enabled'] + end + + if attributes.key?(:'custom_signing_redirect_url') + self.custom_signing_redirect_url = attributes[:'custom_signing_redirect_url'] + end + + if attributes.key?(:'custom_tagline') + self.custom_tagline = attributes[:'custom_tagline'] + end + + if attributes.key?(:'date_format') + self.date_format = attributes[:'date_format'] + end + + if attributes.key?(:'is_signature_reminders_enabled') + self.is_signature_reminders_enabled = attributes[:'is_signature_reminders_enabled'] + end + + if attributes.key?(:'request_email_from') + self.request_email_from = attributes[:'request_email_from'] + end + + if attributes.key?(:'request_email_signature') + self.request_email_signature = attributes[:'request_email_signature'] + end + + if attributes.key?(:'required_signature_types') + self.required_signature_types = attributes[:'required_signature_types'] + end + + if attributes.key?(:'should_enable_tamper_proof') + self.should_enable_tamper_proof = attributes[:'should_enable_tamper_proof'] + end + + if attributes.key?(:'should_include_distinct_pdfs') + self.should_include_distinct_pdfs = attributes[:'should_include_distinct_pdfs'] + end + + if attributes.key?(:'should_offer_signer_access_code') + self.should_offer_signer_access_code = attributes[:'should_offer_signer_access_code'] + end + + if attributes.key?(:'should_offer_signer_sms_authentication') + self.should_offer_signer_sms_authentication = attributes[:'should_offer_signer_sms_authentication'] + end + + if attributes.key?(:'should_remove_document_id') + self.should_remove_document_id = attributes[:'should_remove_document_id'] + end + + if attributes.key?(:'data_residency') + self.data_residency = attributes[:'data_residency'] + end + + if attributes.key?(:'allow_team_delete_document_for_everyone') + self.allow_team_delete_document_for_everyone = attributes[:'allow_team_delete_document_for_everyone'] + end + + if attributes.key?(:'allow_team_download_csv') + self.allow_team_download_csv = attributes[:'allow_team_download_csv'] + end + + if attributes.key?(:'lock_team_template_creation') + self.lock_team_template_creation = attributes[:'lock_team_template_creation'] + end + + if attributes.key?(:'lock_team_template_gallery') + self.lock_team_template_gallery = attributes[:'lock_team_template_gallery'] + end + + if attributes.key?(:'self_sign_message') + self.self_sign_message = attributes[:'self_sign_message'] + end + + if attributes.key?(:'self_sign_title') + self.self_sign_title = attributes[:'self_sign_title'] + end + + if attributes.key?(:'signature_request_message') + self.signature_request_message = attributes[:'signature_request_message'] + end + + if attributes.key?(:'signature_request_title') + self.signature_request_title = attributes[:'signature_request_title'] + end + + if attributes.key?(:'multifactor_auth_app') + self.multifactor_auth_app = attributes[:'multifactor_auth_app'] + end + + if attributes.key?(:'multifactor_auth_sms') + self.multifactor_auth_sms = attributes[:'multifactor_auth_sms'] + 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 @company.nil? + invalid_properties.push('invalid value for "company", company cannot be nil.') + end + + if @custom_signing_redirect_enabled.nil? + invalid_properties.push('invalid value for "custom_signing_redirect_enabled", custom_signing_redirect_enabled cannot be nil.') + end + + if @custom_signing_redirect_url.nil? + invalid_properties.push('invalid value for "custom_signing_redirect_url", custom_signing_redirect_url cannot be nil.') + end + + if @custom_tagline.nil? + invalid_properties.push('invalid value for "custom_tagline", custom_tagline cannot be nil.') + end + + if @date_format.nil? + invalid_properties.push('invalid value for "date_format", date_format cannot be nil.') + end + + if @is_signature_reminders_enabled.nil? + invalid_properties.push('invalid value for "is_signature_reminders_enabled", is_signature_reminders_enabled cannot be nil.') + end + + if @request_email_from.nil? + invalid_properties.push('invalid value for "request_email_from", request_email_from cannot be nil.') + end + + if @request_email_signature.nil? + invalid_properties.push('invalid value for "request_email_signature", request_email_signature cannot be nil.') + end + + if @required_signature_types.nil? + invalid_properties.push('invalid value for "required_signature_types", required_signature_types cannot be nil.') + end + + if @should_enable_tamper_proof.nil? + invalid_properties.push('invalid value for "should_enable_tamper_proof", should_enable_tamper_proof cannot be nil.') + end + + if @should_include_distinct_pdfs.nil? + invalid_properties.push('invalid value for "should_include_distinct_pdfs", should_include_distinct_pdfs cannot be nil.') + end + + if @should_offer_signer_access_code.nil? + invalid_properties.push('invalid value for "should_offer_signer_access_code", should_offer_signer_access_code cannot be nil.') + end + + if @should_offer_signer_sms_authentication.nil? + invalid_properties.push('invalid value for "should_offer_signer_sms_authentication", should_offer_signer_sms_authentication cannot be nil.') + end + + if @should_remove_document_id.nil? + invalid_properties.push('invalid value for "should_remove_document_id", should_remove_document_id cannot be nil.') + end + + if @data_residency.nil? + invalid_properties.push('invalid value for "data_residency", data_residency cannot be nil.') + end + + if @allow_team_delete_document_for_everyone.nil? + invalid_properties.push('invalid value for "allow_team_delete_document_for_everyone", allow_team_delete_document_for_everyone cannot be nil.') + end + + if @allow_team_download_csv.nil? + invalid_properties.push('invalid value for "allow_team_download_csv", allow_team_download_csv cannot be nil.') + end + + if @lock_team_template_creation.nil? + invalid_properties.push('invalid value for "lock_team_template_creation", lock_team_template_creation cannot be nil.') + end + + if @lock_team_template_gallery.nil? + invalid_properties.push('invalid value for "lock_team_template_gallery", lock_team_template_gallery cannot be nil.') + end + + if @self_sign_message.nil? + invalid_properties.push('invalid value for "self_sign_message", self_sign_message cannot be nil.') + end + + if @self_sign_title.nil? + invalid_properties.push('invalid value for "self_sign_title", self_sign_title cannot be nil.') + end + + if @signature_request_message.nil? + invalid_properties.push('invalid value for "signature_request_message", signature_request_message cannot be nil.') + end + + if @signature_request_title.nil? + invalid_properties.push('invalid value for "signature_request_title", signature_request_title cannot be nil.') + end + + if @multifactor_auth_app.nil? + invalid_properties.push('invalid value for "multifactor_auth_app", multifactor_auth_app cannot be nil.') + end + + if @multifactor_auth_sms.nil? + invalid_properties.push('invalid value for "multifactor_auth_sms", multifactor_auth_sms 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 @company.nil? + return false if @custom_signing_redirect_enabled.nil? + return false if @custom_signing_redirect_url.nil? + return false if @custom_tagline.nil? + return false if @date_format.nil? + return false if @is_signature_reminders_enabled.nil? + return false if @request_email_from.nil? + return false if @request_email_signature.nil? + return false if @required_signature_types.nil? + return false if @should_enable_tamper_proof.nil? + return false if @should_include_distinct_pdfs.nil? + return false if @should_offer_signer_access_code.nil? + return false if @should_offer_signer_sms_authentication.nil? + return false if @should_remove_document_id.nil? + return false if @data_residency.nil? + return false if @allow_team_delete_document_for_everyone.nil? + return false if @allow_team_download_csv.nil? + return false if @lock_team_template_creation.nil? + return false if @lock_team_template_gallery.nil? + return false if @self_sign_message.nil? + return false if @self_sign_title.nil? + return false if @signature_request_message.nil? + return false if @signature_request_title.nil? + return false if @multifactor_auth_app.nil? + return false if @multifactor_auth_sms.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] company Value to be assigned + def company=(company) + if company.nil? + fail ArgumentError, 'company cannot be nil' + end + + @company = company + end + + # Custom attribute writer method with validation + # @param [Object] custom_signing_redirect_enabled Value to be assigned + def custom_signing_redirect_enabled=(custom_signing_redirect_enabled) + if custom_signing_redirect_enabled.nil? + fail ArgumentError, 'custom_signing_redirect_enabled cannot be nil' + end + + @custom_signing_redirect_enabled = custom_signing_redirect_enabled + end + + # Custom attribute writer method with validation + # @param [Object] custom_signing_redirect_url Value to be assigned + def custom_signing_redirect_url=(custom_signing_redirect_url) + if custom_signing_redirect_url.nil? + fail ArgumentError, 'custom_signing_redirect_url cannot be nil' + end + + @custom_signing_redirect_url = custom_signing_redirect_url + end + + # Custom attribute writer method with validation + # @param [Object] custom_tagline Value to be assigned + def custom_tagline=(custom_tagline) + if custom_tagline.nil? + fail ArgumentError, 'custom_tagline cannot be nil' + end + + @custom_tagline = custom_tagline + end + + # Custom attribute writer method with validation + # @param [Object] date_format Value to be assigned + def date_format=(date_format) + if date_format.nil? + fail ArgumentError, 'date_format cannot be nil' + end + + @date_format = date_format + end + + # Custom attribute writer method with validation + # @param [Object] is_signature_reminders_enabled Value to be assigned + def is_signature_reminders_enabled=(is_signature_reminders_enabled) + if is_signature_reminders_enabled.nil? + fail ArgumentError, 'is_signature_reminders_enabled cannot be nil' + end + + @is_signature_reminders_enabled = is_signature_reminders_enabled + end + + # Custom attribute writer method with validation + # @param [Object] request_email_from Value to be assigned + def request_email_from=(request_email_from) + if request_email_from.nil? + fail ArgumentError, 'request_email_from cannot be nil' + end + + @request_email_from = request_email_from + end + + # Custom attribute writer method with validation + # @param [Object] request_email_signature Value to be assigned + def request_email_signature=(request_email_signature) + if request_email_signature.nil? + fail ArgumentError, 'request_email_signature cannot be nil' + end + + @request_email_signature = request_email_signature + end + + # Custom attribute writer method with validation + # @param [Object] required_signature_types Value to be assigned + def required_signature_types=(required_signature_types) + if required_signature_types.nil? + fail ArgumentError, 'required_signature_types cannot be nil' + end + + @required_signature_types = required_signature_types + end + + # Custom attribute writer method with validation + # @param [Object] should_enable_tamper_proof Value to be assigned + def should_enable_tamper_proof=(should_enable_tamper_proof) + if should_enable_tamper_proof.nil? + fail ArgumentError, 'should_enable_tamper_proof cannot be nil' + end + + @should_enable_tamper_proof = should_enable_tamper_proof + end + + # Custom attribute writer method with validation + # @param [Object] should_include_distinct_pdfs Value to be assigned + def should_include_distinct_pdfs=(should_include_distinct_pdfs) + if should_include_distinct_pdfs.nil? + fail ArgumentError, 'should_include_distinct_pdfs cannot be nil' + end + + @should_include_distinct_pdfs = should_include_distinct_pdfs + end + + # Custom attribute writer method with validation + # @param [Object] should_offer_signer_access_code Value to be assigned + def should_offer_signer_access_code=(should_offer_signer_access_code) + if should_offer_signer_access_code.nil? + fail ArgumentError, 'should_offer_signer_access_code cannot be nil' + end + + @should_offer_signer_access_code = should_offer_signer_access_code + end + + # Custom attribute writer method with validation + # @param [Object] should_offer_signer_sms_authentication Value to be assigned + def should_offer_signer_sms_authentication=(should_offer_signer_sms_authentication) + if should_offer_signer_sms_authentication.nil? + fail ArgumentError, 'should_offer_signer_sms_authentication cannot be nil' + end + + @should_offer_signer_sms_authentication = should_offer_signer_sms_authentication + end + + # Custom attribute writer method with validation + # @param [Object] should_remove_document_id Value to be assigned + def should_remove_document_id=(should_remove_document_id) + if should_remove_document_id.nil? + fail ArgumentError, 'should_remove_document_id cannot be nil' + end + + @should_remove_document_id = should_remove_document_id + end + + # Custom attribute writer method with validation + # @param [Object] data_residency Value to be assigned + def data_residency=(data_residency) + if data_residency.nil? + fail ArgumentError, 'data_residency cannot be nil' + end + + @data_residency = data_residency + end + + # Custom attribute writer method with validation + # @param [Object] allow_team_delete_document_for_everyone Value to be assigned + def allow_team_delete_document_for_everyone=(allow_team_delete_document_for_everyone) + if allow_team_delete_document_for_everyone.nil? + fail ArgumentError, 'allow_team_delete_document_for_everyone cannot be nil' + end + + @allow_team_delete_document_for_everyone = allow_team_delete_document_for_everyone + end + + # Custom attribute writer method with validation + # @param [Object] allow_team_download_csv Value to be assigned + def allow_team_download_csv=(allow_team_download_csv) + if allow_team_download_csv.nil? + fail ArgumentError, 'allow_team_download_csv cannot be nil' + end + + @allow_team_download_csv = allow_team_download_csv + end + + # Custom attribute writer method with validation + # @param [Object] lock_team_template_creation Value to be assigned + def lock_team_template_creation=(lock_team_template_creation) + if lock_team_template_creation.nil? + fail ArgumentError, 'lock_team_template_creation cannot be nil' + end + + @lock_team_template_creation = lock_team_template_creation + end + + # Custom attribute writer method with validation + # @param [Object] lock_team_template_gallery Value to be assigned + def lock_team_template_gallery=(lock_team_template_gallery) + if lock_team_template_gallery.nil? + fail ArgumentError, 'lock_team_template_gallery cannot be nil' + end + + @lock_team_template_gallery = lock_team_template_gallery + end + + # Custom attribute writer method with validation + # @param [Object] self_sign_message Value to be assigned + def self_sign_message=(self_sign_message) + if self_sign_message.nil? + fail ArgumentError, 'self_sign_message cannot be nil' + end + + @self_sign_message = self_sign_message + end + + # Custom attribute writer method with validation + # @param [Object] self_sign_title Value to be assigned + def self_sign_title=(self_sign_title) + if self_sign_title.nil? + fail ArgumentError, 'self_sign_title cannot be nil' + end + + @self_sign_title = self_sign_title + end + + # Custom attribute writer method with validation + # @param [Object] signature_request_message Value to be assigned + def signature_request_message=(signature_request_message) + if signature_request_message.nil? + fail ArgumentError, 'signature_request_message cannot be nil' + end + + @signature_request_message = signature_request_message + end + + # Custom attribute writer method with validation + # @param [Object] signature_request_title Value to be assigned + def signature_request_title=(signature_request_title) + if signature_request_title.nil? + fail ArgumentError, 'signature_request_title cannot be nil' + end + + @signature_request_title = signature_request_title + end + + # Custom attribute writer method with validation + # @param [Object] multifactor_auth_app Value to be assigned + def multifactor_auth_app=(multifactor_auth_app) + if multifactor_auth_app.nil? + fail ArgumentError, 'multifactor_auth_app cannot be nil' + end + + @multifactor_auth_app = multifactor_auth_app + end + + # Custom attribute writer method with validation + # @param [Object] multifactor_auth_sms Value to be assigned + def multifactor_auth_sms=(multifactor_auth_sms) + if multifactor_auth_sms.nil? + fail ArgumentError, 'multifactor_auth_sms cannot be nil' + end + + @multifactor_auth_sms = multifactor_auth_sms + 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 && + company == o.company && + custom_signing_redirect_enabled == o.custom_signing_redirect_enabled && + custom_signing_redirect_url == o.custom_signing_redirect_url && + custom_tagline == o.custom_tagline && + date_format == o.date_format && + is_signature_reminders_enabled == o.is_signature_reminders_enabled && + request_email_from == o.request_email_from && + request_email_signature == o.request_email_signature && + required_signature_types == o.required_signature_types && + should_enable_tamper_proof == o.should_enable_tamper_proof && + should_include_distinct_pdfs == o.should_include_distinct_pdfs && + should_offer_signer_access_code == o.should_offer_signer_access_code && + should_offer_signer_sms_authentication == o.should_offer_signer_sms_authentication && + should_remove_document_id == o.should_remove_document_id && + data_residency == o.data_residency && + allow_team_delete_document_for_everyone == o.allow_team_delete_document_for_everyone && + allow_team_download_csv == o.allow_team_download_csv && + lock_team_template_creation == o.lock_team_template_creation && + lock_team_template_gallery == o.lock_team_template_gallery && + self_sign_message == o.self_sign_message && + self_sign_title == o.self_sign_title && + signature_request_message == o.signature_request_message && + signature_request_title == o.signature_request_title && + multifactor_auth_app == o.multifactor_auth_app && + multifactor_auth_sms == o.multifactor_auth_sms + 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 + [company, custom_signing_redirect_enabled, custom_signing_redirect_url, custom_tagline, date_format, is_signature_reminders_enabled, request_email_from, request_email_signature, required_signature_types, should_enable_tamper_proof, should_include_distinct_pdfs, should_offer_signer_access_code, should_offer_signer_sms_authentication, should_remove_document_id, data_residency, allow_team_delete_document_for_everyone, allow_team_download_csv, lock_team_template_creation, lock_team_template_gallery, self_sign_message, self_sign_title, signature_request_message, signature_request_title, multifactor_auth_app, multifactor_auth_sms].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/team_settings_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_settings_update_request.rb new file mode 100644 index 000000000..2b10501d3 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/team_settings_update_request.rb @@ -0,0 +1,551 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class TeamSettingsUpdateRequest + # Company name associated with this account or team. + # @return [StringSettingUpdate] + attr_accessor :company + + # Whether signers are redirected to a custom URL after completing a signature request. + # @return [BooleanSettingUpdate] + attr_accessor :custom_signing_redirect_enabled + + # URL where signers are redirected after completing a signature request when custom redirects are enabled. + # @return [StringSettingUpdate] + attr_accessor :custom_signing_redirect_url + + # Custom tagline displayed with the account or team branding. + # @return [StringSettingUpdate] + attr_accessor :custom_tagline + + # Date format used to display dates. List the setting in `unset` to inherit the default. + # @return [DateFormatSettingUpdate] + attr_accessor :date_format + + # Whether automatic reminder emails are enabled for incomplete signature requests. + # @return [BooleanSettingUpdate] + attr_accessor :is_signature_reminders_enabled + + # Sender name shown on signature request emails. + # @return [StringSettingUpdate] + attr_accessor :request_email_from + + # Signature appended to signature request emails. + # @return [StringSettingUpdate] + attr_accessor :request_email_signature + + # Signature creation methods signers may use. + # @return [RequiredSignatureTypesSettingUpdate] + attr_accessor :required_signature_types + + # Whether completed documents include a digital tamper-proof seal. + # @return [BooleanSettingUpdate] + attr_accessor :should_enable_tamper_proof + + # Whether completed documents remain as separate PDF files instead of being merged into one PDF. + # @return [BooleanSettingUpdate] + attr_accessor :should_include_distinct_pdfs + + # Whether senders can require an access code to verify a signer. + # @return [BooleanSettingUpdate] + attr_accessor :should_offer_signer_access_code + + # Whether senders can require SMS authentication to verify a signer. + # @return [BooleanSettingUpdate] + attr_accessor :should_offer_signer_sms_authentication + + # Whether the Dropbox Sign document ID is hidden on sent documents. + # @return [BooleanSettingUpdate] + attr_accessor :should_remove_document_id + + # Storage region for team documents. + # @return [DataResidencySettingUpdate] + attr_accessor :data_residency + + # Whether team members can delete a document for all participants. + # @return [BooleanSettingUpdate] + attr_accessor :allow_team_delete_document_for_everyone + + # Whether team members can download CSV files. + # @return [BooleanSettingUpdate] + attr_accessor :allow_team_download_csv + + # Whether team members are prevented from creating templates. + # @return [BooleanSettingUpdate] + attr_accessor :lock_team_template_creation + + # Whether team members are prevented from using the template gallery. + # @return [BooleanSettingUpdate] + attr_accessor :lock_team_template_gallery + + # Default message enforced for team members when they create self-signed documents. + # @return [StringSettingUpdate] + attr_accessor :self_sign_message + + # Default title enforced for team members when they create self-signed documents. + # @return [StringSettingUpdate] + attr_accessor :self_sign_title + + # Default message enforced for team members when they create signature requests. + # @return [StringSettingUpdate] + attr_accessor :signature_request_message + + # Default title enforced for team members when they create signature requests. + # @return [StringSettingUpdate] + attr_accessor :signature_request_title + + # Whether authenticator-app multifactor authentication is enabled for the team. + # @return [BooleanSettingUpdate] + attr_accessor :multifactor_auth_app + + # Whether SMS multifactor authentication is enabled for the team. + # @return [BooleanSettingUpdate] + attr_accessor :multifactor_auth_sms + + # Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. + # @return [Array] + attr_accessor :unset + + 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 + { + :'company' => :'company', + :'custom_signing_redirect_enabled' => :'custom_signing_redirect_enabled', + :'custom_signing_redirect_url' => :'custom_signing_redirect_url', + :'custom_tagline' => :'custom_tagline', + :'date_format' => :'date_format', + :'is_signature_reminders_enabled' => :'is_signature_reminders_enabled', + :'request_email_from' => :'request_email_from', + :'request_email_signature' => :'request_email_signature', + :'required_signature_types' => :'required_signature_types', + :'should_enable_tamper_proof' => :'should_enable_tamper_proof', + :'should_include_distinct_pdfs' => :'should_include_distinct_pdfs', + :'should_offer_signer_access_code' => :'should_offer_signer_access_code', + :'should_offer_signer_sms_authentication' => :'should_offer_signer_sms_authentication', + :'should_remove_document_id' => :'should_remove_document_id', + :'data_residency' => :'data_residency', + :'allow_team_delete_document_for_everyone' => :'allow_team_delete_document_for_everyone', + :'allow_team_download_csv' => :'allow_team_download_csv', + :'lock_team_template_creation' => :'lock_team_template_creation', + :'lock_team_template_gallery' => :'lock_team_template_gallery', + :'self_sign_message' => :'self_sign_message', + :'self_sign_title' => :'self_sign_title', + :'signature_request_message' => :'signature_request_message', + :'signature_request_title' => :'signature_request_title', + :'multifactor_auth_app' => :'multifactor_auth_app', + :'multifactor_auth_sms' => :'multifactor_auth_sms', + :'unset' => :'unset' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'company' => :'StringSettingUpdate', + :'custom_signing_redirect_enabled' => :'BooleanSettingUpdate', + :'custom_signing_redirect_url' => :'StringSettingUpdate', + :'custom_tagline' => :'StringSettingUpdate', + :'date_format' => :'DateFormatSettingUpdate', + :'is_signature_reminders_enabled' => :'BooleanSettingUpdate', + :'request_email_from' => :'StringSettingUpdate', + :'request_email_signature' => :'StringSettingUpdate', + :'required_signature_types' => :'RequiredSignatureTypesSettingUpdate', + :'should_enable_tamper_proof' => :'BooleanSettingUpdate', + :'should_include_distinct_pdfs' => :'BooleanSettingUpdate', + :'should_offer_signer_access_code' => :'BooleanSettingUpdate', + :'should_offer_signer_sms_authentication' => :'BooleanSettingUpdate', + :'should_remove_document_id' => :'BooleanSettingUpdate', + :'data_residency' => :'DataResidencySettingUpdate', + :'allow_team_delete_document_for_everyone' => :'BooleanSettingUpdate', + :'allow_team_download_csv' => :'BooleanSettingUpdate', + :'lock_team_template_creation' => :'BooleanSettingUpdate', + :'lock_team_template_gallery' => :'BooleanSettingUpdate', + :'self_sign_message' => :'StringSettingUpdate', + :'self_sign_title' => :'StringSettingUpdate', + :'signature_request_message' => :'StringSettingUpdate', + :'signature_request_title' => :'StringSettingUpdate', + :'multifactor_auth_app' => :'BooleanSettingUpdate', + :'multifactor_auth_sms' => :'BooleanSettingUpdate', + :'unset' => :'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 [TeamSettingsUpdateRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "TeamSettingsUpdateRequest" + ) || TeamSettingsUpdateRequest.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::TeamSettingsUpdateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamSettingsUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'custom_signing_redirect_enabled') + self.custom_signing_redirect_enabled = attributes[:'custom_signing_redirect_enabled'] + end + + if attributes.key?(:'custom_signing_redirect_url') + self.custom_signing_redirect_url = attributes[:'custom_signing_redirect_url'] + end + + if attributes.key?(:'custom_tagline') + self.custom_tagline = attributes[:'custom_tagline'] + end + + if attributes.key?(:'date_format') + self.date_format = attributes[:'date_format'] + end + + if attributes.key?(:'is_signature_reminders_enabled') + self.is_signature_reminders_enabled = attributes[:'is_signature_reminders_enabled'] + end + + if attributes.key?(:'request_email_from') + self.request_email_from = attributes[:'request_email_from'] + end + + if attributes.key?(:'request_email_signature') + self.request_email_signature = attributes[:'request_email_signature'] + end + + if attributes.key?(:'required_signature_types') + self.required_signature_types = attributes[:'required_signature_types'] + end + + if attributes.key?(:'should_enable_tamper_proof') + self.should_enable_tamper_proof = attributes[:'should_enable_tamper_proof'] + end + + if attributes.key?(:'should_include_distinct_pdfs') + self.should_include_distinct_pdfs = attributes[:'should_include_distinct_pdfs'] + end + + if attributes.key?(:'should_offer_signer_access_code') + self.should_offer_signer_access_code = attributes[:'should_offer_signer_access_code'] + end + + if attributes.key?(:'should_offer_signer_sms_authentication') + self.should_offer_signer_sms_authentication = attributes[:'should_offer_signer_sms_authentication'] + end + + if attributes.key?(:'should_remove_document_id') + self.should_remove_document_id = attributes[:'should_remove_document_id'] + end + + if attributes.key?(:'data_residency') + self.data_residency = attributes[:'data_residency'] + end + + if attributes.key?(:'allow_team_delete_document_for_everyone') + self.allow_team_delete_document_for_everyone = attributes[:'allow_team_delete_document_for_everyone'] + end + + if attributes.key?(:'allow_team_download_csv') + self.allow_team_download_csv = attributes[:'allow_team_download_csv'] + end + + if attributes.key?(:'lock_team_template_creation') + self.lock_team_template_creation = attributes[:'lock_team_template_creation'] + end + + if attributes.key?(:'lock_team_template_gallery') + self.lock_team_template_gallery = attributes[:'lock_team_template_gallery'] + end + + if attributes.key?(:'self_sign_message') + self.self_sign_message = attributes[:'self_sign_message'] + end + + if attributes.key?(:'self_sign_title') + self.self_sign_title = attributes[:'self_sign_title'] + end + + if attributes.key?(:'signature_request_message') + self.signature_request_message = attributes[:'signature_request_message'] + end + + if attributes.key?(:'signature_request_title') + self.signature_request_title = attributes[:'signature_request_title'] + end + + if attributes.key?(:'multifactor_auth_app') + self.multifactor_auth_app = attributes[:'multifactor_auth_app'] + end + + if attributes.key?(:'multifactor_auth_sms') + self.multifactor_auth_sms = attributes[:'multifactor_auth_sms'] + end + + if attributes.key?(:'unset') + if (value = attributes[:'unset']).is_a?(Array) + self.unset = 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 + 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? + 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 && + company == o.company && + custom_signing_redirect_enabled == o.custom_signing_redirect_enabled && + custom_signing_redirect_url == o.custom_signing_redirect_url && + custom_tagline == o.custom_tagline && + date_format == o.date_format && + is_signature_reminders_enabled == o.is_signature_reminders_enabled && + request_email_from == o.request_email_from && + request_email_signature == o.request_email_signature && + required_signature_types == o.required_signature_types && + should_enable_tamper_proof == o.should_enable_tamper_proof && + should_include_distinct_pdfs == o.should_include_distinct_pdfs && + should_offer_signer_access_code == o.should_offer_signer_access_code && + should_offer_signer_sms_authentication == o.should_offer_signer_sms_authentication && + should_remove_document_id == o.should_remove_document_id && + data_residency == o.data_residency && + allow_team_delete_document_for_everyone == o.allow_team_delete_document_for_everyone && + allow_team_download_csv == o.allow_team_download_csv && + lock_team_template_creation == o.lock_team_template_creation && + lock_team_template_gallery == o.lock_team_template_gallery && + self_sign_message == o.self_sign_message && + self_sign_title == o.self_sign_title && + signature_request_message == o.signature_request_message && + signature_request_title == o.signature_request_title && + multifactor_auth_app == o.multifactor_auth_app && + multifactor_auth_sms == o.multifactor_auth_sms && + unset == o.unset + 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 + [company, custom_signing_redirect_enabled, custom_signing_redirect_url, custom_tagline, date_format, is_signature_reminders_enabled, request_email_from, request_email_signature, required_signature_types, should_enable_tamper_proof, should_include_distinct_pdfs, should_offer_signer_access_code, should_offer_signer_sms_authentication, should_remove_document_id, data_residency, allow_team_delete_document_for_everyone, allow_team_download_csv, lock_team_template_creation, lock_team_template_gallery, self_sign_message, self_sign_title, signature_request_message, signature_request_title, multifactor_auth_app, multifactor_auth_sms, unset].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/translations/en.yaml b/translations/en.yaml index 866334d59..e02750c8a 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -1895,6 +1895,79 @@ "Error::429": Error 429 exceeded_rate "Error::4XX": Error 4XX failed_operation +#################### +# Settings endpoints # +#################### + +"AccountSettingsGet::SUMMARY": Get account settings +"AccountSettingsGet::DESCRIPTION": account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. +"AccountSettingsGet::ACCOUNT_ID": Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. +"AccountSettingsUpdate::SUMMARY": Modify account settings +"AccountSettingsUpdate::DESCRIPTION": account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer. +"AccountSettingsUpdate::ACCOUNT_ID": Optional account ID. Defaults to the authenticated account. A team admin can specify another account on a team they administer. +"TeamSettingsGet::SUMMARY": Get team settings +"TeamSettingsGet::DESCRIPTION": team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. +"TeamSettingsGet::TEAM_ID": Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. +"TeamSettingsUpdate::SUMMARY": Modify team settings +"TeamSettingsUpdate::DESCRIPTION": team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam. +"TeamSettingsUpdate::TEAM_ID": Optional team ID. Defaults to the authenticated account's team. An organization admin can specify a subteam. + +"Settings::COMPANY": Company name associated with this account or team. +"Settings::CUSTOM_SIGNING_REDIRECT_ENABLED": Whether signers are redirected to a custom URL after completing a signature request. +"Settings::CUSTOM_SIGNING_REDIRECT_URL": URL where signers are redirected after completing a signature request when custom redirects are enabled. +"Settings::CUSTOM_TAGLINE": Custom tagline displayed with the account or team branding. +"Settings::DATE_FORMAT": Date format used to display dates. List the setting in `unset` to inherit the default. +"Settings::IS_SIGNATURE_REMINDERS_ENABLED": Whether automatic reminder emails are enabled for incomplete signature requests. +"Settings::REQUEST_EMAIL_FROM": Sender name shown on signature request emails. +"Settings::REQUEST_EMAIL_SIGNATURE": Signature appended to signature request emails. +"Settings::REQUIRED_SIGNATURE_TYPES": Signature creation methods signers may use. +"Settings::SHOULD_ENABLE_TAMPER_PROOF": Whether completed documents include a digital tamper-proof seal. +"Settings::SHOULD_INCLUDE_DISTINCT_PDFS": Whether completed documents remain as separate PDF files instead of being merged into one PDF. +"Settings::SHOULD_OFFER_SIGNER_ACCESS_CODE": Whether senders can require an access code to verify a signer. +"Settings::SHOULD_OFFER_SIGNER_SMS_AUTHENTICATION": Whether senders can require SMS authentication to verify a signer. +"Settings::SHOULD_REMOVE_DOCUMENT_ID": Whether the Dropbox Sign document ID is hidden on sent documents. + +"AccountSettings::IS_NOTIFY_ON_SIGN_ENABLED": Whether to notify the account when someone signs a document it sent. +"AccountSettings::IS_NOTIFY_ON_VIEW_ENABLED": Whether to notify the account when someone opens a document it sent. +"AccountSettings::SHOULD_AUTOCOMPLETE": Whether values entered in text fields are saved and suggested for future signature requests. +"AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS": Whether completed signature requests include PDF copies in emails sent to the account. +"AccountSettings::SHOULD_INCLUDE_REQUESTED_PDFS_FOR_OTHERS": Whether completed signature requests include PDF copies in emails sent to signers and CC recipients. +"AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS": Whether emails sent to the account include PDF copies of documents it sends. +"AccountSettings::SHOULD_INCLUDE_SENT_DOC_PDFS_FOR_OTHERS": Whether emails sent to recipients include PDF copies of documents the account sends. +"AccountSettings::SHOULD_SEND_DAILY_SUMMARY": Whether to send the account a daily email summarizing outstanding signature requests. +"AccountSettings::SHOULD_SEND_EMBEDDED_SIGNATURE_CONF_EMAILS": Whether to notify the account when it signs a document on a third-party site. +"AccountSettings::SHOULD_SEND_ORDERED_SR_EMAIL": Whether to notify all parties when an ordered signature request starts. +"AccountSettings::SHOULD_SEND_OUTBOUND_CONF_EMAILS": Whether to notify the account when it signs and sends a document. +"AccountSettings::TEMPLATE_LINK_SIGNATURE_EMAILS_ENABLED": Whether to notify the account when someone signs a document sent by its team through a template link. + +"TeamSettings::DATA_RESIDENCY": Storage region for team documents. +"TeamSettings::ALLOW_TEAM_DELETE_DOCUMENT_FOR_EVERYONE": Whether team members can delete a document for all participants. +"TeamSettings::ALLOW_TEAM_DOWNLOAD_CSV": Whether team members can download CSV files. +"TeamSettings::LOCK_TEAM_TEMPLATE_CREATION": Whether team members are prevented from creating templates. +"TeamSettings::LOCK_TEAM_TEMPLATE_GALLERY": Whether team members are prevented from using the template gallery. +"TeamSettings::SELF_SIGN_MESSAGE": Default message enforced for team members when they create self-signed documents. +"TeamSettings::SELF_SIGN_TITLE": Default title enforced for team members when they create self-signed documents. +"TeamSettings::SIGNATURE_REQUEST_MESSAGE": Default message enforced for team members when they create signature requests. +"TeamSettings::SIGNATURE_REQUEST_TITLE": Default title enforced for team members when they create signature requests. +"TeamSettings::MULTIFACTOR_AUTH_APP": Whether authenticator-app multifactor authentication is enabled for the team. +"TeamSettings::MULTIFACTOR_AUTH_SMS": Whether SMS multifactor authentication is enabled for the team. + +"SettingsUpdateRequest::UNSET": Setting names to clear so their values are inherited. A listed name cannot also be set or locked in the same request. +"AccountSettingsResponse::SETTINGS": Account settings keyed by setting name. +"TeamSettingsResponse::SETTINGS": Team settings keyed by setting name. +"BooleanSettingUpdate::DESCRIPTION": Updates a boolean team setting. Provide `value`, `lock_mode`, or both. +"BooleanSettingUpdate::VALUE": Boolean value to store. +"StringSettingUpdate::DESCRIPTION": Updates a string team setting. Provide `value`, `lock_mode`, or both. +"StringSettingUpdate::VALUE": String value to store. +"DateFormatSettingUpdate::DESCRIPTION": Updates a date format team setting. Provide `value`, `lock_mode`, or both. +"DataResidencySettingUpdate::DESCRIPTION": Updates the data residency team setting. Provide `value`, `lock_mode`, or both. +"RequiredSignatureTypesSettingUpdate::DESCRIPTION": Updates the required signature types team setting. Provide `value`, `lock_mode`, or both. +"RequiredSignatureTypesSettingUpdate::VALUE": Signature creation methods signers may use. +"TeamSettingLock::DESCRIPTION": Who can change a team setting. `organization_admins` limits changes to organization admins, and subteams use that value. `team_admins` lets admins of a team and its subteams set their own value. `members` lets each member set their own value. +"DateFormat::DESCRIPTION": Date format used to display dates. +"DataResidency::DESCRIPTION": Storage region for team documents. +"RequiredSignatureType::DESCRIPTION": A signature creation method a signer may use. + ######################### # SEO for API Reference # ######################### @@ -1902,6 +1975,11 @@ "AccountCreate::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build with a range of tools. Find out how to create a new Dropbox Sign Account using the specified `email_address` here." "AccountGet::SEO::TITLE": "Get Account | API Documentation | Dropbox Sign for Developers" "AccountGet::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build with a wide range of tools. To find out how to return the properties and settings of your Account, click here." +"SettingResponse::VALUE": "Current value of the setting. Null when the setting has no value." +"AccountSettingsGet::SEO::TITLE": "Get Account Settings | API Documentation | Dropbox Sign for Developers" +"AccountSettingsGet::SEO::DESCRIPTION": "account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer." +"AccountSettingsUpdate::SEO::TITLE": "Update Account Settings | API Documentation | Dropbox Sign for Developers" +"AccountSettingsUpdate::SEO::DESCRIPTION": "account_id is an optional query parameter and defaults to the authenticated account. A team admin can specify another account on a team they administer." "AccountUpdate::SEO::TITLE": "Update Account | API Documentation | Dropbox Sign for Developers" "AccountUpdate::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build with a wide range of tools. To find out how update the properties and settings of your Account, click here." "AccountVerify::SEO::TITLE": "Verify Account | API Documentation | Dropbox Sign for Developers" @@ -1998,6 +2076,10 @@ "TeamCreate::SEO::DESCRIPTION": "The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here." "TeamDelete::SEO::TITLE": "Delete Team | REST API Documentation | Dropbox Sign for Developers" "TeamDelete::SEO::DESCRIPTION": "The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here." +"TeamSettingsGet::SEO::TITLE": "Get Team Settings | API Documentation | Dropbox Sign for Developers" +"TeamSettingsGet::SEO::DESCRIPTION": "team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam." +"TeamSettingsUpdate::SEO::TITLE": "Update Team Settings | API Documentation | Dropbox Sign for Developers" +"TeamSettingsUpdate::SEO::DESCRIPTION": "team_id is an optional query parameter and defaults to the authenticated account's team. An organization admin can specify a subteam." "TeamGet::SEO::TITLE": "Get Team | REST API Documentation | Dropbox Sign for Developers" "TeamGet::SEO::DESCRIPTION": "The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here." "TeamInfo::SEO::TITLE": "Get Team Info | Dropbox Sign for Developers"