diff --git a/examples/FaxLineAddUser.cs b/examples/FaxLineAddUser.cs new file mode 100644 index 000000000..de22f454f --- /dev/null +++ b/examples/FaxLineAddUser.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineAddUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var result = faxLineApi.FaxLineAddUser(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineAddUser.java b/examples/FaxLineAddUser.java new file mode 100644 index 000000000..34e455d5a --- /dev/null +++ b/examples/FaxLineAddUser.java @@ -0,0 +1,30 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineAddUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineAddUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineAddUser.js b/examples/FaxLineAddUser.js new file mode 100644 index 000000000..84e1e2c0e --- /dev/null +++ b/examples/FaxLineAddUser.js @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineAddUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAddUser.php b/examples/FaxLineAddUser.php new file mode 100644 index 000000000..8fb6c0fef --- /dev/null +++ b/examples/FaxLineAddUser.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); +$data->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $result = $faxLineApi->faxLineAddUser($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineAddUser.py b/examples/FaxLineAddUser.py new file mode 100644 index 000000000..49d362ccb --- /dev/null +++ b/examples/FaxLineAddUser.py @@ -0,0 +1,23 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineAddUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_add_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineAddUser.rb b/examples/FaxLineAddUser.rb new file mode 100644 index 000000000..1ad855373 --- /dev/null +++ b/examples/FaxLineAddUser.rb @@ -0,0 +1,19 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineAddUserRequest.new +data.number = "[FAX_NUMBER]" +data.email_address = "member@dropboxsign.com" + +begin + result = fax_line_api.fax_line_add_user(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineAddUser.sh b/examples/FaxLineAddUser.sh new file mode 100644 index 000000000..d0d223f90 --- /dev/null +++ b/examples/FaxLineAddUser.sh @@ -0,0 +1,4 @@ +curl -X POST 'https://api.hellosign.com/v3/fax_line/add_user' \ + -u 'YOUR_API_KEY:' \ + -F 'number=[FAX_NUMBER]' \ + -F 'email_address=member@dropboxsign.com' diff --git a/examples/FaxLineAddUser.ts b/examples/FaxLineAddUser.ts new file mode 100644 index 000000000..e5d705e94 --- /dev/null +++ b/examples/FaxLineAddUser.ts @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineAddUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineAddUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAreaCodeGet.cs b/examples/FaxLineAreaCodeGet.cs new file mode 100644 index 000000000..3beedfef1 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineAreaCodeGet("US", "CA"); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineAreaCodeGet.java b/examples/FaxLineAreaCodeGet.java new file mode 100644 index 000000000..1df071ab9 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.java @@ -0,0 +1,26 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineAreaCodeGet.js b/examples/FaxLineAreaCodeGet.js new file mode 100644 index 000000000..bfc908f18 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.js @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAreaCodeGet.php b/examples/FaxLineAreaCodeGet.php new file mode 100644 index 000000000..c19f9e187 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineAreaCodeGet.py b/examples/FaxLineAreaCodeGet.py new file mode 100644 index 000000000..8a4637352 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.py @@ -0,0 +1,18 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_area_code_get("US", "CA") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineAreaCodeGet.rb b/examples/FaxLineAreaCodeGet.rb new file mode 100644 index 000000000..571fb4f58 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.rb @@ -0,0 +1,15 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_area_code_get("US", "CA") + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineAreaCodeGet.sh b/examples/FaxLineAreaCodeGet.sh new file mode 100644 index 000000000..8664c650e --- /dev/null +++ b/examples/FaxLineAreaCodeGet.sh @@ -0,0 +1,4 @@ +curl -X GET 'https://api.hellosign.com/v3/fax_line/area_codes' \ + -u 'YOUR_API_KEY:' \ + -F 'country=US' \ + -F 'state=CA' diff --git a/examples/FaxLineAreaCodeGet.ts b/examples/FaxLineAreaCodeGet.ts new file mode 100644 index 000000000..bfc908f18 --- /dev/null +++ b/examples/FaxLineAreaCodeGet.ts @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineCreate.cs b/examples/FaxLineCreate.cs new file mode 100644 index 000000000..4d96ae5b0 --- /dev/null +++ b/examples/FaxLineCreate.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineCreateRequest( + areaCode: 209, + country: "US" + ); + + try + { + var result = faxLineApi.FaxLineCreate(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineCreate.java b/examples/FaxLineCreate.java new file mode 100644 index 000000000..fca101895 --- /dev/null +++ b/examples/FaxLineCreate.java @@ -0,0 +1,30 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineCreateRequest() + .areaCode(209) + .country("US"); + + try { + FaxLineResponse result = faxLineApi.faxLineCreate(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineCreate.js b/examples/FaxLineCreate.js new file mode 100644 index 000000000..c4ee72c59 --- /dev/null +++ b/examples/FaxLineCreate.js @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + areaCode: 209, + country: "US", +}; + +const result = faxLineApi.faxLineCreate(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineCreate.php b/examples/FaxLineCreate.php new file mode 100644 index 000000000..27a0d2b8a --- /dev/null +++ b/examples/FaxLineCreate.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); +$data->setAreaCode(209) + ->setCountry("US"); + +try { + $result = $faxLineApi->faxLineCreate($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineCreate.py b/examples/FaxLineCreate.py new file mode 100644 index 000000000..14ef9c97c --- /dev/null +++ b/examples/FaxLineCreate.py @@ -0,0 +1,23 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineCreateRequest( + area_code=209, + country="US", + ) + + try: + response = fax_line_api.fax_line_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineCreate.rb b/examples/FaxLineCreate.rb new file mode 100644 index 000000000..2619678ae --- /dev/null +++ b/examples/FaxLineCreate.rb @@ -0,0 +1,19 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineCreateRequest.new +data.area_code = 209 +data.country = "US" + +begin + result = fax_line_api.fax_line_create(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineCreate.sh b/examples/FaxLineCreate.sh new file mode 100644 index 000000000..054011b2e --- /dev/null +++ b/examples/FaxLineCreate.sh @@ -0,0 +1,4 @@ +curl -X POST 'https://api.hellosign.com/v3/fax_line/create' \ + -u 'YOUR_API_KEY:' \ + -F 'area_code=209' \ + -F 'country=US' diff --git a/examples/FaxLineCreate.ts b/examples/FaxLineCreate.ts new file mode 100644 index 000000000..6ceeb71da --- /dev/null +++ b/examples/FaxLineCreate.ts @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineCreateRequest = { + areaCode: 209, + country: "US", +}; + +const result = faxLineApi.faxLineCreate(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineDelete.cs b/examples/FaxLineDelete.cs new file mode 100644 index 000000000..a2cf8a9f1 --- /dev/null +++ b/examples/FaxLineDelete.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineDeleteRequest( + number: "[FAX_NUMBER]", + ); + + try + { + faxLineApi.FaxLineDelete(data); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineDelete.java b/examples/FaxLineDelete.java new file mode 100644 index 000000000..6b989d287 --- /dev/null +++ b/examples/FaxLineDelete.java @@ -0,0 +1,28 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineDeleteRequest() + .number("[FAX_NUMBER]"); + + try { + faxLineApi.faxLineDelete(data); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineDelete.js b/examples/FaxLineDelete.js new file mode 100644 index 000000000..1e8bdda7c --- /dev/null +++ b/examples/FaxLineDelete.js @@ -0,0 +1,17 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", +}; + +const result = faxLineApi.faxLineDelete(data); + +result.catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineDelete.php b/examples/FaxLineDelete.php new file mode 100644 index 000000000..8cc4ee01f --- /dev/null +++ b/examples/FaxLineDelete.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); +$data->setNumber("[FAX_NUMBER]"); + +try { + $faxLineApi->faxLineDelete($data); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineDelete.py b/examples/FaxLineDelete.py new file mode 100644 index 000000000..7b828b01f --- /dev/null +++ b/examples/FaxLineDelete.py @@ -0,0 +1,21 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineDeleteRequest( + number="[FAX_NUMBER]", + ) + + try: + fax_line_api.fax_line_delete(data) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineDelete.rb b/examples/FaxLineDelete.rb new file mode 100644 index 000000000..001cf6275 --- /dev/null +++ b/examples/FaxLineDelete.rb @@ -0,0 +1,17 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineDeleteRequest.new +data.number = "[FAX_NUMBER]" + +begin + fax_line_api.fax_line_delete(data) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineDelete.sh b/examples/FaxLineDelete.sh new file mode 100644 index 000000000..d732b3db8 --- /dev/null +++ b/examples/FaxLineDelete.sh @@ -0,0 +1,3 @@ +curl -X DELETE 'https://api.hellosign.com/v3/fax_line' \ + -u 'YOUR_API_KEY:' \ + -F 'number=[FAX_NUMBER]' diff --git a/examples/FaxLineDelete.ts b/examples/FaxLineDelete.ts new file mode 100644 index 000000000..14efef4dc --- /dev/null +++ b/examples/FaxLineDelete.ts @@ -0,0 +1,17 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineDeleteRequest = { + number: "[FAX_NUMBER]", +}; + +const result = faxLineApi.faxLineDelete(data); + +result.catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineGet.cs b/examples/FaxLineGet.cs new file mode 100644 index 000000000..d18c82fab --- /dev/null +++ b/examples/FaxLineGet.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineGet("[FAX_NUMBER]"); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineGet.java b/examples/FaxLineGet.java new file mode 100644 index 000000000..69281b342 --- /dev/null +++ b/examples/FaxLineGet.java @@ -0,0 +1,26 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineGet.js b/examples/FaxLineGet.js new file mode 100644 index 000000000..e9643abe9 --- /dev/null +++ b/examples/FaxLineGet.js @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineGet.php b/examples/FaxLineGet.php new file mode 100644 index 000000000..75dd77b5c --- /dev/null +++ b/examples/FaxLineGet.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineGet.py b/examples/FaxLineGet.py new file mode 100644 index 000000000..3f66de9e7 --- /dev/null +++ b/examples/FaxLineGet.py @@ -0,0 +1,18 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_get("[FAX_NUMBER]") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineGet.rb b/examples/FaxLineGet.rb new file mode 100644 index 000000000..090c2bdd8 --- /dev/null +++ b/examples/FaxLineGet.rb @@ -0,0 +1,15 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_get("[NUMBER]") + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineGet.sh b/examples/FaxLineGet.sh new file mode 100644 index 000000000..513522062 --- /dev/null +++ b/examples/FaxLineGet.sh @@ -0,0 +1,2 @@ +curl -X GET 'https://api.hellosign.com/v3/fax_line?number=[FAX_NUMBER]' \ + -u 'YOUR_API_KEY:' diff --git a/examples/FaxLineGet.ts b/examples/FaxLineGet.ts new file mode 100644 index 000000000..e9643abe9 --- /dev/null +++ b/examples/FaxLineGet.ts @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineList.cs b/examples/FaxLineList.cs new file mode 100644 index 000000000..96d7f0c28 --- /dev/null +++ b/examples/FaxLineList.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineList(); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineList.java b/examples/FaxLineList.java new file mode 100644 index 000000000..df1d0bd13 --- /dev/null +++ b/examples/FaxLineList.java @@ -0,0 +1,26 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineListResponse result = faxLineApi.faxLineList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineList.js b/examples/FaxLineList.js new file mode 100644 index 000000000..f40c60dfa --- /dev/null +++ b/examples/FaxLineList.js @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineList(); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineList.php b/examples/FaxLineList.php new file mode 100644 index 000000000..6056a2427 --- /dev/null +++ b/examples/FaxLineList.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineList(); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineList.py b/examples/FaxLineList.py new file mode 100644 index 000000000..49cf69a59 --- /dev/null +++ b/examples/FaxLineList.py @@ -0,0 +1,18 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_list() + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineList.rb b/examples/FaxLineList.rb new file mode 100644 index 000000000..23a0ec845 --- /dev/null +++ b/examples/FaxLineList.rb @@ -0,0 +1,15 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_list() + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineList.sh b/examples/FaxLineList.sh new file mode 100644 index 000000000..d5b4ea4df --- /dev/null +++ b/examples/FaxLineList.sh @@ -0,0 +1,2 @@ +curl -X GET 'https://api.hellosign.com/v3/fax_line/list' \ + -u 'YOUR_API_KEY:' diff --git a/examples/FaxLineList.ts b/examples/FaxLineList.ts new file mode 100644 index 000000000..f40c60dfa --- /dev/null +++ b/examples/FaxLineList.ts @@ -0,0 +1,14 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineList(); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineRemoveUser.cs b/examples/FaxLineRemoveUser.cs new file mode 100644 index 000000000..1dd562ed6 --- /dev/null +++ b/examples/FaxLineRemoveUser.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineRemoveUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var result = faxLineApi.FaxLineRemoveUser(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineRemoveUser.java b/examples/FaxLineRemoveUser.java new file mode 100644 index 000000000..7864b05ab --- /dev/null +++ b/examples/FaxLineRemoveUser.java @@ -0,0 +1,30 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineRemoveUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineRemoveUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxLineRemoveUser.js b/examples/FaxLineRemoveUser.js new file mode 100644 index 000000000..64f247924 --- /dev/null +++ b/examples/FaxLineRemoveUser.js @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineRemoveUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/FaxLineRemoveUser.php b/examples/FaxLineRemoveUser.php new file mode 100644 index 000000000..60132fedc --- /dev/null +++ b/examples/FaxLineRemoveUser.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); +$data->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $result = $faxLineApi->faxLineRemoveUser($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/FaxLineRemoveUser.py b/examples/FaxLineRemoveUser.py new file mode 100644 index 000000000..4d8c19668 --- /dev/null +++ b/examples/FaxLineRemoveUser.py @@ -0,0 +1,23 @@ +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineRemoveUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_remove_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineRemoveUser.rb b/examples/FaxLineRemoveUser.rb new file mode 100644 index 000000000..98bb7a047 --- /dev/null +++ b/examples/FaxLineRemoveUser.rb @@ -0,0 +1,19 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineRemoveUserRequest.new +data.number = "[FAX_NUMBER]" +data.email_address = "member@dropboxsign.com" + +begin + result = fax_line_api.fax_line_remove_user(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxLineRemoveUser.sh b/examples/FaxLineRemoveUser.sh new file mode 100644 index 000000000..7c7a1580a --- /dev/null +++ b/examples/FaxLineRemoveUser.sh @@ -0,0 +1,4 @@ +curl -X POST 'https://api.hellosign.com/v3/fax_line/remove_user' \ + -u 'YOUR_API_KEY:' \ + -F 'number=[FAX_NUMBER]' \ + -F 'email_address=member@dropboxsign.com' diff --git a/examples/FaxLineRemoveUser.ts b/examples/FaxLineRemoveUser.ts new file mode 100644 index 000000000..91dc3066b --- /dev/null +++ b/examples/FaxLineRemoveUser.ts @@ -0,0 +1,19 @@ +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineRemoveUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineRemoveUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); diff --git a/examples/json/FaxLineAddUserRequestExample.json b/examples/json/FaxLineAddUserRequestExample.json new file mode 100644 index 000000000..405f23102 --- /dev/null +++ b/examples/json/FaxLineAddUserRequestExample.json @@ -0,0 +1,4 @@ +{ + "number": "[FAX_NUMBER]", + "email_address": "member@dropboxsign.com" +} diff --git a/examples/json/FaxLineAreaCodeGetResponseExample.json b/examples/json/FaxLineAreaCodeGetResponseExample.json new file mode 100644 index 000000000..b83e80cc2 --- /dev/null +++ b/examples/json/FaxLineAreaCodeGetResponseExample.json @@ -0,0 +1,34 @@ +{ + "area_codes": [ + 209, + 213, + 310, + 323, + 408, + 415, + 424, + 510, + 530, + 559, + 562, + 619, + 626, + 650, + 657, + 661, + 669, + 707, + 714, + 747, + 760, + 805, + 818, + 831, + 858, + 909, + 916, + 925, + 949, + 951 + ] +} diff --git a/examples/json/FaxLineCreateRequestExample.json b/examples/json/FaxLineCreateRequestExample.json new file mode 100644 index 000000000..f80f6e421 --- /dev/null +++ b/examples/json/FaxLineCreateRequestExample.json @@ -0,0 +1,4 @@ +{ + "area_code": 209, + "country": "US" +} diff --git a/examples/json/FaxLineDeleteRequestExample.json b/examples/json/FaxLineDeleteRequestExample.json new file mode 100644 index 000000000..4bc5f0b67 --- /dev/null +++ b/examples/json/FaxLineDeleteRequestExample.json @@ -0,0 +1,3 @@ +{ + "number": "[FAX_NUMBER]", +} diff --git a/examples/json/FaxLineListResponseExample.json b/examples/json/FaxLineListResponseExample.json new file mode 100644 index 000000000..39ec60ac3 --- /dev/null +++ b/examples/json/FaxLineListResponseExample.json @@ -0,0 +1,24 @@ +{ + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "fax_lines": [ + { + "number": "[FAX_NUMBER]", + "created_at": 1723231831, + "updated_at": 1723231831, + "accounts": [ + { + "account_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "email_address": "me@dropboxsign.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": true + } + ] + } + ] +} diff --git a/examples/json/FaxLineRemoveUserRequestExample.json b/examples/json/FaxLineRemoveUserRequestExample.json new file mode 100644 index 000000000..405f23102 --- /dev/null +++ b/examples/json/FaxLineRemoveUserRequestExample.json @@ -0,0 +1,4 @@ +{ + "number": "[FAX_NUMBER]", + "email_address": "member@dropboxsign.com" +} diff --git a/examples/json/FaxLineResponseExample.json b/examples/json/FaxLineResponseExample.json new file mode 100644 index 000000000..9e4656f7c --- /dev/null +++ b/examples/json/FaxLineResponseExample.json @@ -0,0 +1,16 @@ +{ + "fax_line": { + "number": "[FAX_NUMBER]", + "created_at": 1723231831, + "updated_at": 1723231831, + "accounts": [ + { + "account_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "email_address": "me@dropboxsign.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": true + } + ] + } +} diff --git a/markdown/en/tags/fax-lines-tag-description.md b/markdown/en/tags/fax-lines-tag-description.md new file mode 100644 index 000000000..9adc1f687 --- /dev/null +++ b/markdown/en/tags/fax-lines-tag-description.md @@ -0,0 +1 @@ +Contains information about the fax lines you and your team have created \ No newline at end of file diff --git a/openapi-raw.yaml b/openapi-raw.yaml index b5f3915fb..340eca1ed 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -1403,6 +1403,803 @@ paths: seo: title: '_t__EmbeddedSignUrl::SEO::TITLE' description: '_t__EmbeddedSignUrl::SEO::DESCRIPTION' + /fax_line/add_user: + put: + tags: + - 'Fax Line' + summary: '_t__FaxLineAddUser::SUMMARY' + description: '_t__FaxLineAddUser::DESCRIPTION' + operationId: faxLineAddUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAddUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineAddUserRequestExample' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAddUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAddUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAddUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAddUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAddUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAddUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAddUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAddUser.sh + x-meta: + seo: + title: '_t__FaxLineAddUser::SEO::TITLE' + description: '_t__FaxLineAddUser::SEO::DESCRIPTION' + /fax_line/area_codes: + get: + tags: + - 'Fax Line' + summary: '_t__FaxLineAreaCodeGet::SUMMARY' + description: '_t__FaxLineAreaCodeGet::DESCRIPTION' + operationId: faxLineAreaCodeGet + parameters: + - + name: country + in: query + description: '_t__FaxLineAreaCodeGet::COUNTRY' + required: true + schema: + type: string + enum: + - CA + - US + - UK + - + name: state + in: query + description: '_t__FaxLineAreaCodeGet::STATE' + schema: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + - + name: province + in: query + description: '_t__FaxLineAreaCodeGet::PROVINCE' + schema: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + - + name: city + in: query + description: '_t__FaxLineAreaCodeGet::CITY' + schema: + type: string + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAreaCodeGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAreaCodeGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAreaCodeGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAreaCodeGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAreaCodeGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAreaCodeGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAreaCodeGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAreaCodeGet.sh + x-meta: + seo: + title: '_t__FaxLineAreaCodeGet::SEO::TITLE' + description: '_t__FaxLineAreaCodeGet::SEO::DESCRIPTION' + /fax_line/create: + post: + tags: + - 'Fax Line' + summary: '_t__FaxLineCreate::SUMMARY' + description: '_t__FaxLineCreate::DESCRIPTION' + operationId: faxLineCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineCreateRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineCreateRequestExample' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineCreate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineCreate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineCreate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineCreate.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineCreate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineCreate.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineCreate.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineCreate.sh + x-meta: + seo: + title: '_t__FaxLineCreate::SEO::TITLE' + description: '_t__FaxLineCreate::SEO::DESCRIPTION' + /fax_line: + get: + tags: + - 'Fax Line' + summary: '_t__FaxLineGet::SUMMARY' + description: '_t__FaxLineGet::DESCRIPTION' + operationId: faxLineGet + parameters: + - + name: number + in: query + description: '_t__FaxLineGet::NUMBER' + required: true + schema: + type: string + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineGet.sh + x-meta: + seo: + title: '_t__FaxLineGet::SEO::TITLE' + description: '_t__FaxLineGet::SEO::DESCRIPTION' + delete: + tags: + - 'Fax Line' + summary: '_t__FaxLineDelete::SUMMARY' + description: '_t__FaxLineDelete::DESCRIPTION' + operationId: faxLineDelete + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineDeleteRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineDeleteRequestExample' + 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: { } + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: '_t__FaxLineDelete::SEO::TITLE' + description: '_t__FaxLineDelete::SEO::DESCRIPTION' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: '_t__FaxLineList::SUMMARY' + description: '_t__FaxLineList::DESCRIPTION' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: '_t__FaxLineList::ACCOUNT_ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: '_t__FaxLineList::PAGE' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: '_t__FaxLineList::PAGE_SIZE' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: '_t__FaxLineList::SHOW_TEAM_LINES' + schema: + type: boolean + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: '_t__FaxLineList::SEO::TITLE' + description: '_t__FaxLineList::SEO::DESCRIPTION' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: '_t__FaxLineRemoveUser::SUMMARY' + description: '_t__FaxLineRemoveUser::DESCRIPTION' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + '200': + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineRemoveUser.sh + x-meta: + seo: + title: '_t__FaxLineRemoveUser::SEO::TITLE' + description: '_t__FaxLineRemoveUser::SEO::DESCRIPTION' /oauth/token: post: tags: @@ -6315,6 +7112,145 @@ components: type: boolean default: false type: object + FaxLineAddUserRequest: + required: + - number + properties: + number: + description: '_t__FaxLineAddUser::NUMBER' + type: string + account_id: + description: '_t__FaxLineAddUser::ACCOUNT_ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: '_t__FaxLineAddUser::EMAIL_ADDRESS' + type: string + format: email + type: object + FaxLineAreaCodeGetStateEnum: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + FaxLineAreaCodeGetProvinceEnum: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + FaxLineAreaCodeGetCountryEnum: + type: string + enum: + - CA + - US + - UK + FaxLineCreateRequest: + required: + - area_code + - country + properties: + area_code: + description: '_t__FaxLineCreate::AREA_CODE' + type: integer + country: + description: '_t__FaxLineCreate::COUNTRY' + type: string + enum: + - CA + - US + - UK + city: + description: '_t__FaxLineCreate::CITY' + type: string + account_id: + description: '_t__FaxLineCreate::ACCOUNT_ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + type: object + FaxLineDeleteRequest: + required: + - number + properties: + number: + description: '_t__FaxLineDelete::NUMBER' + type: string + type: object + FaxLineRemoveUserRequest: + required: + - number + properties: + number: + description: '_t__FaxLineRemoveUser::NUMBER' + type: string + account_id: + description: '_t__FaxLineRemoveUser::ACCOUNT_ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: '_t__FaxLineRemoveUser::EMAIL_ADDRESS' + type: string + format: email + type: object OAuthTokenGenerateRequest: required: - client_id @@ -8645,6 +9581,34 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxLineResponse: + properties: + fax_line: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true + FaxLineAreaCodeGetResponse: + properties: + area_codes: + type: array + items: + type: integer + type: object + x-internal-class: true + FaxLineListResponse: + properties: + list_info: + $ref: '#/components/schemas/ListInfoResponse' + fax_lines: + type: array + items: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FileResponse: properties: file_url: @@ -8976,6 +9940,23 @@ components: description: '_t__ErrorResponseError::ERROR_NAME' type: string type: object + FaxLineResponseFaxLine: + properties: + number: + description: '_t__FaxLineResponseFaxLine::NUMBER' + type: string + created_at: + description: '_t__FaxLineResponseFaxLine::CREATED_AT' + type: integer + updated_at: + description: '_t__FaxLineResponseFaxLine::UPDATED_AT' + type: integer + accounts: + type: array + items: + $ref: '#/components/schemas/AccountResponse' + type: object + x-internal-class: true ListInfoResponse: description: '_t__ListInfoResponse::DESCRIPTION' properties: @@ -10558,6 +11539,22 @@ components: summary: 'Default Example' value: $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json + FaxLineAddUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineAddUserRequestExample.json + FaxLineCreateRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineCreateRequestExample.json + FaxLineDeleteRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineDeleteRequestExample.json + FaxLineRemoveUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineRemoveUserRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -10802,6 +11799,18 @@ components: summary: '_t__Error::4XX' value: $ref: examples/json/Error4XXResponseExample.json + FaxLineResponseExample: + summary: '_t__FaxLineResponseExample::SUMMARY' + value: + $ref: examples/json/FaxLineResponseExample.json + FaxLineAreaCodeGetResponseExample: + summary: '_t__FaxLineAreaCodeGetResponseExample::SUMMARY' + value: + $ref: examples/json/FaxLineAreaCodeGetResponseExample.json + FaxLineListResponseExample: + summary: '_t__FaxLineListResponseExample::SUMMARY' + value: + $ref: examples/json/FaxLineListResponseExample.json ReportCreateResponseExample: summary: '_t__ReportCreateResponseExample::SUMMARY' value: @@ -11081,6 +12090,9 @@ tags: - name: 'Callbacks and Events' description: '_md__OpenApi::TAG::CALLBACKS_AND_EVENTS::DESCRIPTION' + - + name: 'Fax Line' + description: '_md__OpenApi::TAG::TAG_FAX_LINE::DESCRIPTION' externalDocs: description: 'Legacy API Reference' url: 'https://app.hellosign.com/api/reference' diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 9bf5a68ea..342ab7631 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,803 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + /fax_line/add_user: + put: + tags: + - 'Fax Line' + summary: 'Add Fax Line User' + description: 'Grants a user access to the specified Fax Line.' + operationId: faxLineAddUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAddUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineAddUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAddUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAddUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAddUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAddUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAddUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAddUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAddUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAddUser.sh + x-meta: + seo: + title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to add a user to an existing fax line, click here.' + /fax_line/area_codes: + get: + tags: + - 'Fax Line' + summary: 'Get Available Fax Line Area Codes' + description: 'Returns a response with the area codes available for a given state/provice and city.' + operationId: faxLineAreaCodeGet + parameters: + - + name: country + in: query + description: 'Filter area codes by country.' + required: true + schema: + type: string + enum: + - CA + - US + - UK + - + name: state + in: query + description: 'Filter area codes by state.' + schema: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + - + name: province + in: query + description: 'Filter area codes by province.' + schema: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + - + name: city + in: query + description: 'Filter area codes by city.' + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAreaCodeGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAreaCodeGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAreaCodeGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAreaCodeGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAreaCodeGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAreaCodeGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAreaCodeGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAreaCodeGet.sh + x-meta: + seo: + title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + /fax_line/create: + post: + tags: + - 'Fax Line' + summary: 'Purchase Fax Line' + description: 'Purchases a new Fax Line.' + operationId: faxLineCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineCreateRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineCreateRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineCreate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineCreate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineCreate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineCreate.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineCreate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineCreate.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineCreate.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineCreate.sh + x-meta: + seo: + title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + /fax_line: + get: + tags: + - 'Fax Line' + summary: 'Get Fax Line' + description: 'Returns the properties and settings of a Fax Line.' + operationId: faxLineGet + parameters: + - + name: number + in: query + description: 'The Fax Line number.' + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineGet.sh + x-meta: + seo: + title: 'Get Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here.' + delete: + tags: + - 'Fax Line' + summary: 'Delete Fax Line' + description: 'Deletes the specified Fax Line from the subscription.' + operationId: faxLineDelete + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineDeleteRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineDeleteRequestExample' + 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: {} + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineRemoveUser.sh + x-meta: + seo: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' /oauth/token: post: tags: @@ -6409,6 +7206,145 @@ components: type: boolean default: false type: object + FaxLineAddUserRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: 'Email address' + type: string + format: email + type: object + FaxLineAreaCodeGetStateEnum: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + FaxLineAreaCodeGetProvinceEnum: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + FaxLineAreaCodeGetCountryEnum: + type: string + enum: + - CA + - US + - UK + FaxLineCreateRequest: + required: + - area_code + - country + properties: + area_code: + description: 'Area code' + type: integer + country: + description: Country + type: string + enum: + - CA + - US + - UK + city: + description: City + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + type: object + FaxLineDeleteRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + type: object + FaxLineRemoveUserRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: 'Email address' + type: string + format: email + type: object OAuthTokenGenerateRequest: required: - client_id @@ -9253,6 +10189,34 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxLineResponse: + properties: + fax_line: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true + FaxLineAreaCodeGetResponse: + properties: + area_codes: + type: array + items: + type: integer + type: object + x-internal-class: true + FaxLineListResponse: + properties: + list_info: + $ref: '#/components/schemas/ListInfoResponse' + fax_lines: + type: array + items: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FileResponse: properties: file_url: @@ -9584,6 +10548,23 @@ components: description: 'Name of the error.' type: string type: object + FaxLineResponseFaxLine: + properties: + number: + description: Number + type: string + created_at: + description: 'Created at' + type: integer + updated_at: + description: 'Updated at' + type: integer + accounts: + type: array + items: + $ref: '#/components/schemas/AccountResponse' + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11350,6 +12331,22 @@ components: summary: 'Default Example' value: $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json + FaxLineAddUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineAddUserRequestExample.json + FaxLineCreateRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineCreateRequestExample.json + FaxLineDeleteRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineDeleteRequestExample.json + FaxLineRemoveUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineRemoveUserRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -11594,6 +12591,18 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxLineResponseExample: + summary: 'Sample Fax Line Response' + value: + $ref: examples/json/FaxLineResponseExample.json + FaxLineAreaCodeGetResponseExample: + summary: 'Sample Area Code Response' + value: + $ref: examples/json/FaxLineAreaCodeGetResponseExample.json + FaxLineListResponseExample: + summary: 'Sample Fax Line List Response' + value: + $ref: examples/json/FaxLineListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/openapi.yaml b/openapi.yaml index 63b2059ab..8a8f9f08f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1409,6 +1409,803 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + /fax_line/add_user: + put: + tags: + - 'Fax Line' + summary: 'Add Fax Line User' + description: 'Grants a user access to the specified Fax Line.' + operationId: faxLineAddUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAddUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineAddUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAddUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAddUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAddUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAddUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAddUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAddUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAddUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAddUser.sh + x-meta: + seo: + title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to add a user to an existing fax line, click here.' + /fax_line/area_codes: + get: + tags: + - 'Fax Line' + summary: 'Get Available Fax Line Area Codes' + description: 'Returns a response with the area codes available for a given state/provice and city.' + operationId: faxLineAreaCodeGet + parameters: + - + name: country + in: query + description: 'Filter area codes by country.' + required: true + schema: + type: string + enum: + - CA + - US + - UK + - + name: state + in: query + description: 'Filter area codes by state.' + schema: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + - + name: province + in: query + description: 'Filter area codes by province.' + schema: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + - + name: city + in: query + description: 'Filter area codes by city.' + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineAreaCodeGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineAreaCodeGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineAreaCodeGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineAreaCodeGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineAreaCodeGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineAreaCodeGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineAreaCodeGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineAreaCodeGet.sh + x-meta: + seo: + title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + /fax_line/create: + post: + tags: + - 'Fax Line' + summary: 'Purchase Fax Line' + description: 'Purchases a new Fax Line.' + operationId: faxLineCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineCreateRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineCreateRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineCreate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineCreate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineCreate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineCreate.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineCreate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineCreate.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineCreate.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineCreate.sh + x-meta: + seo: + title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + /fax_line: + get: + tags: + - 'Fax Line' + summary: 'Get Fax Line' + description: 'Returns the properties and settings of a Fax Line.' + operationId: faxLineGet + parameters: + - + name: number + in: query + description: 'The Fax Line number.' + required: true + schema: + type: string + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineGet.sh + x-meta: + seo: + title: 'Get Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here.' + delete: + tags: + - 'Fax Line' + summary: 'Delete Fax Line' + description: 'Deletes the specified Fax Line from the subscription.' + operationId: faxLineDelete + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineDeleteRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineDeleteRequestExample' + 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: {} + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineRemoveUser.sh + x-meta: + seo: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' /oauth/token: post: tags: @@ -6409,6 +7206,145 @@ components: type: boolean default: false type: object + FaxLineAddUserRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: 'Email address' + type: string + format: email + type: object + FaxLineAreaCodeGetStateEnum: + type: string + enum: + - AK + - AL + - AR + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - HI + - IA + - ID + - IL + - IN + - KS + - KY + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MS + - MT + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VT + - WA + - WI + - WV + - WY + FaxLineAreaCodeGetProvinceEnum: + type: string + enum: + - AB + - BC + - MB + - NB + - NL + - NT + - NS + - NU + - 'ON' + - PE + - QC + - SK + - YT + FaxLineAreaCodeGetCountryEnum: + type: string + enum: + - CA + - US + - UK + FaxLineCreateRequest: + required: + - area_code + - country + properties: + area_code: + description: 'Area code' + type: integer + country: + description: Country + type: string + enum: + - CA + - US + - UK + city: + description: City + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + type: object + FaxLineDeleteRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + type: object + FaxLineRemoveUserRequest: + required: + - number + properties: + number: + description: 'The Fax Line number.' + type: string + account_id: + description: 'Account ID' + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + email_address: + description: 'Email address' + type: string + format: email + type: object OAuthTokenGenerateRequest: required: - client_id @@ -9231,6 +10167,34 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxLineResponse: + properties: + fax_line: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true + FaxLineAreaCodeGetResponse: + properties: + area_codes: + type: array + items: + type: integer + type: object + x-internal-class: true + FaxLineListResponse: + properties: + list_info: + $ref: '#/components/schemas/ListInfoResponse' + fax_lines: + type: array + items: + $ref: '#/components/schemas/FaxLineResponseFaxLine' + warnings: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FileResponse: properties: file_url: @@ -9562,6 +10526,23 @@ components: description: 'Name of the error.' type: string type: object + FaxLineResponseFaxLine: + properties: + number: + description: Number + type: string + created_at: + description: 'Created at' + type: integer + updated_at: + description: 'Updated at' + type: integer + accounts: + type: array + items: + $ref: '#/components/schemas/AccountResponse' + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11328,6 +12309,22 @@ components: summary: 'Default Example' value: $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json + FaxLineAddUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineAddUserRequestExample.json + FaxLineCreateRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineCreateRequestExample.json + FaxLineDeleteRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineDeleteRequestExample.json + FaxLineRemoveUserRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxLineRemoveUserRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -11572,6 +12569,18 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxLineResponseExample: + summary: 'Sample Fax Line Response' + value: + $ref: examples/json/FaxLineResponseExample.json + FaxLineAreaCodeGetResponseExample: + summary: 'Sample Area Code Response' + value: + $ref: examples/json/FaxLineAreaCodeGetResponseExample.json + FaxLineListResponseExample: + summary: 'Sample Fax Line List Response' + value: + $ref: examples/json/FaxLineListResponseExample.json ReportCreateResponseExample: summary: Report value: @@ -11870,6 +12879,10 @@ tags: name: 'Callbacks and Events' description: $ref: ./markdown/en/tags/callbacks-tag-description.md + - + name: 'Fax Line' + description: + $ref: ./markdown/en/tags/fax-lines-tag-description.md externalDocs: description: 'Legacy API Reference' url: 'https://app.hellosign.com/api/reference' diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 19444f601..0146a5bcd 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -137,6 +137,13 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**BulkSendJobList**](docs/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**EmbeddedEditUrl**](docs/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**EmbeddedSignUrl**](docs/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxLineApi* | [**FaxLineAddUser**](docs/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User +*FaxLineApi* | [**FaxLineAreaCodeGet**](docs/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +*FaxLineApi* | [**FaxLineCreate**](docs/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line +*FaxLineApi* | [**FaxLineDelete**](docs/FaxLineApi.md#faxlinedelete) | **DELETE** /fax_line | Delete Fax Line +*FaxLineApi* | [**FaxLineGet**](docs/FaxLineApi.md#faxlineget) | **GET** /fax_line | Get Fax Line +*FaxLineApi* | [**FaxLineList**](docs/FaxLineApi.md#faxlinelist) | **GET** /fax_line/list | List Fax Lines +*FaxLineApi* | [**FaxLineRemoveUser**](docs/FaxLineApi.md#faxlineremoveuser) | **PUT** /fax_line/remove_user | Remove Fax Line Access *OAuthApi* | [**OauthTokenGenerate**](docs/OAuthApi.md#oauthtokengenerate) | **POST** /oauth/token | OAuth Token Generate *OAuthApi* | [**OauthTokenRefresh**](docs/OAuthApi.md#oauthtokenrefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh *ReportApi* | [**ReportCreate**](docs/ReportApi.md#reportcreate) | **POST** /report/create | Create Report @@ -220,6 +227,17 @@ Class | Method | HTTP request | Description - [Model.EventCallbackRequest](docs/EventCallbackRequest.md) - [Model.EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Model.EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Model.FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) + - [Model.FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) + - [Model.FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) + - [Model.FaxLineAreaCodeGetResponse](docs/FaxLineAreaCodeGetResponse.md) + - [Model.FaxLineAreaCodeGetStateEnum](docs/FaxLineAreaCodeGetStateEnum.md) + - [Model.FaxLineCreateRequest](docs/FaxLineCreateRequest.md) + - [Model.FaxLineDeleteRequest](docs/FaxLineDeleteRequest.md) + - [Model.FaxLineListResponse](docs/FaxLineListResponse.md) + - [Model.FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) + - [Model.FaxLineResponse](docs/FaxLineResponse.md) + - [Model.FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) - [Model.FileResponse](docs/FileResponse.md) - [Model.FileResponseDataUri](docs/FileResponseDataUri.md) - [Model.ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/dotnet/docs/FaxLineAddUserRequest.md b/sdks/dotnet/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..16d672e58 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineAddUserRequest.md @@ -0,0 +1,12 @@ +# Dropbox.Sign.Model.FaxLineAddUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Number** | **string** | The Fax Line number. | +**AccountId** | **string** | Account ID | [optional] +**EmailAddress** | **string** | Email address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/FaxLineApi.md b/sdks/dotnet/docs/FaxLineApi.md new file mode 100644 index 000000000..851341354 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineApi.md @@ -0,0 +1,665 @@ +# Dropbox.Sign.Api.FaxLineApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**FaxLineAddUser**](FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User | +| [**FaxLineAreaCodeGet**](FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +| [**FaxLineCreate**](FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line | +| [**FaxLineDelete**](FaxLineApi.md#faxlinedelete) | **DELETE** /fax_line | Delete Fax Line | +| [**FaxLineGet**](FaxLineApi.md#faxlineget) | **GET** /fax_line | Get Fax Line | +| [**FaxLineList**](FaxLineApi.md#faxlinelist) | **GET** /fax_line/list | List Fax Lines | +| [**FaxLineRemoveUser**](FaxLineApi.md#faxlineremoveuser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | + + +# **FaxLineAddUser** +> FaxLineResponse FaxLineAddUser (FaxLineAddUserRequest faxLineAddUserRequest) + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineAddUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var result = faxLineApi.FaxLineAddUser(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineAddUserWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Add Fax Line User + ApiResponse response = apiInstance.FaxLineAddUserWithHttpInfo(faxLineAddUserRequest); + 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 FaxLineApi.FaxLineAddUserWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + + +# **FaxLineAreaCodeGet** +> FaxLineAreaCodeGetResponse FaxLineAreaCodeGet (string country, string? state = null, string? province = null, string? city = null) + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineAreaCodeGet("US", "CA"); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineAreaCodeGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Available Fax Line Area Codes + ApiResponse response = apiInstance.FaxLineAreaCodeGetWithHttpInfo(country, state, province, city); + 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 FaxLineApi.FaxLineAreaCodeGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **country** | **string** | Filter area codes by country. | | +| **state** | **string?** | Filter area codes by state. | [optional] | +| **province** | **string?** | Filter area codes by province. | [optional] | +| **city** | **string?** | Filter area codes by city. | [optional] | + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxLineCreate** +> FaxLineResponse FaxLineCreate (FaxLineCreateRequest faxLineCreateRequest) + +Purchase Fax Line + +Purchases a new Fax Line. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineCreateRequest( + areaCode: 209, + country: "US" + ); + + try + { + var result = faxLineApi.FaxLineCreate(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineCreateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Purchase Fax Line + ApiResponse response = apiInstance.FaxLineCreateWithHttpInfo(faxLineCreateRequest); + 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 FaxLineApi.FaxLineCreateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxLineCreateRequest** | [**FaxLineCreateRequest**](FaxLineCreateRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + + +# **FaxLineDelete** +> void FaxLineDelete (FaxLineDeleteRequest faxLineDeleteRequest) + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineDeleteRequest( + number: "[FAX_NUMBER]", + ); + + try + { + faxLineApi.FaxLineDelete(data); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineDeleteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete Fax Line + apiInstance.FaxLineDeleteWithHttpInfo(faxLineDeleteRequest); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxLineApi.FaxLineDeleteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md) | | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + + +# **FaxLineGet** +> FaxLineResponse FaxLineGet (string number) + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineGet("[FAX_NUMBER]"); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Fax Line + ApiResponse response = apiInstance.FaxLineGetWithHttpInfo(number); + 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 FaxLineApi.FaxLineGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **number** | **string** | The Fax Line number. | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxLineList** +> FaxLineListResponse FaxLineList (string? accountId = null, int? page = null, int? pageSize = null, bool? showTeamLines = null) + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + try + { + var result = faxLineApi.FaxLineList(); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineListWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Fax Lines + ApiResponse response = apiInstance.FaxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + 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 FaxLineApi.FaxLineListWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **accountId** | **string?** | Account ID | [optional] | +| **page** | **int?** | Page | [optional] [default to 1] | +| **pageSize** | **int?** | Page size | [optional] [default to 20] | +| **showTeamLines** | **bool?** | Show team lines | [optional] | + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxLineRemoveUser** +> FaxLineResponse FaxLineRemoveUser (FaxLineRemoveUserRequest faxLineRemoveUserRequest) + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineApi = new FaxLineApi(config); + + var data = new FaxLineRemoveUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var result = faxLineApi.FaxLineRemoveUser(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxLineRemoveUserWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Remove Fax Line Access + ApiResponse response = apiInstance.FaxLineRemoveUserWithHttpInfo(faxLineRemoveUserRequest); + 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 FaxLineApi.FaxLineRemoveUserWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + diff --git a/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..fa6c2e31b --- /dev/null +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,9 @@ +# Dropbox.Sign.Model.FaxLineAreaCodeGetCountryEnum + +## 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/FaxLineAreaCodeGetProvinceEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..ad9e935c5 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,9 @@ +# Dropbox.Sign.Model.FaxLineAreaCodeGetProvinceEnum + +## 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/FaxLineAreaCodeGetResponse.md b/sdks/dotnet/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..297d51efd --- /dev/null +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxLineAreaCodeGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AreaCodes** | **List<int>** | | [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/FaxLineAreaCodeGetStateEnum.md b/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..f63df05ce --- /dev/null +++ b/sdks/dotnet/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,9 @@ +# Dropbox.Sign.Model.FaxLineAreaCodeGetStateEnum + +## 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/FaxLineCreateRequest.md b/sdks/dotnet/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..7c6b9b165 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineCreateRequest.md @@ -0,0 +1,13 @@ +# Dropbox.Sign.Model.FaxLineCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AreaCode** | **int** | Area code | +**Country** | **string** | Country | +**City** | **string** | City | [optional] +**AccountId** | **string** | Account 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/FaxLineDeleteRequest.md b/sdks/dotnet/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..673880d28 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineDeleteRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxLineDeleteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Number** | **string** | The Fax Line number. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/FaxLineListResponse.md b/sdks/dotnet/docs/FaxLineListResponse.md new file mode 100644 index 000000000..12550dc0b --- /dev/null +++ b/sdks/dotnet/docs/FaxLineListResponse.md @@ -0,0 +1,12 @@ +# Dropbox.Sign.Model.FaxLineListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | [optional] +**FaxLines** | [**List<FaxLineResponseFaxLine>**](FaxLineResponseFaxLine.md) | | [optional] +**Warnings** | [**WarningResponse**](WarningResponse.md) | | [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/FaxLineRemoveUserRequest.md b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..fa351fad7 --- /dev/null +++ b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,12 @@ +# Dropbox.Sign.Model.FaxLineRemoveUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Number** | **string** | The Fax Line number. | +**AccountId** | **string** | Account ID | [optional] +**EmailAddress** | **string** | Email address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/FaxLineResponse.md b/sdks/dotnet/docs/FaxLineResponse.md new file mode 100644 index 000000000..e19ae76cf --- /dev/null +++ b/sdks/dotnet/docs/FaxLineResponse.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.FaxLineResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FaxLine** | [**FaxLineResponseFaxLine**](FaxLineResponseFaxLine.md) | | [optional] +**Warnings** | [**WarningResponse**](WarningResponse.md) | | [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/FaxLineResponseFaxLine.md b/sdks/dotnet/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..66651431d --- /dev/null +++ b/sdks/dotnet/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,13 @@ +# Dropbox.Sign.Model.FaxLineResponseFaxLine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Number** | **string** | Number | [optional] +**CreatedAt** | **int** | Created at | [optional] +**UpdatedAt** | **int** | Updated at | [optional] +**Accounts** | [**List<AccountResponse>**](AccountResponse.md) | | [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/FaxLineApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs new file mode 100644 index 000000000..a391c6257 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs @@ -0,0 +1,1729 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.Sign.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxLineApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Add Fax Line User + /// + /// + /// Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + FaxLineResponse FaxLineAddUser(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0); + + /// + /// Add Fax Line User + /// + /// + /// Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + ApiResponse FaxLineAddUserWithHttpInfo(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0); + /// + /// Get Available Fax Line Area Codes + /// + /// + /// Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// FaxLineAreaCodeGetResponse + FaxLineAreaCodeGetResponse FaxLineAreaCodeGet(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0); + + /// + /// Get Available Fax Line Area Codes + /// + /// + /// Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// ApiResponse of FaxLineAreaCodeGetResponse + ApiResponse FaxLineAreaCodeGetWithHttpInfo(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0); + /// + /// Purchase Fax Line + /// + /// + /// Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + FaxLineResponse FaxLineCreate(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0); + + /// + /// Purchase Fax Line + /// + /// + /// Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + ApiResponse FaxLineCreateWithHttpInfo(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0); + /// + /// Delete Fax Line + /// + /// + /// Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void FaxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0); + + /// + /// Delete Fax Line + /// + /// + /// Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse FaxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0); + /// + /// Get Fax Line + /// + /// + /// Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// FaxLineResponse + FaxLineResponse FaxLineGet(string number, int operationIndex = 0); + + /// + /// Get Fax Line + /// + /// + /// Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + ApiResponse FaxLineGetWithHttpInfo(string number, int operationIndex = 0); + /// + /// List Fax Lines + /// + /// + /// Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// FaxLineListResponse + FaxLineListResponse FaxLineList(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0); + + /// + /// List Fax Lines + /// + /// + /// Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// ApiResponse of FaxLineListResponse + ApiResponse FaxLineListWithHttpInfo(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0); + /// + /// Remove Fax Line Access + /// + /// + /// Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + FaxLineResponse FaxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0); + + /// + /// Remove Fax Line Access + /// + /// + /// Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + ApiResponse FaxLineRemoveUserWithHttpInfo(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxLineApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Add Fax Line User + /// + /// + /// Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Add Fax Line User + /// + /// + /// Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Available Fax Line Area Codes + /// + /// + /// Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineAreaCodeGetResponse + System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Available Fax Line Area Codes + /// + /// + /// Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineAreaCodeGetResponse) + System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Purchase Fax Line + /// + /// + /// Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Purchase Fax Line + /// + /// + /// Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Fax Line + /// + /// + /// Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Fax Line + /// + /// + /// Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Fax Line + /// + /// + /// Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Fax Line + /// + /// + /// Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Fax Lines + /// + /// + /// Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineListResponse + System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Fax Lines + /// + /// + /// Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineListResponse) + System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Remove Fax Line Access + /// + /// + /// Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Remove Fax Line Access + /// + /// + /// Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxLineApi : IFaxLineApiSync, IFaxLineApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FaxLineApi : IFaxLineApi + { + private Dropbox.Sign.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxLineApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxLineApi(string basePath) + { + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + new Dropbox.Sign.Client.Configuration { BasePath = basePath } + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FaxLineApi(Dropbox.Sign.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FaxLineApi(Dropbox.Sign.Client.ISynchronousClient client, Dropbox.Sign.Client.IAsynchronousClient asyncClient, Dropbox.Sign.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Dropbox.Sign.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Dropbox.Sign.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Dropbox.Sign.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Add Fax Line User Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + public FaxLineResponse FaxLineAddUser(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineAddUserWithHttpInfo(faxLineAddUserRequest); + return localVarResponse.Data; + } + + /// + /// Add Fax Line User Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpInfo(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0) + { + // verify the required parameter 'faxLineAddUserRequest' is set + if (faxLineAddUserRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineAddUserRequest' when calling FaxLineApi->FaxLineAddUser"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineAddUserRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineAddUserRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAddUser"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/fax_line/add_user", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineAddUser", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Add Fax Line User Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + public async System.Threading.Tasks.Task FaxLineAddUserAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineAddUserWithHttpInfoAsync(faxLineAddUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Add Fax Line User Grants a user access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + public async System.Threading.Tasks.Task> FaxLineAddUserWithHttpInfoAsync(FaxLineAddUserRequest faxLineAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'faxLineAddUserRequest' is set + if (faxLineAddUserRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineAddUserRequest' when calling FaxLineApi->FaxLineAddUser"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineAddUserRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineAddUserRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAddUser"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/fax_line/add_user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineAddUser", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// FaxLineAreaCodeGetResponse + public FaxLineAreaCodeGetResponse FaxLineAreaCodeGet(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineAreaCodeGetWithHttpInfo(country, state, province, city); + return localVarResponse.Data; + } + + /// + /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// ApiResponse of FaxLineAreaCodeGetResponse + public Dropbox.Sign.Client.ApiResponse FaxLineAreaCodeGetWithHttpInfo(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0) + { + // verify the required parameter 'country' is set + if (country == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'country' when calling FaxLineApi->FaxLineAreaCodeGet"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "country", country)); + if (state != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "state", state)); + } + if (province != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "province", province)); + } + if (city != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "city", city)); + } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAreaCodeGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax_line/area_codes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineAreaCodeGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineAreaCodeGetResponse + public async System.Threading.Tasks.Task FaxLineAreaCodeGetAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineAreaCodeGetWithHttpInfoAsync(country, state, province, city, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// + /// Thrown when fails to make API call + /// Filter area codes by country. + /// Filter area codes by state. (optional) + /// Filter area codes by province. (optional) + /// Filter area codes by city. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineAreaCodeGetResponse) + public async System.Threading.Tasks.Task> FaxLineAreaCodeGetWithHttpInfoAsync(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'country' is set + if (country == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'country' when calling FaxLineApi->FaxLineAreaCodeGet"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "country", country)); + if (state != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "state", state)); + } + if (province != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "province", province)); + } + if (city != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "city", city)); + } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineAreaCodeGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax_line/area_codes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineAreaCodeGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Purchase Fax Line Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + public FaxLineResponse FaxLineCreate(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineCreateWithHttpInfo(faxLineCreateRequest); + return localVarResponse.Data; + } + + /// + /// Purchase Fax Line Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInfo(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0) + { + // verify the required parameter 'faxLineCreateRequest' is set + if (faxLineCreateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineCreateRequest' when calling FaxLineApi->FaxLineCreate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineCreateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineCreateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineCreate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/fax_line/create", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineCreate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Purchase Fax Line Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + public async System.Threading.Tasks.Task FaxLineCreateAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineCreateWithHttpInfoAsync(faxLineCreateRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Purchase Fax Line Purchases a new Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + public async System.Threading.Tasks.Task> FaxLineCreateWithHttpInfoAsync(FaxLineCreateRequest faxLineCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'faxLineCreateRequest' is set + if (faxLineCreateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineCreateRequest' when calling FaxLineApi->FaxLineCreate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineCreateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineCreateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineCreate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/fax_line/create", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineCreate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Fax Line Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void FaxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0) + { + FaxLineDeleteWithHttpInfo(faxLineDeleteRequest); + } + + /// + /// Delete Fax Line Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0) + { + // verify the required parameter 'faxLineDeleteRequest' is set + if (faxLineDeleteRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineDeleteRequest' when calling FaxLineApi->FaxLineDelete"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineDeleteRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineDeleteRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineDelete"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/fax_line", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Fax Line Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task FaxLineDeleteAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await FaxLineDeleteWithHttpInfoAsync(faxLineDeleteRequest, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete Fax Line Deletes the specified Fax Line from the subscription. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> FaxLineDeleteWithHttpInfoAsync(FaxLineDeleteRequest faxLineDeleteRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'faxLineDeleteRequest' is set + if (faxLineDeleteRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineDeleteRequest' when calling FaxLineApi->FaxLineDelete"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineDeleteRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineDeleteRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineDelete"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fax_line", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Line Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// FaxLineResponse + public FaxLineResponse FaxLineGet(string number, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineGetWithHttpInfo(number); + return localVarResponse.Data; + } + + /// + /// Get Fax Line Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(string number, int operationIndex = 0) + { + // verify the required parameter 'number' is set + if (number == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'number' when calling FaxLineApi->FaxLineGet"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "number", number)); + localVarRequestOptions.Operation = "FaxLineApi.FaxLineGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax_line", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Line Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + public async System.Threading.Tasks.Task FaxLineGetAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineGetWithHttpInfoAsync(number, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Fax Line Returns the properties and settings of a Fax Line. + /// + /// Thrown when fails to make API call + /// The Fax Line number. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + public async System.Threading.Tasks.Task> FaxLineGetWithHttpInfoAsync(string number, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'number' is set + if (number == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'number' when calling FaxLineApi->FaxLineGet"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "number", number)); + localVarRequestOptions.Operation = "FaxLineApi.FaxLineGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax_line", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Lines Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// FaxLineListResponse + public FaxLineListResponse FaxLineList(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + return localVarResponse.Data; + } + + /// + /// List Fax Lines Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// ApiResponse of FaxLineListResponse + public Dropbox.Sign.Client.ApiResponse FaxLineListWithHttpInfo(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0) + { + 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)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (showTeamLines != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "show_team_lines", showTeamLines)); + } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax_line/list", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Lines Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineListResponse + public async System.Threading.Tasks.Task FaxLineListAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineListWithHttpInfoAsync(accountId, page, pageSize, showTeamLines, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Fax Lines Returns the properties and settings of multiple Fax Lines. + /// + /// Thrown when fails to make API call + /// Account ID (optional) + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Show team lines (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineListResponse) + public async System.Threading.Tasks.Task> FaxLineListWithHttpInfoAsync(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(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)); + } + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (showTeamLines != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "show_team_lines", showTeamLines)); + } + localVarRequestOptions.Operation = "FaxLineApi.FaxLineList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax_line/list", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxLineResponse + public FaxLineResponse FaxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxLineRemoveUserWithHttpInfo(faxLineRemoveUserRequest); + return localVarResponse.Data; + } + + /// + /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxLineResponse + public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHttpInfo(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0) + { + // verify the required parameter 'faxLineRemoveUserRequest' is set + if (faxLineRemoveUserRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineRemoveUserRequest' when calling FaxLineApi->FaxLineRemoveUser"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineRemoveUserRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineRemoveUserRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineRemoveUser"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/fax_line/remove_user", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineRemoveUser", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxLineResponse + public async System.Threading.Tasks.Task FaxLineRemoveUserAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxLineRemoveUserWithHttpInfoAsync(faxLineRemoveUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxLineResponse) + public async System.Threading.Tasks.Task> FaxLineRemoveUserWithHttpInfoAsync(FaxLineRemoveUserRequest faxLineRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'faxLineRemoveUserRequest' is set + if (faxLineRemoveUserRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxLineRemoveUserRequest' when calling FaxLineApi->FaxLineRemoveUser"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxLineRemoveUserRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxLineRemoveUserRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Operation = "FaxLineApi.FaxLineRemoveUser"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/fax_line/remove_user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxLineRemoveUser", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs new file mode 100644 index 000000000..8ded1b15c --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLine.cs @@ -0,0 +1,241 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxLine + /// + [DataContract(Name = "FaxLine")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLine : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLine() { } + /// + /// Initializes a new instance of the class. + /// + /// Number. + /// Created at. + /// Updated at. + /// accounts. + public FaxLine(string number = default(string), string createdAt = default(string), string updatedAt = default(string), List accounts = default(List)) + { + + this.Number = number; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Accounts = accounts; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLine Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLine"); + } + + return obj; + } + + /// + /// Number + /// + /// Number + [DataMember(Name = "number", EmitDefaultValue = true)] + public string Number { get; set; } + + /// + /// Created at + /// + /// Created at + [DataMember(Name = "created_at", EmitDefaultValue = true)] + public string CreatedAt { get; set; } + + /// + /// Updated at + /// + /// Updated at + [DataMember(Name = "updated_at", EmitDefaultValue = true)] + public string UpdatedAt { get; set; } + + /// + /// Gets or Sets Accounts + /// + [DataMember(Name = "accounts", EmitDefaultValue = true)] + public List Accounts { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxLine {\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Accounts: ").Append(Accounts).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxLine); + } + + /// + /// Returns true if FaxLine instances are equal + /// + /// Instance of FaxLine to be compared + /// Boolean + public bool Equals(FaxLine input) + { + if (input == null) + { + return false; + } + return + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.Accounts == input.Accounts || + this.Accounts != null && + input.Accounts != null && + this.Accounts.SequenceEqual(input.Accounts) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Number != null) + { + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.Accounts != null) + { + hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "number", + Property = "Number", + Type = "string", + Value = Number, + }); + types.Add(new OpenApiType(){ + Name = "created_at", + Property = "CreatedAt", + Type = "string", + Value = CreatedAt, + }); + types.Add(new OpenApiType(){ + Name = "updated_at", + Property = "UpdatedAt", + Type = "string", + Value = UpdatedAt, + }); + types.Add(new OpenApiType(){ + Name = "accounts", + Property = "Accounts", + Type = "List", + Value = Accounts, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs new file mode 100644 index 000000000..3db56c254 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs @@ -0,0 +1,221 @@ +/* + * 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 +{ + /// + /// FaxLineAddUserRequest + /// + [DataContract(Name = "FaxLineAddUserRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineAddUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineAddUserRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The Fax Line number. (required). + /// Account ID. + /// Email address. + public FaxLineAddUserRequest(string number = default(string), string accountId = default(string), string emailAddress = default(string)) + { + + // to ensure "number" is required (not null) + if (number == null) + { + throw new ArgumentNullException("number is a required property for FaxLineAddUserRequest and cannot be null"); + } + this.Number = number; + this.AccountId = accountId; + this.EmailAddress = emailAddress; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineAddUserRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineAddUserRequest"); + } + + return obj; + } + + /// + /// The Fax Line number. + /// + /// The Fax Line number. + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] + public string Number { get; set; } + + /// + /// Account ID + /// + /// Account ID + [DataMember(Name = "account_id", EmitDefaultValue = true)] + public string AccountId { get; set; } + + /// + /// Email address + /// + /// Email address + [DataMember(Name = "email_address", EmitDefaultValue = true)] + public string EmailAddress { 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 FaxLineAddUserRequest {\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).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 FaxLineAddUserRequest); + } + + /// + /// Returns true if FaxLineAddUserRequest instances are equal + /// + /// Instance of FaxLineAddUserRequest to be compared + /// Boolean + public bool Equals(FaxLineAddUserRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this.AccountId == input.AccountId || + (this.AccountId != null && + this.AccountId.Equals(input.AccountId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Number != null) + { + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + } + if (this.AccountId != null) + { + hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "number", + Property = "Number", + Type = "string", + Value = Number, + }); + types.Add(new OpenApiType(){ + Name = "account_id", + Property = "AccountId", + Type = "string", + Value = AccountId, + }); + types.Add(new OpenApiType(){ + Name = "email_address", + Property = "EmailAddress", + Type = "string", + Value = EmailAddress, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.cs new file mode 100644 index 000000000..efea05942 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetCountryEnum.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 +{ + /// + /// Defines FaxLineAreaCodeGetCountryEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FaxLineAreaCodeGetCountryEnum + { + /// + /// Enum CA for value: CA + /// + [EnumMember(Value = "CA")] + CA = 1, + + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 2, + + /// + /// Enum UK for value: UK + /// + [EnumMember(Value = "UK")] + UK = 3 + + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs new file mode 100644 index 000000000..13c01beb4 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetProvinceEnum.cs @@ -0,0 +1,115 @@ +/* + * 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 +{ + /// + /// Defines FaxLineAreaCodeGetProvinceEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FaxLineAreaCodeGetProvinceEnum + { + /// + /// Enum AB for value: AB + /// + [EnumMember(Value = "AB")] + AB = 1, + + /// + /// Enum BC for value: BC + /// + [EnumMember(Value = "BC")] + BC = 2, + + /// + /// Enum MB for value: MB + /// + [EnumMember(Value = "MB")] + MB = 3, + + /// + /// Enum NB for value: NB + /// + [EnumMember(Value = "NB")] + NB = 4, + + /// + /// Enum NL for value: NL + /// + [EnumMember(Value = "NL")] + NL = 5, + + /// + /// Enum NT for value: NT + /// + [EnumMember(Value = "NT")] + NT = 6, + + /// + /// Enum NS for value: NS + /// + [EnumMember(Value = "NS")] + NS = 7, + + /// + /// Enum NU for value: NU + /// + [EnumMember(Value = "NU")] + NU = 8, + + /// + /// Enum ON for value: ON + /// + [EnumMember(Value = "ON")] + ON = 9, + + /// + /// Enum PE for value: PE + /// + [EnumMember(Value = "PE")] + PE = 10, + + /// + /// Enum QC for value: QC + /// + [EnumMember(Value = "QC")] + QC = 11, + + /// + /// Enum SK for value: SK + /// + [EnumMember(Value = "SK")] + SK = 12, + + /// + /// Enum YT for value: YT + /// + [EnumMember(Value = "YT")] + YT = 13 + + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs new file mode 100644 index 000000000..a00ff7e21 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetResponse.cs @@ -0,0 +1,166 @@ +/* + * 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 +{ + /// + /// FaxLineAreaCodeGetResponse + /// + [DataContract(Name = "FaxLineAreaCodeGetResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineAreaCodeGetResponse : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineAreaCodeGetResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// areaCodes. + public FaxLineAreaCodeGetResponse(List areaCodes = default(List)) + { + + this.AreaCodes = areaCodes; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineAreaCodeGetResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineAreaCodeGetResponse"); + } + + return obj; + } + + /// + /// Gets or Sets AreaCodes + /// + [DataMember(Name = "area_codes", EmitDefaultValue = true)] + public List AreaCodes { 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 FaxLineAreaCodeGetResponse {\n"); + sb.Append(" AreaCodes: ").Append(AreaCodes).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 FaxLineAreaCodeGetResponse); + } + + /// + /// Returns true if FaxLineAreaCodeGetResponse instances are equal + /// + /// Instance of FaxLineAreaCodeGetResponse to be compared + /// Boolean + public bool Equals(FaxLineAreaCodeGetResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.AreaCodes == input.AreaCodes || + this.AreaCodes != null && + input.AreaCodes != null && + this.AreaCodes.SequenceEqual(input.AreaCodes) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AreaCodes != null) + { + hashCode = (hashCode * 59) + this.AreaCodes.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "area_codes", + Property = "AreaCodes", + Type = "List", + Value = AreaCodes, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs new file mode 100644 index 000000000..b42d0e327 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAreaCodeGetStateEnum.cs @@ -0,0 +1,343 @@ +/* + * 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 +{ + /// + /// Defines FaxLineAreaCodeGetStateEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FaxLineAreaCodeGetStateEnum + { + /// + /// Enum AK for value: AK + /// + [EnumMember(Value = "AK")] + AK = 1, + + /// + /// Enum AL for value: AL + /// + [EnumMember(Value = "AL")] + AL = 2, + + /// + /// Enum AR for value: AR + /// + [EnumMember(Value = "AR")] + AR = 3, + + /// + /// Enum AZ for value: AZ + /// + [EnumMember(Value = "AZ")] + AZ = 4, + + /// + /// Enum CA for value: CA + /// + [EnumMember(Value = "CA")] + CA = 5, + + /// + /// Enum CO for value: CO + /// + [EnumMember(Value = "CO")] + CO = 6, + + /// + /// Enum CT for value: CT + /// + [EnumMember(Value = "CT")] + CT = 7, + + /// + /// Enum DC for value: DC + /// + [EnumMember(Value = "DC")] + DC = 8, + + /// + /// Enum DE for value: DE + /// + [EnumMember(Value = "DE")] + DE = 9, + + /// + /// Enum FL for value: FL + /// + [EnumMember(Value = "FL")] + FL = 10, + + /// + /// Enum GA for value: GA + /// + [EnumMember(Value = "GA")] + GA = 11, + + /// + /// Enum HI for value: HI + /// + [EnumMember(Value = "HI")] + HI = 12, + + /// + /// Enum IA for value: IA + /// + [EnumMember(Value = "IA")] + IA = 13, + + /// + /// Enum ID for value: ID + /// + [EnumMember(Value = "ID")] + ID = 14, + + /// + /// Enum IL for value: IL + /// + [EnumMember(Value = "IL")] + IL = 15, + + /// + /// Enum IN for value: IN + /// + [EnumMember(Value = "IN")] + IN = 16, + + /// + /// Enum KS for value: KS + /// + [EnumMember(Value = "KS")] + KS = 17, + + /// + /// Enum KY for value: KY + /// + [EnumMember(Value = "KY")] + KY = 18, + + /// + /// Enum LA for value: LA + /// + [EnumMember(Value = "LA")] + LA = 19, + + /// + /// Enum MA for value: MA + /// + [EnumMember(Value = "MA")] + MA = 20, + + /// + /// Enum MD for value: MD + /// + [EnumMember(Value = "MD")] + MD = 21, + + /// + /// Enum ME for value: ME + /// + [EnumMember(Value = "ME")] + ME = 22, + + /// + /// Enum MI for value: MI + /// + [EnumMember(Value = "MI")] + MI = 23, + + /// + /// Enum MN for value: MN + /// + [EnumMember(Value = "MN")] + MN = 24, + + /// + /// Enum MO for value: MO + /// + [EnumMember(Value = "MO")] + MO = 25, + + /// + /// Enum MS for value: MS + /// + [EnumMember(Value = "MS")] + MS = 26, + + /// + /// Enum MT for value: MT + /// + [EnumMember(Value = "MT")] + MT = 27, + + /// + /// Enum NC for value: NC + /// + [EnumMember(Value = "NC")] + NC = 28, + + /// + /// Enum ND for value: ND + /// + [EnumMember(Value = "ND")] + ND = 29, + + /// + /// Enum NE for value: NE + /// + [EnumMember(Value = "NE")] + NE = 30, + + /// + /// Enum NH for value: NH + /// + [EnumMember(Value = "NH")] + NH = 31, + + /// + /// Enum NJ for value: NJ + /// + [EnumMember(Value = "NJ")] + NJ = 32, + + /// + /// Enum NM for value: NM + /// + [EnumMember(Value = "NM")] + NM = 33, + + /// + /// Enum NV for value: NV + /// + [EnumMember(Value = "NV")] + NV = 34, + + /// + /// Enum NY for value: NY + /// + [EnumMember(Value = "NY")] + NY = 35, + + /// + /// Enum OH for value: OH + /// + [EnumMember(Value = "OH")] + OH = 36, + + /// + /// Enum OK for value: OK + /// + [EnumMember(Value = "OK")] + OK = 37, + + /// + /// Enum OR for value: OR + /// + [EnumMember(Value = "OR")] + OR = 38, + + /// + /// Enum PA for value: PA + /// + [EnumMember(Value = "PA")] + PA = 39, + + /// + /// Enum RI for value: RI + /// + [EnumMember(Value = "RI")] + RI = 40, + + /// + /// Enum SC for value: SC + /// + [EnumMember(Value = "SC")] + SC = 41, + + /// + /// Enum SD for value: SD + /// + [EnumMember(Value = "SD")] + SD = 42, + + /// + /// Enum TN for value: TN + /// + [EnumMember(Value = "TN")] + TN = 43, + + /// + /// Enum TX for value: TX + /// + [EnumMember(Value = "TX")] + TX = 44, + + /// + /// Enum UT for value: UT + /// + [EnumMember(Value = "UT")] + UT = 45, + + /// + /// Enum VA for value: VA + /// + [EnumMember(Value = "VA")] + VA = 46, + + /// + /// Enum VT for value: VT + /// + [EnumMember(Value = "VT")] + VT = 47, + + /// + /// Enum WA for value: WA + /// + [EnumMember(Value = "WA")] + WA = 48, + + /// + /// Enum WI for value: WI + /// + [EnumMember(Value = "WI")] + WI = 49, + + /// + /// Enum WV for value: WV + /// + [EnumMember(Value = "WV")] + WV = 50, + + /// + /// Enum WY for value: WY + /// + [EnumMember(Value = "WY")] + WY = 51 + + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs new file mode 100644 index 000000000..db1aaf944 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs @@ -0,0 +1,260 @@ +/* + * 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 +{ + /// + /// FaxLineCreateRequest + /// + [DataContract(Name = "FaxLineCreateRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineCreateRequest : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Country + /// + /// Country + [JsonConverter(typeof(StringEnumConverter))] + public enum CountryEnum + { + /// + /// Enum CA for value: CA + /// + [EnumMember(Value = "CA")] + CA = 1, + + /// + /// Enum US for value: US + /// + [EnumMember(Value = "US")] + US = 2, + + /// + /// Enum UK for value: UK + /// + [EnumMember(Value = "UK")] + UK = 3 + + } + + + /// + /// Country + /// + /// Country + [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)] + public CountryEnum Country { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineCreateRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Area code (required). + /// Country (required). + /// City. + /// Account ID. + public FaxLineCreateRequest(int areaCode = default(int), CountryEnum country = default(CountryEnum), string city = default(string), string accountId = default(string)) + { + + this.AreaCode = areaCode; + this.Country = country; + this.City = city; + this.AccountId = accountId; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineCreateRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineCreateRequest"); + } + + return obj; + } + + /// + /// Area code + /// + /// Area code + [DataMember(Name = "area_code", IsRequired = true, EmitDefaultValue = true)] + public int AreaCode { get; set; } + + /// + /// City + /// + /// City + [DataMember(Name = "city", EmitDefaultValue = true)] + public string City { get; set; } + + /// + /// Account ID + /// + /// Account ID + [DataMember(Name = "account_id", EmitDefaultValue = true)] + public string AccountId { 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 FaxLineCreateRequest {\n"); + sb.Append(" AreaCode: ").Append(AreaCode).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).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 FaxLineCreateRequest); + } + + /// + /// Returns true if FaxLineCreateRequest instances are equal + /// + /// Instance of FaxLineCreateRequest to be compared + /// Boolean + public bool Equals(FaxLineCreateRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.AreaCode == input.AreaCode || + this.AreaCode.Equals(input.AreaCode) + ) && + ( + this.Country == input.Country || + this.Country.Equals(input.Country) + ) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.AccountId == input.AccountId || + (this.AccountId != null && + this.AccountId.Equals(input.AccountId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.AreaCode.GetHashCode(); + hashCode = (hashCode * 59) + this.Country.GetHashCode(); + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.AccountId != null) + { + hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "area_code", + Property = "AreaCode", + Type = "int", + Value = AreaCode, + }); + types.Add(new OpenApiType(){ + Name = "country", + Property = "Country", + Type = "string", + Value = Country, + }); + types.Add(new OpenApiType(){ + Name = "city", + Property = "City", + Type = "string", + Value = City, + }); + types.Add(new OpenApiType(){ + Name = "account_id", + Property = "AccountId", + Type = "string", + Value = AccountId, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs new file mode 100644 index 000000000..6c3daabad --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs @@ -0,0 +1,171 @@ +/* + * 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 +{ + /// + /// FaxLineDeleteRequest + /// + [DataContract(Name = "FaxLineDeleteRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineDeleteRequest : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineDeleteRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The Fax Line number. (required). + public FaxLineDeleteRequest(string number = default(string)) + { + + // to ensure "number" is required (not null) + if (number == null) + { + throw new ArgumentNullException("number is a required property for FaxLineDeleteRequest and cannot be null"); + } + this.Number = number; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineDeleteRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineDeleteRequest"); + } + + return obj; + } + + /// + /// The Fax Line number. + /// + /// The Fax Line number. + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] + public string Number { 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 FaxLineDeleteRequest {\n"); + sb.Append(" Number: ").Append(Number).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 FaxLineDeleteRequest); + } + + /// + /// Returns true if FaxLineDeleteRequest instances are equal + /// + /// Instance of FaxLineDeleteRequest to be compared + /// Boolean + public bool Equals(FaxLineDeleteRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Number != null) + { + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "number", + Property = "Number", + Type = "string", + Value = Number, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs new file mode 100644 index 000000000..d4ea8bab0 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineListResponse.cs @@ -0,0 +1,214 @@ +/* + * 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 +{ + /// + /// FaxLineListResponse + /// + [DataContract(Name = "FaxLineListResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineListResponse : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineListResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// listInfo. + /// faxLines. + /// warnings. + public FaxLineListResponse(ListInfoResponse listInfo = default(ListInfoResponse), List faxLines = default(List), WarningResponse warnings = default(WarningResponse)) + { + + this.ListInfo = listInfo; + this.FaxLines = faxLines; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineListResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineListResponse"); + } + + return obj; + } + + /// + /// Gets or Sets ListInfo + /// + [DataMember(Name = "list_info", EmitDefaultValue = true)] + public ListInfoResponse ListInfo { get; set; } + + /// + /// Gets or Sets FaxLines + /// + [DataMember(Name = "fax_lines", EmitDefaultValue = true)] + public List FaxLines { get; set; } + + /// + /// Gets or Sets Warnings + /// + [DataMember(Name = "warnings", EmitDefaultValue = true)] + public WarningResponse 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 FaxLineListResponse {\n"); + sb.Append(" ListInfo: ").Append(ListInfo).Append("\n"); + sb.Append(" FaxLines: ").Append(FaxLines).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 FaxLineListResponse); + } + + /// + /// Returns true if FaxLineListResponse instances are equal + /// + /// Instance of FaxLineListResponse to be compared + /// Boolean + public bool Equals(FaxLineListResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.ListInfo == input.ListInfo || + (this.ListInfo != null && + this.ListInfo.Equals(input.ListInfo)) + ) && + ( + this.FaxLines == input.FaxLines || + this.FaxLines != null && + input.FaxLines != null && + this.FaxLines.SequenceEqual(input.FaxLines) + ) && + ( + this.Warnings == input.Warnings || + (this.Warnings != null && + this.Warnings.Equals(input.Warnings)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ListInfo != null) + { + hashCode = (hashCode * 59) + this.ListInfo.GetHashCode(); + } + if (this.FaxLines != null) + { + hashCode = (hashCode * 59) + this.FaxLines.GetHashCode(); + } + if (this.Warnings != null) + { + hashCode = (hashCode * 59) + this.Warnings.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "list_info", + Property = "ListInfo", + Type = "ListInfoResponse", + Value = ListInfo, + }); + types.Add(new OpenApiType(){ + Name = "fax_lines", + Property = "FaxLines", + Type = "List", + Value = FaxLines, + }); + types.Add(new OpenApiType(){ + Name = "warnings", + Property = "Warnings", + Type = "WarningResponse", + Value = Warnings, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs new file mode 100644 index 000000000..ddac6924d --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs @@ -0,0 +1,221 @@ +/* + * 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 +{ + /// + /// FaxLineRemoveUserRequest + /// + [DataContract(Name = "FaxLineRemoveUserRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineRemoveUserRequest : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineRemoveUserRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The Fax Line number. (required). + /// Account ID. + /// Email address. + public FaxLineRemoveUserRequest(string number = default(string), string accountId = default(string), string emailAddress = default(string)) + { + + // to ensure "number" is required (not null) + if (number == null) + { + throw new ArgumentNullException("number is a required property for FaxLineRemoveUserRequest and cannot be null"); + } + this.Number = number; + this.AccountId = accountId; + this.EmailAddress = emailAddress; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineRemoveUserRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineRemoveUserRequest"); + } + + return obj; + } + + /// + /// The Fax Line number. + /// + /// The Fax Line number. + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] + public string Number { get; set; } + + /// + /// Account ID + /// + /// Account ID + [DataMember(Name = "account_id", EmitDefaultValue = true)] + public string AccountId { get; set; } + + /// + /// Email address + /// + /// Email address + [DataMember(Name = "email_address", EmitDefaultValue = true)] + public string EmailAddress { 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 FaxLineRemoveUserRequest {\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).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 FaxLineRemoveUserRequest); + } + + /// + /// Returns true if FaxLineRemoveUserRequest instances are equal + /// + /// Instance of FaxLineRemoveUserRequest to be compared + /// Boolean + public bool Equals(FaxLineRemoveUserRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this.AccountId == input.AccountId || + (this.AccountId != null && + this.AccountId.Equals(input.AccountId)) + ) && + ( + this.EmailAddress == input.EmailAddress || + (this.EmailAddress != null && + this.EmailAddress.Equals(input.EmailAddress)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Number != null) + { + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + } + if (this.AccountId != null) + { + hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); + } + if (this.EmailAddress != null) + { + hashCode = (hashCode * 59) + this.EmailAddress.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "number", + Property = "Number", + Type = "string", + Value = Number, + }); + types.Add(new OpenApiType(){ + Name = "account_id", + Property = "AccountId", + Type = "string", + Value = AccountId, + }); + types.Add(new OpenApiType(){ + Name = "email_address", + Property = "EmailAddress", + Type = "string", + Value = EmailAddress, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs new file mode 100644 index 000000000..f40fa3a10 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponse.cs @@ -0,0 +1,189 @@ +/* + * 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 +{ + /// + /// FaxLineResponse + /// + [DataContract(Name = "FaxLineResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineResponse : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// faxLine. + /// warnings. + public FaxLineResponse(FaxLineResponseFaxLine faxLine = default(FaxLineResponseFaxLine), WarningResponse warnings = default(WarningResponse)) + { + + this.FaxLine = faxLine; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineResponse"); + } + + return obj; + } + + /// + /// Gets or Sets FaxLine + /// + [DataMember(Name = "fax_line", EmitDefaultValue = true)] + public FaxLineResponseFaxLine FaxLine { get; set; } + + /// + /// Gets or Sets Warnings + /// + [DataMember(Name = "warnings", EmitDefaultValue = true)] + public WarningResponse 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 FaxLineResponse {\n"); + sb.Append(" FaxLine: ").Append(FaxLine).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 FaxLineResponse); + } + + /// + /// Returns true if FaxLineResponse instances are equal + /// + /// Instance of FaxLineResponse to be compared + /// Boolean + public bool Equals(FaxLineResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.FaxLine == input.FaxLine || + (this.FaxLine != null && + this.FaxLine.Equals(input.FaxLine)) + ) && + ( + this.Warnings == input.Warnings || + (this.Warnings != null && + this.Warnings.Equals(input.Warnings)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FaxLine != null) + { + hashCode = (hashCode * 59) + this.FaxLine.GetHashCode(); + } + if (this.Warnings != null) + { + hashCode = (hashCode * 59) + this.Warnings.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "fax_line", + Property = "FaxLine", + Type = "FaxLineResponseFaxLine", + Value = FaxLine, + }); + types.Add(new OpenApiType(){ + Name = "warnings", + Property = "Warnings", + Type = "WarningResponse", + Value = Warnings, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs new file mode 100644 index 000000000..e2367660b --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineResponseFaxLine.cs @@ -0,0 +1,233 @@ +/* + * 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 +{ + /// + /// FaxLineResponseFaxLine + /// + [DataContract(Name = "FaxLineResponseFaxLine")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxLineResponseFaxLine : IOpenApiTyped, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxLineResponseFaxLine() { } + /// + /// Initializes a new instance of the class. + /// + /// Number. + /// Created at. + /// Updated at. + /// accounts. + public FaxLineResponseFaxLine(string number = default(string), int createdAt = default(int), int updatedAt = default(int), List accounts = default(List)) + { + + this.Number = number; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Accounts = accounts; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxLineResponseFaxLine Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxLineResponseFaxLine"); + } + + return obj; + } + + /// + /// Number + /// + /// Number + [DataMember(Name = "number", EmitDefaultValue = true)] + public string Number { get; set; } + + /// + /// Created at + /// + /// Created at + [DataMember(Name = "created_at", EmitDefaultValue = true)] + public int CreatedAt { get; set; } + + /// + /// Updated at + /// + /// Updated at + [DataMember(Name = "updated_at", EmitDefaultValue = true)] + public int UpdatedAt { get; set; } + + /// + /// Gets or Sets Accounts + /// + [DataMember(Name = "accounts", EmitDefaultValue = true)] + public List Accounts { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxLineResponseFaxLine {\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Accounts: ").Append(Accounts).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxLineResponseFaxLine); + } + + /// + /// Returns true if FaxLineResponseFaxLine instances are equal + /// + /// Instance of FaxLineResponseFaxLine to be compared + /// Boolean + public bool Equals(FaxLineResponseFaxLine input) + { + if (input == null) + { + return false; + } + return + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this.CreatedAt == input.CreatedAt || + this.CreatedAt.Equals(input.CreatedAt) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + this.UpdatedAt.Equals(input.UpdatedAt) + ) && + ( + this.Accounts == input.Accounts || + this.Accounts != null && + input.Accounts != null && + this.Accounts.SequenceEqual(input.Accounts) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Number != null) + { + hashCode = (hashCode * 59) + this.Number.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + if (this.Accounts != null) + { + hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); + } + return hashCode; + } + } + + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType(){ + Name = "number", + Property = "Number", + Type = "string", + Value = Number, + }); + types.Add(new OpenApiType(){ + Name = "created_at", + Property = "CreatedAt", + Type = "int", + Value = CreatedAt, + }); + types.Add(new OpenApiType(){ + Name = "updated_at", + Property = "UpdatedAt", + Type = "int", + Value = UpdatedAt, + }); + types.Add(new OpenApiType(){ + Name = "accounts", + Property = "Accounts", + Type = "List", + Value = Accounts, + }); + + return types; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 228374aac..931df72c5 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -178,6 +178,13 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**bulkSendJobList**](docs/BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**embeddedEditUrl**](docs/EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**embeddedSignUrl**](docs/EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxLineApi* | [**faxLineAddUser**](docs/FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User +*FaxLineApi* | [**faxLineAreaCodeGet**](docs/FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +*FaxLineApi* | [**faxLineCreate**](docs/FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line +*FaxLineApi* | [**faxLineDelete**](docs/FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line +*FaxLineApi* | [**faxLineGet**](docs/FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line +*FaxLineApi* | [**faxLineList**](docs/FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines +*FaxLineApi* | [**faxLineRemoveUser**](docs/FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access *OAuthApi* | [**oauthTokenGenerate**](docs/OAuthApi.md#oauthTokenGenerate) | **POST** /oauth/token | OAuth Token Generate *OAuthApi* | [**oauthTokenRefresh**](docs/OAuthApi.md#oauthTokenRefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh *ReportApi* | [**reportCreate**](docs/ReportApi.md#reportCreate) | **POST** /report/create | Create Report @@ -260,6 +267,17 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) + - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) + - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) + - [FaxLineAreaCodeGetResponse](docs/FaxLineAreaCodeGetResponse.md) + - [FaxLineAreaCodeGetStateEnum](docs/FaxLineAreaCodeGetStateEnum.md) + - [FaxLineCreateRequest](docs/FaxLineCreateRequest.md) + - [FaxLineDeleteRequest](docs/FaxLineDeleteRequest.md) + - [FaxLineListResponse](docs/FaxLineListResponse.md) + - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) + - [FaxLineResponse](docs/FaxLineResponse.md) + - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/java-v1/docs/FaxLineAddUserRequest.md b/sdks/java-v1/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..011d4d047 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAddUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineAddUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `accountId` | ```String``` | Account ID | | +| `emailAddress` | ```String``` | Email address | | + + + diff --git a/sdks/java-v1/docs/FaxLineApi.md b/sdks/java-v1/docs/FaxLineApi.md new file mode 100644 index 000000000..7f1202cf5 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineApi.md @@ -0,0 +1,504 @@ +# FaxLineApi + +All URIs are relative to *https://api.hellosign.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**faxLineAddUser**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User +[**faxLineAreaCodeGet**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +[**faxLineCreate**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line +[**faxLineDelete**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line +[**faxLineGet**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line +[**faxLineList**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines +[**faxLineRemoveUser**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access + + + +## faxLineAddUser + +> FaxLineResponse faxLineAddUser(faxLineAddUserRequest) + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineAddUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineAddUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineAreaCodeGet + +> FaxLineAreaCodeGetResponse faxLineAreaCodeGet(country, state, province, city) + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **country** | **String**| Filter area codes by country. | [enum: CA, US, UK] + **state** | **String**| Filter area codes by state. | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] + **province** | **String**| Filter area codes by province. | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] + **city** | **String**| Filter area codes by city. | [optional] + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineCreate + +> FaxLineResponse faxLineCreate(faxLineCreateRequest) + +Purchase Fax Line + +Purchases a new Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineCreateRequest() + .areaCode(209) + .country("US"); + + try { + FaxLineResponse result = faxLineApi.faxLineCreate(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineCreateRequest** | [**FaxLineCreateRequest**](FaxLineCreateRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineDelete + +> faxLineDelete(faxLineDeleteRequest) + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineDeleteRequest() + .number("[FAX_NUMBER]"); + + try { + faxLineApi.faxLineDelete(data); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineGet + +> FaxLineResponse faxLineGet(number) + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **String**| The Fax Line number. | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineList + +> FaxLineListResponse faxLineList(accountId, page, pageSize, showTeamLines) + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineListResponse result = faxLineApi.faxLineList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID | [optional] + **page** | **Integer**| Page | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + **showTeamLines** | **Boolean**| Show team lines | [optional] + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineRemoveUser + +> FaxLineResponse faxLineRemoveUser(faxLineRemoveUserRequest) + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineRemoveUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineRemoveUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..10275bc6c --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,15 @@ + + +# FaxLineAreaCodeGetCountryEnum + +## Enum + + +* `CA` (value: `"CA"`) + +* `US` (value: `"US"`) + +* `UK` (value: `"UK"`) + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..13cf50078 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,35 @@ + + +# FaxLineAreaCodeGetProvinceEnum + +## Enum + + +* `AB` (value: `"AB"`) + +* `BC` (value: `"BC"`) + +* `MB` (value: `"MB"`) + +* `NB` (value: `"NB"`) + +* `NL` (value: `"NL"`) + +* `NT` (value: `"NT"`) + +* `NS` (value: `"NS"`) + +* `NU` (value: `"NU"`) + +* `ON` (value: `"ON"`) + +* `PE` (value: `"PE"`) + +* `QC` (value: `"QC"`) + +* `SK` (value: `"SK"`) + +* `YT` (value: `"YT"`) + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md b/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..c77456fec --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,14 @@ + + +# FaxLineAreaCodeGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCodes` | ```List``` | | | + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..577a48c63 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,111 @@ + + +# FaxLineAreaCodeGetStateEnum + +## Enum + + +* `AK` (value: `"AK"`) + +* `AL` (value: `"AL"`) + +* `AR` (value: `"AR"`) + +* `AZ` (value: `"AZ"`) + +* `CA` (value: `"CA"`) + +* `CO` (value: `"CO"`) + +* `CT` (value: `"CT"`) + +* `DC` (value: `"DC"`) + +* `DE` (value: `"DE"`) + +* `FL` (value: `"FL"`) + +* `GA` (value: `"GA"`) + +* `HI` (value: `"HI"`) + +* `IA` (value: `"IA"`) + +* `ID` (value: `"ID"`) + +* `IL` (value: `"IL"`) + +* `IN` (value: `"IN"`) + +* `KS` (value: `"KS"`) + +* `KY` (value: `"KY"`) + +* `LA` (value: `"LA"`) + +* `MA` (value: `"MA"`) + +* `MD` (value: `"MD"`) + +* `ME` (value: `"ME"`) + +* `MI` (value: `"MI"`) + +* `MN` (value: `"MN"`) + +* `MO` (value: `"MO"`) + +* `MS` (value: `"MS"`) + +* `MT` (value: `"MT"`) + +* `NC` (value: `"NC"`) + +* `ND` (value: `"ND"`) + +* `NE` (value: `"NE"`) + +* `NH` (value: `"NH"`) + +* `NJ` (value: `"NJ"`) + +* `NM` (value: `"NM"`) + +* `NV` (value: `"NV"`) + +* `NY` (value: `"NY"`) + +* `OH` (value: `"OH"`) + +* `OK` (value: `"OK"`) + +* `OR` (value: `"OR"`) + +* `PA` (value: `"PA"`) + +* `RI` (value: `"RI"`) + +* `SC` (value: `"SC"`) + +* `SD` (value: `"SD"`) + +* `TN` (value: `"TN"`) + +* `TX` (value: `"TX"`) + +* `UT` (value: `"UT"`) + +* `VA` (value: `"VA"`) + +* `VT` (value: `"VT"`) + +* `WA` (value: `"WA"`) + +* `WI` (value: `"WI"`) + +* `WV` (value: `"WV"`) + +* `WY` (value: `"WY"`) + + + diff --git a/sdks/java-v1/docs/FaxLineCreateRequest.md b/sdks/java-v1/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..d0be5225c --- /dev/null +++ b/sdks/java-v1/docs/FaxLineCreateRequest.md @@ -0,0 +1,27 @@ + + +# FaxLineCreateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCode`*_required_ | ```Integer``` | Area code | | +| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country | | +| `city` | ```String``` | City | | +| `accountId` | ```String``` | Account ID | | + + + +## Enum: CountryEnum + +Name | Value +---- | ----- +| CA | "CA" | +| US | "US" | +| UK | "UK" | + + + diff --git a/sdks/java-v1/docs/FaxLineDeleteRequest.md b/sdks/java-v1/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..d00dac614 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineDeleteRequest.md @@ -0,0 +1,14 @@ + + +# FaxLineDeleteRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | + + + diff --git a/sdks/java-v1/docs/FaxLineListResponse.md b/sdks/java-v1/docs/FaxLineListResponse.md new file mode 100644 index 000000000..4f01f2fd3 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineListResponse.md @@ -0,0 +1,16 @@ + + +# FaxLineListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `listInfo` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `faxLines` | [```List```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..f353fdee6 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineRemoveUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `accountId` | ```String``` | Account ID | | +| `emailAddress` | ```String``` | Email address | | + + + diff --git a/sdks/java-v1/docs/FaxLineResponse.md b/sdks/java-v1/docs/FaxLineResponse.md new file mode 100644 index 000000000..d9a67d41f --- /dev/null +++ b/sdks/java-v1/docs/FaxLineResponse.md @@ -0,0 +1,15 @@ + + +# FaxLineResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxLine` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxLineResponseFaxLine.md b/sdks/java-v1/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..caa5e07e2 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,17 @@ + + +# FaxLineResponseFaxLine + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number` | ```String``` | Number | | +| `createdAt` | ```Integer``` | Created at | | +| `updatedAt` | ```Integer``` | Updated at | | +| `accounts` | [```List```](AccountResponse.md) | | | + + + diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java new file mode 100644 index 000000000..ed7a821cc --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -0,0 +1,745 @@ +package com.dropbox.sign.api; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.ApiClient; +import com.dropbox.sign.ApiResponse; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.Pair; + +import javax.ws.rs.core.GenericType; + +import com.dropbox.sign.model.ErrorResponse; +import com.dropbox.sign.model.FaxLineAddUserRequest; +import com.dropbox.sign.model.FaxLineAreaCodeGetResponse; +import com.dropbox.sign.model.FaxLineCreateRequest; +import com.dropbox.sign.model.FaxLineDeleteRequest; +import com.dropbox.sign.model.FaxLineListResponse; +import com.dropbox.sign.model.FaxLineRemoveUserRequest; +import com.dropbox.sign.model.FaxLineResponse; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineApi { + private ApiClient apiClient; + + public FaxLineApi() { + this(Configuration.getDefaultApiClient()); + } + + public FaxLineApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add Fax Line User + * Grants a user access to the specified Fax Line. + * @param faxLineAddUserRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserRequest) throws ApiException { + return faxLineAddUserWithHttpInfo(faxLineAddUserRequest).getData(); + } + + + /** + * Add Fax Line User + * Grants a user access to the specified Fax Line. + * @param faxLineAddUserRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineAddUserWithHttpInfo(FaxLineAddUserRequest faxLineAddUserRequest) throws ApiException { + + Object localVarPostBody = faxLineAddUserRequest; + + // verify the required parameter 'faxLineAddUserRequest' is set + if (faxLineAddUserRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineAddUserRequest' when calling faxLineAddUser"); + } + + // create path and map variables + String localVarPath = "/fax_line/add_user"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineAddUserRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineAddUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Get Available Fax Line Area Codes + * Returns a response with the area codes available for a given state/provice and city. + * @param country Filter area codes by country. (required) + * @param state Filter area codes by state. (optional) + * @param province Filter area codes by province. (optional) + * @param city Filter area codes by city. (optional) + * @return FaxLineAreaCodeGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state, String province, String city) throws ApiException { + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country) throws ApiException { + String state = null; + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country) throws ApiException { + String state = null; + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state) throws ApiException { + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state) throws ApiException { + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state, String province) throws ApiException { + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state, String province) throws ApiException { + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + + /** + * Get Available Fax Line Area Codes + * Returns a response with the area codes available for a given state/provice and city. + * @param country Filter area codes by country. (required) + * @param state Filter area codes by state. (optional) + * @param province Filter area codes by province. (optional) + * @param city Filter area codes by city. (optional) + * @return ApiResponse<FaxLineAreaCodeGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state, String province, String city) throws ApiException { + + Object localVarPostBody = null; + + // verify the required parameter 'country' is set + if (country == null) { + throw new ApiException(400, "Missing the required parameter 'country' when calling faxLineAreaCodeGet"); + } + + // create path and map variables + String localVarPath = "/fax_line/area_codes"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "country", country)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "state", state)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "province", province)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "city", city)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineAreaCodeGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Purchase Fax Line + * Purchases a new Fax Line. + * @param faxLineCreateRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) throws ApiException { + return faxLineCreateWithHttpInfo(faxLineCreateRequest).getData(); + } + + + /** + * Purchase Fax Line + * Purchases a new Fax Line. + * @param faxLineCreateRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineCreateWithHttpInfo(FaxLineCreateRequest faxLineCreateRequest) throws ApiException { + + Object localVarPostBody = faxLineCreateRequest; + + // verify the required parameter 'faxLineCreateRequest' is set + if (faxLineCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineCreateRequest' when calling faxLineCreate"); + } + + // create path and map variables + String localVarPath = "/fax_line/create"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineCreateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineCreate", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete Fax Line + * Deletes the specified Fax Line from the subscription. + * @param faxLineDeleteRequest (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiException { + faxLineDeleteWithHttpInfo(faxLineDeleteRequest); + } + + + /** + * Delete Fax Line + * Deletes the specified Fax Line from the subscription. + * @param faxLineDeleteRequest (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiException { + + Object localVarPostBody = faxLineDeleteRequest; + + // verify the required parameter 'faxLineDeleteRequest' is set + if (faxLineDeleteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineDeleteRequest' when calling faxLineDelete"); + } + + // create path and map variables + String localVarPath = "/fax_line"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineDeleteRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + return apiClient.invokeAPI("FaxLineApi.faxLineDelete", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get Fax Line + * Returns the properties and settings of a Fax Line. + * @param number The Fax Line number. (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineGet(String number) throws ApiException { + return faxLineGetWithHttpInfo(number).getData(); + } + + + /** + * Get Fax Line + * Returns the properties and settings of a Fax Line. + * @param number The Fax Line number. (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineGetWithHttpInfo(String number) throws ApiException { + + Object localVarPostBody = null; + + // verify the required parameter 'number' is set + if (number == null) { + throw new ApiException(400, "Missing the required parameter 'number' when calling faxLineGet"); + } + + // create path and map variables + String localVarPath = "/fax_line"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "number", number)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * List Fax Lines + * Returns the properties and settings of multiple Fax Lines. + * @param accountId Account ID (optional) + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param showTeamLines Show team lines (optional) + * @return FaxLineListResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineListResponse faxLineList(String accountId, Integer page, Integer pageSize, Boolean showTeamLines) throws ApiException { + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList() throws ApiException { + String accountId = null; + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo() throws ApiException { + String accountId = null; + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId) throws ApiException { + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId) throws ApiException { + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId, Integer page) throws ApiException { + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page) throws ApiException { + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId, Integer page, Integer pageSize) throws ApiException { + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page, Integer pageSize) throws ApiException { + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + + /** + * List Fax Lines + * Returns the properties and settings of multiple Fax Lines. + * @param accountId Account ID (optional) + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param showTeamLines Show team lines (optional) + * @return ApiResponse<FaxLineListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page, Integer pageSize, Boolean showTeamLines) throws ApiException { + + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 20; + } + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fax_line/list"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "show_team_lines", showTeamLines)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineList", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line. + * @param faxLineRemoveUserRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveUserRequest) throws ApiException { + return faxLineRemoveUserWithHttpInfo(faxLineRemoveUserRequest).getData(); + } + + + /** + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line. + * @param faxLineRemoveUserRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineRemoveUserWithHttpInfo(FaxLineRemoveUserRequest faxLineRemoveUserRequest) throws ApiException { + + Object localVarPostBody = faxLineRemoveUserRequest; + + // verify the required parameter 'faxLineRemoveUserRequest' is set + if (faxLineRemoveUserRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineRemoveUserRequest' when calling faxLineRemoveUser"); + } + + // create path and map variables + String localVarPath = "/fax_line/remove_user"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineRemoveUserRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineRemoveUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} \ No newline at end of file diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java new file mode 100644 index 000000000..d4d812fc3 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -0,0 +1,283 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineAddUserRequest + */ +@JsonPropertyOrder({ + FaxLineAddUserRequest.JSON_PROPERTY_NUMBER, + FaxLineAddUserRequest.JSON_PROPERTY_ACCOUNT_ID, + FaxLineAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineAddUserRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + private String emailAddress; + + public FaxLineAddUserRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineAddUserRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineAddUserRequest.class); + } + + static public FaxLineAddUserRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineAddUserRequest.class + ); + } + + public FaxLineAddUserRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineAddUserRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public FaxLineAddUserRequest emailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Email address + * @return emailAddress + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Email address") + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmailAddress() { + return emailAddress; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + + /** + * Return true if this FaxLineAddUserRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineAddUserRequest faxLineAddUserRequest = (FaxLineAddUserRequest) o; + return Objects.equals(this.number, faxLineAddUserRequest.number) && + Objects.equals(this.accountId, faxLineAddUserRequest.accountId) && + Objects.equals(this.emailAddress, faxLineAddUserRequest.emailAddress); + } + + @Override + public int hashCode() { + return Objects.hash(number, accountId, emailAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineAddUserRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + 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 (emailAddress != null) { + if (isFileTypeOrListOfFiles(emailAddress)) { + fileTypeFound = true; + } + + if (emailAddress.getClass().equals(java.io.File.class) || + emailAddress.getClass().equals(Integer.class) || + emailAddress.getClass().equals(String.class) || + emailAddress.getClass().isEnum()) { + map.put("email_address", emailAddress); + } else if (isListOfFile(emailAddress)) { + for(int i = 0; i< getListSize(emailAddress); i++) { + map.put("email_address[" + i + "]", getFromList(emailAddress, i)); + } + } + else { + map.put("email_address", JSON.getDefault().getMapper().writeValueAsString(emailAddress)); + } + } + } 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/FaxLineAreaCodeGetCountryEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java new file mode 100644 index 000000000..fbc25957c --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java @@ -0,0 +1,66 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetCountryEnum + */ +public enum FaxLineAreaCodeGetCountryEnum { + + CA("CA"), + + US("US"), + + UK("UK"); + + private String value; + + FaxLineAreaCodeGetCountryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetCountryEnum fromValue(String value) { + for (FaxLineAreaCodeGetCountryEnum b : FaxLineAreaCodeGetCountryEnum.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/FaxLineAreaCodeGetProvinceEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java new file mode 100644 index 000000000..f9d4d3d41 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java @@ -0,0 +1,86 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetProvinceEnum + */ +public enum FaxLineAreaCodeGetProvinceEnum { + + AB("AB"), + + BC("BC"), + + MB("MB"), + + NB("NB"), + + NL("NL"), + + NT("NT"), + + NS("NS"), + + NU("NU"), + + ON("ON"), + + PE("PE"), + + QC("QC"), + + SK("SK"), + + YT("YT"); + + private String value; + + FaxLineAreaCodeGetProvinceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetProvinceEnum fromValue(String value) { + for (FaxLineAreaCodeGetProvinceEnum b : FaxLineAreaCodeGetProvinceEnum.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/FaxLineAreaCodeGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java new file mode 100644 index 000000000..ff2b26a9c --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -0,0 +1,191 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineAreaCodeGetResponse + */ +@JsonPropertyOrder({ + FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineAreaCodeGetResponse { + public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; + private List areaCodes = null; + + public FaxLineAreaCodeGetResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineAreaCodeGetResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineAreaCodeGetResponse.class); + } + + static public FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineAreaCodeGetResponse.class + ); + } + + public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { + this.areaCodes = areaCodes; + return this; + } + + public FaxLineAreaCodeGetResponse addAreaCodesItem(Integer areaCodesItem) { + if (this.areaCodes == null) { + this.areaCodes = new ArrayList<>(); + } + this.areaCodes.add(areaCodesItem); + return this; + } + + /** + * Get areaCodes + * @return areaCodes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_AREA_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAreaCodes() { + return areaCodes; + } + + + @JsonProperty(JSON_PROPERTY_AREA_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAreaCodes(List areaCodes) { + this.areaCodes = areaCodes; + } + + + /** + * Return true if this FaxLineAreaCodeGetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineAreaCodeGetResponse faxLineAreaCodeGetResponse = (FaxLineAreaCodeGetResponse) o; + return Objects.equals(this.areaCodes, faxLineAreaCodeGetResponse.areaCodes); + } + + @Override + public int hashCode() { + return Objects.hash(areaCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineAreaCodeGetResponse {\n"); + sb.append(" areaCodes: ").append(toIndentedString(areaCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (areaCodes != null) { + if (isFileTypeOrListOfFiles(areaCodes)) { + fileTypeFound = true; + } + + if (areaCodes.getClass().equals(java.io.File.class) || + areaCodes.getClass().equals(Integer.class) || + areaCodes.getClass().equals(String.class) || + areaCodes.getClass().isEnum()) { + map.put("area_codes", areaCodes); + } else if (isListOfFile(areaCodes)) { + for(int i = 0; i< getListSize(areaCodes); i++) { + map.put("area_codes[" + i + "]", getFromList(areaCodes, i)); + } + } + else { + map.put("area_codes", JSON.getDefault().getMapper().writeValueAsString(areaCodes)); + } + } + } 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/FaxLineAreaCodeGetStateEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java new file mode 100644 index 000000000..dadc588f7 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java @@ -0,0 +1,162 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetStateEnum + */ +public enum FaxLineAreaCodeGetStateEnum { + + AK("AK"), + + AL("AL"), + + AR("AR"), + + AZ("AZ"), + + CA("CA"), + + CO("CO"), + + CT("CT"), + + DC("DC"), + + DE("DE"), + + FL("FL"), + + GA("GA"), + + HI("HI"), + + IA("IA"), + + ID("ID"), + + IL("IL"), + + IN("IN"), + + KS("KS"), + + KY("KY"), + + LA("LA"), + + MA("MA"), + + MD("MD"), + + ME("ME"), + + MI("MI"), + + MN("MN"), + + MO("MO"), + + MS("MS"), + + MT("MT"), + + NC("NC"), + + ND("ND"), + + NE("NE"), + + NH("NH"), + + NJ("NJ"), + + NM("NM"), + + NV("NV"), + + NY("NY"), + + OH("OH"), + + OK("OK"), + + OR("OR"), + + PA("PA"), + + RI("RI"), + + SC("SC"), + + SD("SD"), + + TN("TN"), + + TX("TX"), + + UT("UT"), + + VA("VA"), + + VT("VT"), + + WA("WA"), + + WI("WI"), + + WV("WV"), + + WY("WY"); + + private String value; + + FaxLineAreaCodeGetStateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetStateEnum fromValue(String value) { + for (FaxLineAreaCodeGetStateEnum b : FaxLineAreaCodeGetStateEnum.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/FaxLineCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java new file mode 100644 index 000000000..213857339 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -0,0 +1,371 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineCreateRequest + */ +@JsonPropertyOrder({ + FaxLineCreateRequest.JSON_PROPERTY_AREA_CODE, + FaxLineCreateRequest.JSON_PROPERTY_COUNTRY, + FaxLineCreateRequest.JSON_PROPERTY_CITY, + FaxLineCreateRequest.JSON_PROPERTY_ACCOUNT_ID +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineCreateRequest { + public static final String JSON_PROPERTY_AREA_CODE = "area_code"; + private Integer areaCode; + + /** + * Country + */ + public enum CountryEnum { + CA("CA"), + + US("US"), + + UK("UK"); + + private String value; + + CountryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CountryEnum fromValue(String value) { + for (CountryEnum b : CountryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private CountryEnum country; + + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public FaxLineCreateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineCreateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineCreateRequest.class); + } + + static public FaxLineCreateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineCreateRequest.class + ); + } + + public FaxLineCreateRequest areaCode(Integer areaCode) { + this.areaCode = areaCode; + return this; + } + + /** + * Area code + * @return areaCode + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Area code") + @JsonProperty(JSON_PROPERTY_AREA_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAreaCode() { + return areaCode; + } + + + @JsonProperty(JSON_PROPERTY_AREA_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAreaCode(Integer areaCode) { + this.areaCode = areaCode; + } + + + public FaxLineCreateRequest country(CountryEnum country) { + this.country = country; + return this; + } + + /** + * Country + * @return country + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Country") + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CountryEnum getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(CountryEnum country) { + this.country = country; + } + + + public FaxLineCreateRequest city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "City") + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCity() { + return city; + } + + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + } + + + public FaxLineCreateRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + /** + * Return true if this FaxLineCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineCreateRequest faxLineCreateRequest = (FaxLineCreateRequest) o; + return Objects.equals(this.areaCode, faxLineCreateRequest.areaCode) && + Objects.equals(this.country, faxLineCreateRequest.country) && + Objects.equals(this.city, faxLineCreateRequest.city) && + Objects.equals(this.accountId, faxLineCreateRequest.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(areaCode, country, city, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineCreateRequest {\n"); + sb.append(" areaCode: ").append(toIndentedString(areaCode)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (areaCode != null) { + if (isFileTypeOrListOfFiles(areaCode)) { + fileTypeFound = true; + } + + if (areaCode.getClass().equals(java.io.File.class) || + areaCode.getClass().equals(Integer.class) || + areaCode.getClass().equals(String.class) || + areaCode.getClass().isEnum()) { + map.put("area_code", areaCode); + } else if (isListOfFile(areaCode)) { + for(int i = 0; i< getListSize(areaCode); i++) { + map.put("area_code[" + i + "]", getFromList(areaCode, i)); + } + } + else { + map.put("area_code", JSON.getDefault().getMapper().writeValueAsString(areaCode)); + } + } + if (country != null) { + if (isFileTypeOrListOfFiles(country)) { + fileTypeFound = true; + } + + if (country.getClass().equals(java.io.File.class) || + country.getClass().equals(Integer.class) || + country.getClass().equals(String.class) || + country.getClass().isEnum()) { + map.put("country", country); + } else if (isListOfFile(country)) { + for(int i = 0; i< getListSize(country); i++) { + map.put("country[" + i + "]", getFromList(country, i)); + } + } + else { + map.put("country", JSON.getDefault().getMapper().writeValueAsString(country)); + } + } + if (city != null) { + if (isFileTypeOrListOfFiles(city)) { + fileTypeFound = true; + } + + if (city.getClass().equals(java.io.File.class) || + city.getClass().equals(Integer.class) || + city.getClass().equals(String.class) || + city.getClass().isEnum()) { + map.put("city", city); + } else if (isListOfFile(city)) { + for(int i = 0; i< getListSize(city); i++) { + map.put("city[" + i + "]", getFromList(city, i)); + } + } + else { + map.put("city", JSON.getDefault().getMapper().writeValueAsString(city)); + } + } + 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)); + } + } + } 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/FaxLineDeleteRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java new file mode 100644 index 000000000..8979d782b --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -0,0 +1,181 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineDeleteRequest + */ +@JsonPropertyOrder({ + FaxLineDeleteRequest.JSON_PROPERTY_NUMBER +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineDeleteRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public FaxLineDeleteRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineDeleteRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineDeleteRequest.class); + } + + static public FaxLineDeleteRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineDeleteRequest.class + ); + } + + public FaxLineDeleteRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + /** + * Return true if this FaxLineDeleteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineDeleteRequest faxLineDeleteRequest = (FaxLineDeleteRequest) o; + return Objects.equals(this.number, faxLineDeleteRequest.number); + } + + @Override + public int hashCode() { + return Objects.hash(number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineDeleteRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + } 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/FaxLineListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java new file mode 100644 index 000000000..ede959b57 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -0,0 +1,296 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.FaxLineResponseFaxLine; +import com.dropbox.sign.model.ListInfoResponse; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineListResponse + */ +@JsonPropertyOrder({ + FaxLineListResponse.JSON_PROPERTY_LIST_INFO, + FaxLineListResponse.JSON_PROPERTY_FAX_LINES, + FaxLineListResponse.JSON_PROPERTY_WARNINGS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineListResponse { + public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + private ListInfoResponse listInfo; + + public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; + private List faxLines = null; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private WarningResponse warnings; + + public FaxLineListResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineListResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineListResponse.class); + } + + static public FaxLineListResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineListResponse.class + ); + } + + public FaxLineListResponse listInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + return this; + } + + /** + * Get listInfo + * @return listInfo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ListInfoResponse getListInfo() { + return listInfo; + } + + + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setListInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + } + + + public FaxLineListResponse faxLines(List faxLines) { + this.faxLines = faxLines; + return this; + } + + public FaxLineListResponse addFaxLinesItem(FaxLineResponseFaxLine faxLinesItem) { + if (this.faxLines == null) { + this.faxLines = new ArrayList<>(); + } + this.faxLines.add(faxLinesItem); + return this; + } + + /** + * Get faxLines + * @return faxLines + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FAX_LINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFaxLines() { + return faxLines; + } + + + @JsonProperty(JSON_PROPERTY_FAX_LINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxLines(List faxLines) { + this.faxLines = faxLines; + } + + + public FaxLineListResponse warnings(WarningResponse warnings) { + this.warnings = warnings; + return this; + } + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WarningResponse getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(WarningResponse warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this FaxLineListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineListResponse faxLineListResponse = (FaxLineListResponse) o; + return Objects.equals(this.listInfo, faxLineListResponse.listInfo) && + Objects.equals(this.faxLines, faxLineListResponse.faxLines) && + Objects.equals(this.warnings, faxLineListResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(listInfo, faxLines, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineListResponse {\n"); + sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); + sb.append(" faxLines: ").append(toIndentedString(faxLines)).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 (listInfo != null) { + if (isFileTypeOrListOfFiles(listInfo)) { + fileTypeFound = true; + } + + if (listInfo.getClass().equals(java.io.File.class) || + listInfo.getClass().equals(Integer.class) || + listInfo.getClass().equals(String.class) || + listInfo.getClass().isEnum()) { + map.put("list_info", listInfo); + } else if (isListOfFile(listInfo)) { + for(int i = 0; i< getListSize(listInfo); i++) { + map.put("list_info[" + i + "]", getFromList(listInfo, i)); + } + } + else { + map.put("list_info", JSON.getDefault().getMapper().writeValueAsString(listInfo)); + } + } + if (faxLines != null) { + if (isFileTypeOrListOfFiles(faxLines)) { + fileTypeFound = true; + } + + if (faxLines.getClass().equals(java.io.File.class) || + faxLines.getClass().equals(Integer.class) || + faxLines.getClass().equals(String.class) || + faxLines.getClass().isEnum()) { + map.put("fax_lines", faxLines); + } else if (isListOfFile(faxLines)) { + for(int i = 0; i< getListSize(faxLines); i++) { + map.put("fax_lines[" + i + "]", getFromList(faxLines, i)); + } + } + else { + map.put("fax_lines", JSON.getDefault().getMapper().writeValueAsString(faxLines)); + } + } + 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/FaxLineRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java new file mode 100644 index 000000000..6711ad3a8 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -0,0 +1,283 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineRemoveUserRequest + */ +@JsonPropertyOrder({ + FaxLineRemoveUserRequest.JSON_PROPERTY_NUMBER, + FaxLineRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, + FaxLineRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineRemoveUserRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + private String emailAddress; + + public FaxLineRemoveUserRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineRemoveUserRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineRemoveUserRequest.class); + } + + static public FaxLineRemoveUserRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineRemoveUserRequest.class + ); + } + + public FaxLineRemoveUserRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineRemoveUserRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public FaxLineRemoveUserRequest emailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Email address + * @return emailAddress + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Email address") + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmailAddress() { + return emailAddress; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + + /** + * Return true if this FaxLineRemoveUserRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineRemoveUserRequest faxLineRemoveUserRequest = (FaxLineRemoveUserRequest) o; + return Objects.equals(this.number, faxLineRemoveUserRequest.number) && + Objects.equals(this.accountId, faxLineRemoveUserRequest.accountId) && + Objects.equals(this.emailAddress, faxLineRemoveUserRequest.emailAddress); + } + + @Override + public int hashCode() { + return Objects.hash(number, accountId, emailAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineRemoveUserRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + 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 (emailAddress != null) { + if (isFileTypeOrListOfFiles(emailAddress)) { + fileTypeFound = true; + } + + if (emailAddress.getClass().equals(java.io.File.class) || + emailAddress.getClass().equals(Integer.class) || + emailAddress.getClass().equals(String.class) || + emailAddress.getClass().isEnum()) { + map.put("email_address", emailAddress); + } else if (isListOfFile(emailAddress)) { + for(int i = 0; i< getListSize(emailAddress); i++) { + map.put("email_address[" + i + "]", getFromList(emailAddress, i)); + } + } + else { + map.put("email_address", JSON.getDefault().getMapper().writeValueAsString(emailAddress)); + } + } + } 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/FaxLineResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java new file mode 100644 index 000000000..85e720f7c --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -0,0 +1,234 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.FaxLineResponseFaxLine; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineResponse + */ +@JsonPropertyOrder({ + FaxLineResponse.JSON_PROPERTY_FAX_LINE, + FaxLineResponse.JSON_PROPERTY_WARNINGS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineResponse { + public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; + private FaxLineResponseFaxLine faxLine; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private WarningResponse warnings; + + public FaxLineResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineResponse.class); + } + + static public FaxLineResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineResponse.class + ); + } + + public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { + this.faxLine = faxLine; + return this; + } + + /** + * Get faxLine + * @return faxLine + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FAX_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FaxLineResponseFaxLine getFaxLine() { + return faxLine; + } + + + @JsonProperty(JSON_PROPERTY_FAX_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxLine(FaxLineResponseFaxLine faxLine) { + this.faxLine = faxLine; + } + + + public FaxLineResponse warnings(WarningResponse warnings) { + this.warnings = warnings; + return this; + } + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WarningResponse getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(WarningResponse warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this FaxLineResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineResponse faxLineResponse = (FaxLineResponse) o; + return Objects.equals(this.faxLine, faxLineResponse.faxLine) && + Objects.equals(this.warnings, faxLineResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(faxLine, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineResponse {\n"); + sb.append(" faxLine: ").append(toIndentedString(faxLine)).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 (faxLine != null) { + if (isFileTypeOrListOfFiles(faxLine)) { + fileTypeFound = true; + } + + if (faxLine.getClass().equals(java.io.File.class) || + faxLine.getClass().equals(Integer.class) || + faxLine.getClass().equals(String.class) || + faxLine.getClass().isEnum()) { + map.put("fax_line", faxLine); + } else if (isListOfFile(faxLine)) { + for(int i = 0; i< getListSize(faxLine); i++) { + map.put("fax_line[" + i + "]", getFromList(faxLine, i)); + } + } + else { + map.put("fax_line", JSON.getDefault().getMapper().writeValueAsString(faxLine)); + } + } + 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/FaxLineResponseFaxLine.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java new file mode 100644 index 000000000..4e1967155 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -0,0 +1,345 @@ +/* + * 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.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.AccountResponse; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineResponseFaxLine + */ +@JsonPropertyOrder({ + FaxLineResponseFaxLine.JSON_PROPERTY_NUMBER, + FaxLineResponseFaxLine.JSON_PROPERTY_CREATED_AT, + FaxLineResponseFaxLine.JSON_PROPERTY_UPDATED_AT, + FaxLineResponseFaxLine.JSON_PROPERTY_ACCOUNTS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineResponseFaxLine { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Integer createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private Integer updatedAt; + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = null; + + public FaxLineResponseFaxLine() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineResponseFaxLine init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineResponseFaxLine.class); + } + + static public FaxLineResponseFaxLine init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineResponseFaxLine.class + ); + } + + public FaxLineResponseFaxLine number(String number) { + this.number = number; + return this; + } + + /** + * Number + * @return number + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineResponseFaxLine createdAt(Integer createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Created at + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Created at") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(Integer createdAt) { + this.createdAt = createdAt; + } + + + public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Updated at + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Updated at") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(Integer updatedAt) { + this.updatedAt = updatedAt; + } + + + public FaxLineResponseFaxLine accounts(List accounts) { + this.accounts = accounts; + return this; + } + + public FaxLineResponseFaxLine addAccountsItem(AccountResponse accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * Get accounts + * @return accounts + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAccounts() { + return accounts; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + + /** + * Return true if this FaxLineResponseFaxLine object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineResponseFaxLine faxLineResponseFaxLine = (FaxLineResponseFaxLine) o; + return Objects.equals(this.number, faxLineResponseFaxLine.number) && + Objects.equals(this.createdAt, faxLineResponseFaxLine.createdAt) && + Objects.equals(this.updatedAt, faxLineResponseFaxLine.updatedAt) && + Objects.equals(this.accounts, faxLineResponseFaxLine.accounts); + } + + @Override + public int hashCode() { + return Objects.hash(number, createdAt, updatedAt, accounts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineResponseFaxLine {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + if (createdAt != null) { + if (isFileTypeOrListOfFiles(createdAt)) { + fileTypeFound = true; + } + + if (createdAt.getClass().equals(java.io.File.class) || + createdAt.getClass().equals(Integer.class) || + createdAt.getClass().equals(String.class) || + createdAt.getClass().isEnum()) { + map.put("created_at", createdAt); + } else if (isListOfFile(createdAt)) { + for(int i = 0; i< getListSize(createdAt); i++) { + map.put("created_at[" + i + "]", getFromList(createdAt, i)); + } + } + else { + map.put("created_at", JSON.getDefault().getMapper().writeValueAsString(createdAt)); + } + } + if (updatedAt != null) { + if (isFileTypeOrListOfFiles(updatedAt)) { + fileTypeFound = true; + } + + if (updatedAt.getClass().equals(java.io.File.class) || + updatedAt.getClass().equals(Integer.class) || + updatedAt.getClass().equals(String.class) || + updatedAt.getClass().isEnum()) { + map.put("updated_at", updatedAt); + } else if (isListOfFile(updatedAt)) { + for(int i = 0; i< getListSize(updatedAt); i++) { + map.put("updated_at[" + i + "]", getFromList(updatedAt, i)); + } + } + else { + map.put("updated_at", JSON.getDefault().getMapper().writeValueAsString(updatedAt)); + } + } + if (accounts != null) { + if (isFileTypeOrListOfFiles(accounts)) { + fileTypeFound = true; + } + + if (accounts.getClass().equals(java.io.File.class) || + accounts.getClass().equals(Integer.class) || + accounts.getClass().equals(String.class) || + accounts.getClass().isEnum()) { + map.put("accounts", accounts); + } else if (isListOfFile(accounts)) { + for(int i = 0; i< getListSize(accounts); i++) { + map.put("accounts[" + i + "]", getFromList(accounts, i)); + } + } + else { + map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); + } + } + } 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 2453f49d3..08cf1f9c0 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -179,6 +179,13 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**bulkSendJobList**](docs/BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**embeddedEditUrl**](docs/EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**embeddedSignUrl**](docs/EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxLineApi* | [**faxLineAddUser**](docs/FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User +*FaxLineApi* | [**faxLineAreaCodeGet**](docs/FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +*FaxLineApi* | [**faxLineCreate**](docs/FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line +*FaxLineApi* | [**faxLineDelete**](docs/FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line +*FaxLineApi* | [**faxLineGet**](docs/FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line +*FaxLineApi* | [**faxLineList**](docs/FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines +*FaxLineApi* | [**faxLineRemoveUser**](docs/FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access *OAuthApi* | [**oauthTokenGenerate**](docs/OAuthApi.md#oauthTokenGenerate) | **POST** /oauth/token | OAuth Token Generate *OAuthApi* | [**oauthTokenRefresh**](docs/OAuthApi.md#oauthTokenRefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh *ReportApi* | [**reportCreate**](docs/ReportApi.md#reportCreate) | **POST** /report/create | Create Report @@ -261,6 +268,17 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) + - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) + - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) + - [FaxLineAreaCodeGetResponse](docs/FaxLineAreaCodeGetResponse.md) + - [FaxLineAreaCodeGetStateEnum](docs/FaxLineAreaCodeGetStateEnum.md) + - [FaxLineCreateRequest](docs/FaxLineCreateRequest.md) + - [FaxLineDeleteRequest](docs/FaxLineDeleteRequest.md) + - [FaxLineListResponse](docs/FaxLineListResponse.md) + - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) + - [FaxLineResponse](docs/FaxLineResponse.md) + - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/java-v2/docs/FaxLineAddUserRequest.md b/sdks/java-v2/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..011d4d047 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineAddUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineAddUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `accountId` | ```String``` | Account ID | | +| `emailAddress` | ```String``` | Email address | | + + + diff --git a/sdks/java-v2/docs/FaxLineApi.md b/sdks/java-v2/docs/FaxLineApi.md new file mode 100644 index 000000000..7f1202cf5 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineApi.md @@ -0,0 +1,504 @@ +# FaxLineApi + +All URIs are relative to *https://api.hellosign.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**faxLineAddUser**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User +[**faxLineAreaCodeGet**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +[**faxLineCreate**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line +[**faxLineDelete**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line +[**faxLineGet**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line +[**faxLineList**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines +[**faxLineRemoveUser**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access + + + +## faxLineAddUser + +> FaxLineResponse faxLineAddUser(faxLineAddUserRequest) + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineAddUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineAddUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineAreaCodeGet + +> FaxLineAreaCodeGetResponse faxLineAreaCodeGet(country, state, province, city) + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **country** | **String**| Filter area codes by country. | [enum: CA, US, UK] + **state** | **String**| Filter area codes by state. | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] + **province** | **String**| Filter area codes by province. | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] + **city** | **String**| Filter area codes by city. | [optional] + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineCreate + +> FaxLineResponse faxLineCreate(faxLineCreateRequest) + +Purchase Fax Line + +Purchases a new Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineCreateRequest() + .areaCode(209) + .country("US"); + + try { + FaxLineResponse result = faxLineApi.faxLineCreate(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineCreateRequest** | [**FaxLineCreateRequest**](FaxLineCreateRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineDelete + +> faxLineDelete(faxLineDeleteRequest) + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineDeleteRequest() + .number("[FAX_NUMBER]"); + + try { + faxLineApi.faxLineDelete(data); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + + +## faxLineGet + +> FaxLineResponse faxLineGet(number) + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **String**| The Fax Line number. | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineList + +> FaxLineListResponse faxLineList(accountId, page, pageSize, showTeamLines) + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + try { + FaxLineListResponse result = faxLineApi.faxLineList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID | [optional] + **page** | **Integer**| Page | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + **showTeamLines** | **Boolean**| Show team lines | [optional] + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineRemoveUser + +> FaxLineResponse faxLineRemoveUser(faxLineRemoveUserRequest) + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxLineApi = new FaxLineApi(apiClient); + + var data = new FaxLineRemoveUserRequest() + .number("[FAX_NUMBER]") + .emailAddress("member@dropboxsign.com"); + + try { + FaxLineResponse result = faxLineApi.faxLineRemoveUser(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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 | - | + diff --git a/sdks/java-v2/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/java-v2/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..10275bc6c --- /dev/null +++ b/sdks/java-v2/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,15 @@ + + +# FaxLineAreaCodeGetCountryEnum + +## Enum + + +* `CA` (value: `"CA"`) + +* `US` (value: `"US"`) + +* `UK` (value: `"UK"`) + + + diff --git a/sdks/java-v2/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/java-v2/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..13cf50078 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,35 @@ + + +# FaxLineAreaCodeGetProvinceEnum + +## Enum + + +* `AB` (value: `"AB"`) + +* `BC` (value: `"BC"`) + +* `MB` (value: `"MB"`) + +* `NB` (value: `"NB"`) + +* `NL` (value: `"NL"`) + +* `NT` (value: `"NT"`) + +* `NS` (value: `"NS"`) + +* `NU` (value: `"NU"`) + +* `ON` (value: `"ON"`) + +* `PE` (value: `"PE"`) + +* `QC` (value: `"QC"`) + +* `SK` (value: `"SK"`) + +* `YT` (value: `"YT"`) + + + diff --git a/sdks/java-v2/docs/FaxLineAreaCodeGetResponse.md b/sdks/java-v2/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..c77456fec --- /dev/null +++ b/sdks/java-v2/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,14 @@ + + +# FaxLineAreaCodeGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCodes` | ```List``` | | | + + + diff --git a/sdks/java-v2/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/java-v2/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..577a48c63 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,111 @@ + + +# FaxLineAreaCodeGetStateEnum + +## Enum + + +* `AK` (value: `"AK"`) + +* `AL` (value: `"AL"`) + +* `AR` (value: `"AR"`) + +* `AZ` (value: `"AZ"`) + +* `CA` (value: `"CA"`) + +* `CO` (value: `"CO"`) + +* `CT` (value: `"CT"`) + +* `DC` (value: `"DC"`) + +* `DE` (value: `"DE"`) + +* `FL` (value: `"FL"`) + +* `GA` (value: `"GA"`) + +* `HI` (value: `"HI"`) + +* `IA` (value: `"IA"`) + +* `ID` (value: `"ID"`) + +* `IL` (value: `"IL"`) + +* `IN` (value: `"IN"`) + +* `KS` (value: `"KS"`) + +* `KY` (value: `"KY"`) + +* `LA` (value: `"LA"`) + +* `MA` (value: `"MA"`) + +* `MD` (value: `"MD"`) + +* `ME` (value: `"ME"`) + +* `MI` (value: `"MI"`) + +* `MN` (value: `"MN"`) + +* `MO` (value: `"MO"`) + +* `MS` (value: `"MS"`) + +* `MT` (value: `"MT"`) + +* `NC` (value: `"NC"`) + +* `ND` (value: `"ND"`) + +* `NE` (value: `"NE"`) + +* `NH` (value: `"NH"`) + +* `NJ` (value: `"NJ"`) + +* `NM` (value: `"NM"`) + +* `NV` (value: `"NV"`) + +* `NY` (value: `"NY"`) + +* `OH` (value: `"OH"`) + +* `OK` (value: `"OK"`) + +* `OR` (value: `"OR"`) + +* `PA` (value: `"PA"`) + +* `RI` (value: `"RI"`) + +* `SC` (value: `"SC"`) + +* `SD` (value: `"SD"`) + +* `TN` (value: `"TN"`) + +* `TX` (value: `"TX"`) + +* `UT` (value: `"UT"`) + +* `VA` (value: `"VA"`) + +* `VT` (value: `"VT"`) + +* `WA` (value: `"WA"`) + +* `WI` (value: `"WI"`) + +* `WV` (value: `"WV"`) + +* `WY` (value: `"WY"`) + + + diff --git a/sdks/java-v2/docs/FaxLineCreateRequest.md b/sdks/java-v2/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..d0be5225c --- /dev/null +++ b/sdks/java-v2/docs/FaxLineCreateRequest.md @@ -0,0 +1,27 @@ + + +# FaxLineCreateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCode`*_required_ | ```Integer``` | Area code | | +| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country | | +| `city` | ```String``` | City | | +| `accountId` | ```String``` | Account ID | | + + + +## Enum: CountryEnum + +Name | Value +---- | ----- +| CA | "CA" | +| US | "US" | +| UK | "UK" | + + + diff --git a/sdks/java-v2/docs/FaxLineDeleteRequest.md b/sdks/java-v2/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..d00dac614 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineDeleteRequest.md @@ -0,0 +1,14 @@ + + +# FaxLineDeleteRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | + + + diff --git a/sdks/java-v2/docs/FaxLineListResponse.md b/sdks/java-v2/docs/FaxLineListResponse.md new file mode 100644 index 000000000..4f01f2fd3 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineListResponse.md @@ -0,0 +1,16 @@ + + +# FaxLineListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `listInfo` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `faxLines` | [```List```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v2/docs/FaxLineRemoveUserRequest.md b/sdks/java-v2/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..f353fdee6 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineRemoveUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `accountId` | ```String``` | Account ID | | +| `emailAddress` | ```String``` | Email address | | + + + diff --git a/sdks/java-v2/docs/FaxLineResponse.md b/sdks/java-v2/docs/FaxLineResponse.md new file mode 100644 index 000000000..d9a67d41f --- /dev/null +++ b/sdks/java-v2/docs/FaxLineResponse.md @@ -0,0 +1,15 @@ + + +# FaxLineResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxLine` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v2/docs/FaxLineResponseFaxLine.md b/sdks/java-v2/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..caa5e07e2 --- /dev/null +++ b/sdks/java-v2/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,17 @@ + + +# FaxLineResponseFaxLine + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number` | ```String``` | Number | | +| `createdAt` | ```Integer``` | Created at | | +| `updatedAt` | ```Integer``` | Updated at | | +| `accounts` | [```List```](AccountResponse.md) | | | + + + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java new file mode 100644 index 000000000..d2cd582ed --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -0,0 +1,746 @@ +package com.dropbox.sign.api; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.ApiClient; +import com.dropbox.sign.ApiResponse; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.Pair; + +import jakarta.ws.rs.core.GenericType; + +import com.dropbox.sign.model.ErrorResponse; +import com.dropbox.sign.model.FaxLineAddUserRequest; +import com.dropbox.sign.model.FaxLineAreaCodeGetResponse; +import com.dropbox.sign.model.FaxLineCreateRequest; +import com.dropbox.sign.model.FaxLineDeleteRequest; +import com.dropbox.sign.model.FaxLineListResponse; +import com.dropbox.sign.model.FaxLineRemoveUserRequest; +import com.dropbox.sign.model.FaxLineResponse; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineApi { + private ApiClient apiClient; + + public FaxLineApi() { + this(Configuration.getDefaultApiClient()); + } + + public FaxLineApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Add Fax Line User + * Grants a user access to the specified Fax Line. + * @param faxLineAddUserRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserRequest) throws ApiException { + return faxLineAddUserWithHttpInfo(faxLineAddUserRequest).getData(); + } + + + /** + * Add Fax Line User + * Grants a user access to the specified Fax Line. + * @param faxLineAddUserRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineAddUserWithHttpInfo(FaxLineAddUserRequest faxLineAddUserRequest) throws ApiException { + + Object localVarPostBody = faxLineAddUserRequest; + + // verify the required parameter 'faxLineAddUserRequest' is set + if (faxLineAddUserRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineAddUserRequest' when calling faxLineAddUser"); + } + + // create path and map variables + String localVarPath = "/fax_line/add_user"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineAddUserRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineAddUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Get Available Fax Line Area Codes + * Returns a response with the area codes available for a given state/provice and city. + * @param country Filter area codes by country. (required) + * @param state Filter area codes by state. (optional) + * @param province Filter area codes by province. (optional) + * @param city Filter area codes by city. (optional) + * @return FaxLineAreaCodeGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state, String province, String city) throws ApiException { + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country) throws ApiException { + String state = null; + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country) throws ApiException { + String state = null; + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state) throws ApiException { + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state) throws ApiException { + String province = null; + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) + */ + public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state, String province) throws ApiException { + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); + } + + /** + * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) + */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state, String province) throws ApiException { + String city = null; + + return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); + } + + + /** + * Get Available Fax Line Area Codes + * Returns a response with the area codes available for a given state/provice and city. + * @param country Filter area codes by country. (required) + * @param state Filter area codes by state. (optional) + * @param province Filter area codes by province. (optional) + * @param city Filter area codes by city. (optional) + * @return ApiResponse<FaxLineAreaCodeGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country, String state, String province, String city) throws ApiException { + + Object localVarPostBody = null; + + // verify the required parameter 'country' is set + if (country == null) { + throw new ApiException(400, "Missing the required parameter 'country' when calling faxLineAreaCodeGet"); + } + + // create path and map variables + String localVarPath = "/fax_line/area_codes"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "country", country)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "state", state)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "province", province)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "city", city)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineAreaCodeGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Purchase Fax Line + * Purchases a new Fax Line. + * @param faxLineCreateRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) throws ApiException { + return faxLineCreateWithHttpInfo(faxLineCreateRequest).getData(); + } + + + /** + * Purchase Fax Line + * Purchases a new Fax Line. + * @param faxLineCreateRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineCreateWithHttpInfo(FaxLineCreateRequest faxLineCreateRequest) throws ApiException { + + Object localVarPostBody = faxLineCreateRequest; + + // verify the required parameter 'faxLineCreateRequest' is set + if (faxLineCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineCreateRequest' when calling faxLineCreate"); + } + + // create path and map variables + String localVarPath = "/fax_line/create"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineCreateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineCreate", localVarPath, "POST", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Delete Fax Line + * Deletes the specified Fax Line from the subscription. + * @param faxLineDeleteRequest (required) + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiException { + faxLineDeleteWithHttpInfo(faxLineDeleteRequest); + } + + + /** + * Delete Fax Line + * Deletes the specified Fax Line from the subscription. + * @param faxLineDeleteRequest (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiException { + + Object localVarPostBody = faxLineDeleteRequest; + + // verify the required parameter 'faxLineDeleteRequest' is set + if (faxLineDeleteRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineDeleteRequest' when calling faxLineDelete"); + } + + // create path and map variables + String localVarPath = "/fax_line"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineDeleteRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + return apiClient.invokeAPI("FaxLineApi.faxLineDelete", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, null, false); + } + /** + * Get Fax Line + * Returns the properties and settings of a Fax Line. + * @param number The Fax Line number. (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineGet(String number) throws ApiException { + return faxLineGetWithHttpInfo(number).getData(); + } + + + /** + * Get Fax Line + * Returns the properties and settings of a Fax Line. + * @param number The Fax Line number. (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineGetWithHttpInfo(String number) throws ApiException { + + Object localVarPostBody = null; + + // verify the required parameter 'number' is set + if (number == null) { + throw new ApiException(400, "Missing the required parameter 'number' when calling faxLineGet"); + } + + // create path and map variables + String localVarPath = "/fax_line"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "number", number)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineGet", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * List Fax Lines + * Returns the properties and settings of multiple Fax Lines. + * @param accountId Account ID (optional) + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param showTeamLines Show team lines (optional) + * @return FaxLineListResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineListResponse faxLineList(String accountId, Integer page, Integer pageSize, Boolean showTeamLines) throws ApiException { + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList() throws ApiException { + String accountId = null; + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo() throws ApiException { + String accountId = null; + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId) throws ApiException { + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId) throws ApiException { + Integer page = 1; + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId, Integer page) throws ApiException { + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page) throws ApiException { + Integer pageSize = 20; + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + /** + * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) + */ + public FaxLineListResponse faxLineList(String accountId, Integer page, Integer pageSize) throws ApiException { + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); + } + + /** + * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) + */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page, Integer pageSize) throws ApiException { + Boolean showTeamLines = null; + + return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); + } + + + /** + * List Fax Lines + * Returns the properties and settings of multiple Fax Lines. + * @param accountId Account ID (optional) + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @param showTeamLines Show team lines (optional) + * @return ApiResponse<FaxLineListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page, Integer pageSize, Boolean showTeamLines) throws ApiException { + + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 20; + } + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fax_line/list"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "account_id", accountId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "show_team_lines", showTeamLines)); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineList", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line. + * @param faxLineRemoveUserRequest (required) + * @return FaxLineResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveUserRequest) throws ApiException { + return faxLineRemoveUserWithHttpInfo(faxLineRemoveUserRequest).getData(); + } + + + /** + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line. + * @param faxLineRemoveUserRequest (required) + * @return ApiResponse<FaxLineResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + +
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxLineRemoveUserWithHttpInfo(FaxLineRemoveUserRequest faxLineRemoveUserRequest) throws ApiException { + + Object localVarPostBody = faxLineRemoveUserRequest; + + // verify the required parameter 'faxLineRemoveUserRequest' is set + if (faxLineRemoveUserRequest == null) { + throw new ApiException(400, "Missing the required parameter 'faxLineRemoveUserRequest' when calling faxLineRemoveUser"); + } + + // create path and map variables + String localVarPath = "/fax_line/remove_user"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + + localVarFormParams = faxLineRemoveUserRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + + final String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "api_key" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("FaxLineApi.faxLineRemoveUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} \ No newline at end of file diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java new file mode 100644 index 000000000..f2ca18c0b --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -0,0 +1,283 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineAddUserRequest + */ +@JsonPropertyOrder({ + FaxLineAddUserRequest.JSON_PROPERTY_NUMBER, + FaxLineAddUserRequest.JSON_PROPERTY_ACCOUNT_ID, + FaxLineAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineAddUserRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + private String emailAddress; + + public FaxLineAddUserRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineAddUserRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineAddUserRequest.class); + } + + static public FaxLineAddUserRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineAddUserRequest.class + ); + } + + public FaxLineAddUserRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineAddUserRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public FaxLineAddUserRequest emailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Email address + * @return emailAddress + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Email address") + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmailAddress() { + return emailAddress; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + + /** + * Return true if this FaxLineAddUserRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineAddUserRequest faxLineAddUserRequest = (FaxLineAddUserRequest) o; + return Objects.equals(this.number, faxLineAddUserRequest.number) && + Objects.equals(this.accountId, faxLineAddUserRequest.accountId) && + Objects.equals(this.emailAddress, faxLineAddUserRequest.emailAddress); + } + + @Override + public int hashCode() { + return Objects.hash(number, accountId, emailAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineAddUserRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + 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 (emailAddress != null) { + if (isFileTypeOrListOfFiles(emailAddress)) { + fileTypeFound = true; + } + + if (emailAddress.getClass().equals(java.io.File.class) || + emailAddress.getClass().equals(Integer.class) || + emailAddress.getClass().equals(String.class) || + emailAddress.getClass().isEnum()) { + map.put("email_address", emailAddress); + } else if (isListOfFile(emailAddress)) { + for(int i = 0; i< getListSize(emailAddress); i++) { + map.put("email_address[" + i + "]", getFromList(emailAddress, i)); + } + } + else { + map.put("email_address", JSON.getDefault().getMapper().writeValueAsString(emailAddress)); + } + } + } 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/FaxLineAreaCodeGetCountryEnum.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java new file mode 100644 index 000000000..08da9731a --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetCountryEnum + */ +public enum FaxLineAreaCodeGetCountryEnum { + + CA("CA"), + + US("US"), + + UK("UK"); + + private String value; + + FaxLineAreaCodeGetCountryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetCountryEnum fromValue(String value) { + for (FaxLineAreaCodeGetCountryEnum b : FaxLineAreaCodeGetCountryEnum.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/FaxLineAreaCodeGetProvinceEnum.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java new file mode 100644 index 000000000..566181f56 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java @@ -0,0 +1,87 @@ +/* + * 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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetProvinceEnum + */ +public enum FaxLineAreaCodeGetProvinceEnum { + + AB("AB"), + + BC("BC"), + + MB("MB"), + + NB("NB"), + + NL("NL"), + + NT("NT"), + + NS("NS"), + + NU("NU"), + + ON("ON"), + + PE("PE"), + + QC("QC"), + + SK("SK"), + + YT("YT"); + + private String value; + + FaxLineAreaCodeGetProvinceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetProvinceEnum fromValue(String value) { + for (FaxLineAreaCodeGetProvinceEnum b : FaxLineAreaCodeGetProvinceEnum.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/FaxLineAreaCodeGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java new file mode 100644 index 000000000..f07b04cb7 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -0,0 +1,191 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineAreaCodeGetResponse + */ +@JsonPropertyOrder({ + FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineAreaCodeGetResponse { + public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; + private List areaCodes; + + public FaxLineAreaCodeGetResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineAreaCodeGetResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineAreaCodeGetResponse.class); + } + + static public FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineAreaCodeGetResponse.class + ); + } + + public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { + this.areaCodes = areaCodes; + return this; + } + + public FaxLineAreaCodeGetResponse addAreaCodesItem(Integer areaCodesItem) { + if (this.areaCodes == null) { + this.areaCodes = new ArrayList<>(); + } + this.areaCodes.add(areaCodesItem); + return this; + } + + /** + * Get areaCodes + * @return areaCodes + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_AREA_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAreaCodes() { + return areaCodes; + } + + + @JsonProperty(JSON_PROPERTY_AREA_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAreaCodes(List areaCodes) { + this.areaCodes = areaCodes; + } + + + /** + * Return true if this FaxLineAreaCodeGetResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineAreaCodeGetResponse faxLineAreaCodeGetResponse = (FaxLineAreaCodeGetResponse) o; + return Objects.equals(this.areaCodes, faxLineAreaCodeGetResponse.areaCodes); + } + + @Override + public int hashCode() { + return Objects.hash(areaCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineAreaCodeGetResponse {\n"); + sb.append(" areaCodes: ").append(toIndentedString(areaCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (areaCodes != null) { + if (isFileTypeOrListOfFiles(areaCodes)) { + fileTypeFound = true; + } + + if (areaCodes.getClass().equals(java.io.File.class) || + areaCodes.getClass().equals(Integer.class) || + areaCodes.getClass().equals(String.class) || + areaCodes.getClass().isEnum()) { + map.put("area_codes", areaCodes); + } else if (isListOfFile(areaCodes)) { + for(int i = 0; i< getListSize(areaCodes); i++) { + map.put("area_codes[" + i + "]", getFromList(areaCodes, i)); + } + } + else { + map.put("area_codes", JSON.getDefault().getMapper().writeValueAsString(areaCodes)); + } + } + } 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/FaxLineAreaCodeGetStateEnum.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java new file mode 100644 index 000000000..6a136e116 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java @@ -0,0 +1,163 @@ +/* + * 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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets FaxLineAreaCodeGetStateEnum + */ +public enum FaxLineAreaCodeGetStateEnum { + + AK("AK"), + + AL("AL"), + + AR("AR"), + + AZ("AZ"), + + CA("CA"), + + CO("CO"), + + CT("CT"), + + DC("DC"), + + DE("DE"), + + FL("FL"), + + GA("GA"), + + HI("HI"), + + IA("IA"), + + ID("ID"), + + IL("IL"), + + IN("IN"), + + KS("KS"), + + KY("KY"), + + LA("LA"), + + MA("MA"), + + MD("MD"), + + ME("ME"), + + MI("MI"), + + MN("MN"), + + MO("MO"), + + MS("MS"), + + MT("MT"), + + NC("NC"), + + ND("ND"), + + NE("NE"), + + NH("NH"), + + NJ("NJ"), + + NM("NM"), + + NV("NV"), + + NY("NY"), + + OH("OH"), + + OK("OK"), + + OR("OR"), + + PA("PA"), + + RI("RI"), + + SC("SC"), + + SD("SD"), + + TN("TN"), + + TX("TX"), + + UT("UT"), + + VA("VA"), + + VT("VT"), + + WA("WA"), + + WI("WI"), + + WV("WV"), + + WY("WY"); + + private String value; + + FaxLineAreaCodeGetStateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetStateEnum fromValue(String value) { + for (FaxLineAreaCodeGetStateEnum b : FaxLineAreaCodeGetStateEnum.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/FaxLineCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java new file mode 100644 index 000000000..01c5d5101 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -0,0 +1,371 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineCreateRequest + */ +@JsonPropertyOrder({ + FaxLineCreateRequest.JSON_PROPERTY_AREA_CODE, + FaxLineCreateRequest.JSON_PROPERTY_COUNTRY, + FaxLineCreateRequest.JSON_PROPERTY_CITY, + FaxLineCreateRequest.JSON_PROPERTY_ACCOUNT_ID +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineCreateRequest { + public static final String JSON_PROPERTY_AREA_CODE = "area_code"; + private Integer areaCode; + + /** + * Country + */ + public enum CountryEnum { + CA("CA"), + + US("US"), + + UK("UK"); + + private String value; + + CountryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CountryEnum fromValue(String value) { + for (CountryEnum b : CountryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private CountryEnum country; + + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public FaxLineCreateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineCreateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineCreateRequest.class); + } + + static public FaxLineCreateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineCreateRequest.class + ); + } + + public FaxLineCreateRequest areaCode(Integer areaCode) { + this.areaCode = areaCode; + return this; + } + + /** + * Area code + * @return areaCode + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "Area code") + @JsonProperty(JSON_PROPERTY_AREA_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getAreaCode() { + return areaCode; + } + + + @JsonProperty(JSON_PROPERTY_AREA_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAreaCode(Integer areaCode) { + this.areaCode = areaCode; + } + + + public FaxLineCreateRequest country(CountryEnum country) { + this.country = country; + return this; + } + + /** + * Country + * @return country + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "Country") + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public CountryEnum getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(CountryEnum country) { + this.country = country; + } + + + public FaxLineCreateRequest city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "City") + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCity() { + return city; + } + + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + } + + + public FaxLineCreateRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + /** + * Return true if this FaxLineCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineCreateRequest faxLineCreateRequest = (FaxLineCreateRequest) o; + return Objects.equals(this.areaCode, faxLineCreateRequest.areaCode) && + Objects.equals(this.country, faxLineCreateRequest.country) && + Objects.equals(this.city, faxLineCreateRequest.city) && + Objects.equals(this.accountId, faxLineCreateRequest.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(areaCode, country, city, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineCreateRequest {\n"); + sb.append(" areaCode: ").append(toIndentedString(areaCode)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (areaCode != null) { + if (isFileTypeOrListOfFiles(areaCode)) { + fileTypeFound = true; + } + + if (areaCode.getClass().equals(java.io.File.class) || + areaCode.getClass().equals(Integer.class) || + areaCode.getClass().equals(String.class) || + areaCode.getClass().isEnum()) { + map.put("area_code", areaCode); + } else if (isListOfFile(areaCode)) { + for(int i = 0; i< getListSize(areaCode); i++) { + map.put("area_code[" + i + "]", getFromList(areaCode, i)); + } + } + else { + map.put("area_code", JSON.getDefault().getMapper().writeValueAsString(areaCode)); + } + } + if (country != null) { + if (isFileTypeOrListOfFiles(country)) { + fileTypeFound = true; + } + + if (country.getClass().equals(java.io.File.class) || + country.getClass().equals(Integer.class) || + country.getClass().equals(String.class) || + country.getClass().isEnum()) { + map.put("country", country); + } else if (isListOfFile(country)) { + for(int i = 0; i< getListSize(country); i++) { + map.put("country[" + i + "]", getFromList(country, i)); + } + } + else { + map.put("country", JSON.getDefault().getMapper().writeValueAsString(country)); + } + } + if (city != null) { + if (isFileTypeOrListOfFiles(city)) { + fileTypeFound = true; + } + + if (city.getClass().equals(java.io.File.class) || + city.getClass().equals(Integer.class) || + city.getClass().equals(String.class) || + city.getClass().isEnum()) { + map.put("city", city); + } else if (isListOfFile(city)) { + for(int i = 0; i< getListSize(city); i++) { + map.put("city[" + i + "]", getFromList(city, i)); + } + } + else { + map.put("city", JSON.getDefault().getMapper().writeValueAsString(city)); + } + } + 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)); + } + } + } 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/FaxLineDeleteRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java new file mode 100644 index 000000000..0cd834207 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -0,0 +1,181 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineDeleteRequest + */ +@JsonPropertyOrder({ + FaxLineDeleteRequest.JSON_PROPERTY_NUMBER +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineDeleteRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public FaxLineDeleteRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineDeleteRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineDeleteRequest.class); + } + + static public FaxLineDeleteRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineDeleteRequest.class + ); + } + + public FaxLineDeleteRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + /** + * Return true if this FaxLineDeleteRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineDeleteRequest faxLineDeleteRequest = (FaxLineDeleteRequest) o; + return Objects.equals(this.number, faxLineDeleteRequest.number); + } + + @Override + public int hashCode() { + return Objects.hash(number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineDeleteRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + } 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/FaxLineListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java new file mode 100644 index 000000000..43f625a0c --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -0,0 +1,296 @@ +/* + * 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.FaxLineResponseFaxLine; +import com.dropbox.sign.model.ListInfoResponse; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineListResponse + */ +@JsonPropertyOrder({ + FaxLineListResponse.JSON_PROPERTY_LIST_INFO, + FaxLineListResponse.JSON_PROPERTY_FAX_LINES, + FaxLineListResponse.JSON_PROPERTY_WARNINGS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineListResponse { + public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + private ListInfoResponse listInfo; + + public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; + private List faxLines; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private WarningResponse warnings; + + public FaxLineListResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineListResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineListResponse.class); + } + + static public FaxLineListResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineListResponse.class + ); + } + + public FaxLineListResponse listInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + return this; + } + + /** + * Get listInfo + * @return listInfo + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ListInfoResponse getListInfo() { + return listInfo; + } + + + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setListInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + } + + + public FaxLineListResponse faxLines(List faxLines) { + this.faxLines = faxLines; + return this; + } + + public FaxLineListResponse addFaxLinesItem(FaxLineResponseFaxLine faxLinesItem) { + if (this.faxLines == null) { + this.faxLines = new ArrayList<>(); + } + this.faxLines.add(faxLinesItem); + return this; + } + + /** + * Get faxLines + * @return faxLines + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FAX_LINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFaxLines() { + return faxLines; + } + + + @JsonProperty(JSON_PROPERTY_FAX_LINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxLines(List faxLines) { + this.faxLines = faxLines; + } + + + public FaxLineListResponse warnings(WarningResponse warnings) { + this.warnings = warnings; + return this; + } + + /** + * Get warnings + * @return warnings + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WarningResponse getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(WarningResponse warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this FaxLineListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineListResponse faxLineListResponse = (FaxLineListResponse) o; + return Objects.equals(this.listInfo, faxLineListResponse.listInfo) && + Objects.equals(this.faxLines, faxLineListResponse.faxLines) && + Objects.equals(this.warnings, faxLineListResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(listInfo, faxLines, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineListResponse {\n"); + sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); + sb.append(" faxLines: ").append(toIndentedString(faxLines)).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 (listInfo != null) { + if (isFileTypeOrListOfFiles(listInfo)) { + fileTypeFound = true; + } + + if (listInfo.getClass().equals(java.io.File.class) || + listInfo.getClass().equals(Integer.class) || + listInfo.getClass().equals(String.class) || + listInfo.getClass().isEnum()) { + map.put("list_info", listInfo); + } else if (isListOfFile(listInfo)) { + for(int i = 0; i< getListSize(listInfo); i++) { + map.put("list_info[" + i + "]", getFromList(listInfo, i)); + } + } + else { + map.put("list_info", JSON.getDefault().getMapper().writeValueAsString(listInfo)); + } + } + if (faxLines != null) { + if (isFileTypeOrListOfFiles(faxLines)) { + fileTypeFound = true; + } + + if (faxLines.getClass().equals(java.io.File.class) || + faxLines.getClass().equals(Integer.class) || + faxLines.getClass().equals(String.class) || + faxLines.getClass().isEnum()) { + map.put("fax_lines", faxLines); + } else if (isListOfFile(faxLines)) { + for(int i = 0; i< getListSize(faxLines); i++) { + map.put("fax_lines[" + i + "]", getFromList(faxLines, i)); + } + } + else { + map.put("fax_lines", JSON.getDefault().getMapper().writeValueAsString(faxLines)); + } + } + 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/FaxLineRemoveUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java new file mode 100644 index 000000000..1fd430a68 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -0,0 +1,283 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineRemoveUserRequest + */ +@JsonPropertyOrder({ + FaxLineRemoveUserRequest.JSON_PROPERTY_NUMBER, + FaxLineRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, + FaxLineRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineRemoveUserRequest { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + private String emailAddress; + + public FaxLineRemoveUserRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineRemoveUserRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineRemoveUserRequest.class); + } + + static public FaxLineRemoveUserRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineRemoveUserRequest.class + ); + } + + public FaxLineRemoveUserRequest number(String number) { + this.number = number; + return this; + } + + /** + * The Fax Line number. + * @return number + **/ + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Fax Line number.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineRemoveUserRequest accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account ID + * @return accountId + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(example = "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", value = "Account ID") + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountId() { + return accountId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public FaxLineRemoveUserRequest emailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Email address + * @return emailAddress + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Email address") + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmailAddress() { + return emailAddress; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + + /** + * Return true if this FaxLineRemoveUserRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineRemoveUserRequest faxLineRemoveUserRequest = (FaxLineRemoveUserRequest) o; + return Objects.equals(this.number, faxLineRemoveUserRequest.number) && + Objects.equals(this.accountId, faxLineRemoveUserRequest.accountId) && + Objects.equals(this.emailAddress, faxLineRemoveUserRequest.emailAddress); + } + + @Override + public int hashCode() { + return Objects.hash(number, accountId, emailAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineRemoveUserRequest {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + 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 (emailAddress != null) { + if (isFileTypeOrListOfFiles(emailAddress)) { + fileTypeFound = true; + } + + if (emailAddress.getClass().equals(java.io.File.class) || + emailAddress.getClass().equals(Integer.class) || + emailAddress.getClass().equals(String.class) || + emailAddress.getClass().isEnum()) { + map.put("email_address", emailAddress); + } else if (isListOfFile(emailAddress)) { + for(int i = 0; i< getListSize(emailAddress); i++) { + map.put("email_address[" + i + "]", getFromList(emailAddress, i)); + } + } + else { + map.put("email_address", JSON.getDefault().getMapper().writeValueAsString(emailAddress)); + } + } + } 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/FaxLineResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java new file mode 100644 index 000000000..06b7527f9 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -0,0 +1,234 @@ +/* + * 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.FaxLineResponseFaxLine; +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.Arrays; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineResponse + */ +@JsonPropertyOrder({ + FaxLineResponse.JSON_PROPERTY_FAX_LINE, + FaxLineResponse.JSON_PROPERTY_WARNINGS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineResponse { + public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; + private FaxLineResponseFaxLine faxLine; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private WarningResponse warnings; + + public FaxLineResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineResponse.class); + } + + static public FaxLineResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineResponse.class + ); + } + + public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { + this.faxLine = faxLine; + return this; + } + + /** + * Get faxLine + * @return faxLine + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FAX_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FaxLineResponseFaxLine getFaxLine() { + return faxLine; + } + + + @JsonProperty(JSON_PROPERTY_FAX_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFaxLine(FaxLineResponseFaxLine faxLine) { + this.faxLine = faxLine; + } + + + public FaxLineResponse warnings(WarningResponse warnings) { + this.warnings = warnings; + return this; + } + + /** + * Get warnings + * @return warnings + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public WarningResponse getWarnings() { + return warnings; + } + + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(WarningResponse warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this FaxLineResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineResponse faxLineResponse = (FaxLineResponse) o; + return Objects.equals(this.faxLine, faxLineResponse.faxLine) && + Objects.equals(this.warnings, faxLineResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(faxLine, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineResponse {\n"); + sb.append(" faxLine: ").append(toIndentedString(faxLine)).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 (faxLine != null) { + if (isFileTypeOrListOfFiles(faxLine)) { + fileTypeFound = true; + } + + if (faxLine.getClass().equals(java.io.File.class) || + faxLine.getClass().equals(Integer.class) || + faxLine.getClass().equals(String.class) || + faxLine.getClass().isEnum()) { + map.put("fax_line", faxLine); + } else if (isListOfFile(faxLine)) { + for(int i = 0; i< getListSize(faxLine); i++) { + map.put("fax_line[" + i + "]", getFromList(faxLine, i)); + } + } + else { + map.put("fax_line", JSON.getDefault().getMapper().writeValueAsString(faxLine)); + } + } + 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/FaxLineResponseFaxLine.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java new file mode 100644 index 000000000..b9253e223 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -0,0 +1,345 @@ +/* + * 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.AccountResponse; +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.dropbox.sign.JSON; + + +import com.dropbox.sign.ApiException; +/** + * FaxLineResponseFaxLine + */ +@JsonPropertyOrder({ + FaxLineResponseFaxLine.JSON_PROPERTY_NUMBER, + FaxLineResponseFaxLine.JSON_PROPERTY_CREATED_AT, + FaxLineResponseFaxLine.JSON_PROPERTY_UPDATED_AT, + FaxLineResponseFaxLine.JSON_PROPERTY_ACCOUNTS +}) +@JsonIgnoreProperties(ignoreUnknown=true) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FaxLineResponseFaxLine { + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Integer createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private Integer updatedAt; + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts; + + public FaxLineResponseFaxLine() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public FaxLineResponseFaxLine init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxLineResponseFaxLine.class); + } + + static public FaxLineResponseFaxLine init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + FaxLineResponseFaxLine.class + ); + } + + public FaxLineResponseFaxLine number(String number) { + this.number = number; + return this; + } + + /** + * Number + * @return number + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Number") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(String number) { + this.number = number; + } + + + public FaxLineResponseFaxLine createdAt(Integer createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Created at + * @return createdAt + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Created at") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(Integer createdAt) { + this.createdAt = createdAt; + } + + + public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Updated at + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "Updated at") + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(Integer updatedAt) { + this.updatedAt = updatedAt; + } + + + public FaxLineResponseFaxLine accounts(List accounts) { + this.accounts = accounts; + return this; + } + + public FaxLineResponseFaxLine addAccountsItem(AccountResponse accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * Get accounts + * @return accounts + **/ + @jakarta.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAccounts() { + return accounts; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + + /** + * Return true if this FaxLineResponseFaxLine object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxLineResponseFaxLine faxLineResponseFaxLine = (FaxLineResponseFaxLine) o; + return Objects.equals(this.number, faxLineResponseFaxLine.number) && + Objects.equals(this.createdAt, faxLineResponseFaxLine.createdAt) && + Objects.equals(this.updatedAt, faxLineResponseFaxLine.updatedAt) && + Objects.equals(this.accounts, faxLineResponseFaxLine.accounts); + } + + @Override + public int hashCode() { + return Objects.hash(number, createdAt, updatedAt, accounts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxLineResponseFaxLine {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (number != null) { + if (isFileTypeOrListOfFiles(number)) { + fileTypeFound = true; + } + + if (number.getClass().equals(java.io.File.class) || + number.getClass().equals(Integer.class) || + number.getClass().equals(String.class) || + number.getClass().isEnum()) { + map.put("number", number); + } else if (isListOfFile(number)) { + for(int i = 0; i< getListSize(number); i++) { + map.put("number[" + i + "]", getFromList(number, i)); + } + } + else { + map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); + } + } + if (createdAt != null) { + if (isFileTypeOrListOfFiles(createdAt)) { + fileTypeFound = true; + } + + if (createdAt.getClass().equals(java.io.File.class) || + createdAt.getClass().equals(Integer.class) || + createdAt.getClass().equals(String.class) || + createdAt.getClass().isEnum()) { + map.put("created_at", createdAt); + } else if (isListOfFile(createdAt)) { + for(int i = 0; i< getListSize(createdAt); i++) { + map.put("created_at[" + i + "]", getFromList(createdAt, i)); + } + } + else { + map.put("created_at", JSON.getDefault().getMapper().writeValueAsString(createdAt)); + } + } + if (updatedAt != null) { + if (isFileTypeOrListOfFiles(updatedAt)) { + fileTypeFound = true; + } + + if (updatedAt.getClass().equals(java.io.File.class) || + updatedAt.getClass().equals(Integer.class) || + updatedAt.getClass().equals(String.class) || + updatedAt.getClass().isEnum()) { + map.put("updated_at", updatedAt); + } else if (isListOfFile(updatedAt)) { + for(int i = 0; i< getListSize(updatedAt); i++) { + map.put("updated_at[" + i + "]", getFromList(updatedAt, i)); + } + } + else { + map.put("updated_at", JSON.getDefault().getMapper().writeValueAsString(updatedAt)); + } + } + if (accounts != null) { + if (isFileTypeOrListOfFiles(accounts)) { + fileTypeFound = true; + } + + if (accounts.getClass().equals(java.io.File.class) || + accounts.getClass().equals(Integer.class) || + accounts.getClass().equals(String.class) || + accounts.getClass().isEnum()) { + map.put("accounts", accounts); + } else if (isListOfFile(accounts)) { + for(int i = 0; i< getListSize(accounts); i++) { + map.put("accounts[" + i + "]", getFromList(accounts, i)); + } + } + else { + map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); + } + } + } 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 0d019cc7a..4aca5d208 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -120,6 +120,13 @@ All URIs are relative to *https://api.hellosign.com/v3* | *BulkSendJobApi* | [**bulkSendJobList**](./docs/api/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs | | *EmbeddedApi* | [**embeddedEditUrl**](./docs/api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](./docs/api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | +| *FaxLineApi* | [**faxLineAddUser**](./docs/api/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User | +| *FaxLineApi* | [**faxLineAreaCodeGet**](./docs/api/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +| *FaxLineApi* | [**faxLineCreate**](./docs/api/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line | +| *FaxLineApi* | [**faxLineDelete**](./docs/api/FaxLineApi.md#faxlinedelete) | **DELETE** /fax_line | Delete Fax Line | +| *FaxLineApi* | [**faxLineGet**](./docs/api/FaxLineApi.md#faxlineget) | **GET** /fax_line | Get Fax Line | +| *FaxLineApi* | [**faxLineList**](./docs/api/FaxLineApi.md#faxlinelist) | **GET** /fax_line/list | List Fax Lines | +| *FaxLineApi* | [**faxLineRemoveUser**](./docs/api/FaxLineApi.md#faxlineremoveuser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | | *OAuthApi* | [**oauthTokenGenerate**](./docs/api/OAuthApi.md#oauthtokengenerate) | **POST** /oauth/token | OAuth Token Generate | | *OAuthApi* | [**oauthTokenRefresh**](./docs/api/OAuthApi.md#oauthtokenrefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh | | *ReportApi* | [**reportCreate**](./docs/api/ReportApi.md#reportcreate) | **POST** /report/create | Create Report | @@ -201,6 +208,17 @@ All URIs are relative to *https://api.hellosign.com/v3* - [EventCallbackRequest](./docs/model/EventCallbackRequest.md) - [EventCallbackRequestEvent](./docs/model/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](./docs/model/EventCallbackRequestEventMetadata.md) +- [FaxLineAddUserRequest](./docs/model/FaxLineAddUserRequest.md) +- [FaxLineAreaCodeGetCountryEnum](./docs/model/FaxLineAreaCodeGetCountryEnum.md) +- [FaxLineAreaCodeGetProvinceEnum](./docs/model/FaxLineAreaCodeGetProvinceEnum.md) +- [FaxLineAreaCodeGetResponse](./docs/model/FaxLineAreaCodeGetResponse.md) +- [FaxLineAreaCodeGetStateEnum](./docs/model/FaxLineAreaCodeGetStateEnum.md) +- [FaxLineCreateRequest](./docs/model/FaxLineCreateRequest.md) +- [FaxLineDeleteRequest](./docs/model/FaxLineDeleteRequest.md) +- [FaxLineListResponse](./docs/model/FaxLineListResponse.md) +- [FaxLineRemoveUserRequest](./docs/model/FaxLineRemoveUserRequest.md) +- [FaxLineResponse](./docs/model/FaxLineResponse.md) +- [FaxLineResponseFaxLine](./docs/model/FaxLineResponseFaxLine.md) - [FileResponse](./docs/model/FileResponse.md) - [FileResponseDataUri](./docs/model/FileResponseDataUri.md) - [ListInfoResponse](./docs/model/ListInfoResponse.md) diff --git a/sdks/node/api/faxLineApi.ts b/sdks/node/api/faxLineApi.ts new file mode 100644 index 000000000..9d035a633 --- /dev/null +++ b/sdks/node/api/faxLineApi.ts @@ -0,0 +1,1272 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import axios, { AxiosError, AxiosRequestConfig } from "axios"; + +/* tslint:disable:no-unused-locals */ +import { + ObjectSerializer, + Authentication, + VoidAuth, + Interceptor, + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, + ErrorResponse, + FaxLineAddUserRequest, + FaxLineAreaCodeGetResponse, + FaxLineCreateRequest, + FaxLineDeleteRequest, + FaxLineListResponse, + FaxLineRemoveUserRequest, + FaxLineResponse, +} from "../model"; + +import { + HttpError, + optionsI, + returnTypeT, + returnTypeI, + generateFormData, + toFormData, + queryParamsSerializer, + USER_AGENT, +} from "./"; + +let defaultBasePath = "https://api.hellosign.com/v3"; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum FaxLineApiApiKeys {} + +export class FaxLineApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders: any = { + "User-Agent": USER_AGENT, + }; + protected _useQuerystring: boolean = false; + + protected authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth(), + }; + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string) { + if (basePath) { + this.basePath = basePath; + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: string) { + this.authentications.api_key.username = key; + } + + set username(username: string) { + this.authentications.api_key.username = username; + } + + set password(password: string) { + this.authentications.api_key.password = password; + } + + set accessToken(accessToken: string | (() => string)) { + this.authentications.oauth2.accessToken = accessToken; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * Grants a user access to the specified Fax Line. + * @summary Add Fax Line User + * @param faxLineAddUserRequest + * @param options + */ + public async faxLineAddUser( + faxLineAddUserRequest: FaxLineAddUserRequest, + options: optionsI = { headers: {} } + ): Promise> { + if ( + faxLineAddUserRequest !== null && + faxLineAddUserRequest !== undefined && + faxLineAddUserRequest.constructor.name !== "FaxLineAddUserRequest" + ) { + faxLineAddUserRequest = ObjectSerializer.deserialize( + faxLineAddUserRequest, + "FaxLineAddUserRequest" + ); + } + + const localVarPath = this.basePath + "/fax_line/add_user"; + 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 'faxLineAddUserRequest' is not null or undefined + if (faxLineAddUserRequest === null || faxLineAddUserRequest === undefined) { + throw new Error( + "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + faxLineAddUserRequest, + FaxLineAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + faxLineAddUserRequest, + "FaxLineAddUserRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns a response with the area codes available for a given state/provice and city. + * @summary Get Available Fax Line Area Codes + * @param country Filter area codes by country. + * @param state Filter area codes by state. + * @param province Filter area codes by province. + * @param city Filter area codes by city. + * @param options + */ + public async faxLineAreaCodeGet( + country: "CA" | "US" | "UK", + state?: + | "AK" + | "AL" + | "AR" + | "AZ" + | "CA" + | "CO" + | "CT" + | "DC" + | "DE" + | "FL" + | "GA" + | "HI" + | "IA" + | "ID" + | "IL" + | "IN" + | "KS" + | "KY" + | "LA" + | "MA" + | "MD" + | "ME" + | "MI" + | "MN" + | "MO" + | "MS" + | "MT" + | "NC" + | "ND" + | "NE" + | "NH" + | "NJ" + | "NM" + | "NV" + | "NY" + | "OH" + | "OK" + | "OR" + | "PA" + | "RI" + | "SC" + | "SD" + | "TN" + | "TX" + | "UT" + | "VA" + | "VT" + | "WA" + | "WI" + | "WV" + | "WY", + province?: + | "AB" + | "BC" + | "MB" + | "NB" + | "NL" + | "NT" + | "NS" + | "NU" + | "ON" + | "PE" + | "QC" + | "SK" + | "YT", + city?: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/fax_line/area_codes"; + 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 'country' is not null or undefined + if (country === null || country === undefined) { + throw new Error( + "Required parameter country was null or undefined when calling faxLineAreaCodeGet." + ); + } + + if (country !== undefined) { + localVarQueryParameters["country"] = ObjectSerializer.serialize( + country, + "'CA' | 'US' | 'UK'" + ); + } + + if (state !== undefined) { + localVarQueryParameters["state"] = ObjectSerializer.serialize( + state, + "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" + ); + } + + if (province !== undefined) { + localVarQueryParameters["province"] = ObjectSerializer.serialize( + province, + "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" + ); + } + + if (city !== undefined) { + localVarQueryParameters["city"] = ObjectSerializer.serialize( + city, + "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) + ); + } + 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) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize( + body, + "FaxLineAreaCodeGetResponse" + ); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineAreaCodeGetResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Purchases a new Fax Line. + * @summary Purchase Fax Line + * @param faxLineCreateRequest + * @param options + */ + public async faxLineCreate( + faxLineCreateRequest: FaxLineCreateRequest, + options: optionsI = { headers: {} } + ): Promise> { + if ( + faxLineCreateRequest !== null && + faxLineCreateRequest !== undefined && + faxLineCreateRequest.constructor.name !== "FaxLineCreateRequest" + ) { + faxLineCreateRequest = ObjectSerializer.deserialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + + const localVarPath = this.basePath + "/fax_line/create"; + 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 'faxLineCreateRequest' is not null or undefined + if (faxLineCreateRequest === null || faxLineCreateRequest === undefined) { + throw new Error( + "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + faxLineCreateRequest, + FaxLineCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>((resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Deletes the specified Fax Line from the subscription. + * @summary Delete Fax Line + * @param faxLineDeleteRequest + * @param options + */ + public async faxLineDelete( + faxLineDeleteRequest: FaxLineDeleteRequest, + options: optionsI = { headers: {} } + ): Promise { + if ( + faxLineDeleteRequest !== null && + faxLineDeleteRequest !== undefined && + faxLineDeleteRequest.constructor.name !== "FaxLineDeleteRequest" + ) { + faxLineDeleteRequest = ObjectSerializer.deserialize( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + } + + const localVarPath = this.basePath + "/fax_line"; + 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 'faxLineDeleteRequest' is not null or undefined + if (faxLineDeleteRequest === null || faxLineDeleteRequest === undefined) { + throw new Error( + "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + faxLineDeleteRequest, + FaxLineDeleteRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns the properties and settings of a Fax Line. + * @summary Get Fax Line + * @param number The Fax Line number. + * @param options + */ + public async faxLineGet( + number: string, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/fax_line"; + 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 'number' is not null or undefined + if (number === null || number === undefined) { + throw new Error( + "Required parameter number was null or undefined when calling faxLineGet." + ); + } + + if (number !== undefined) { + localVarQueryParameters["number"] = ObjectSerializer.serialize( + number, + "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) + ); + } + 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) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + }); + }); + } + /** + * Returns the properties and settings of multiple Fax Lines. + * @summary List Fax Lines + * @param accountId Account ID + * @param page Page + * @param pageSize Page size + * @param showTeamLines Show team lines + * @param options + */ + public async faxLineList( + accountId?: string, + page?: number, + pageSize?: number, + showTeamLines?: boolean, + options: optionsI = { headers: {} } + ): Promise> { + const localVarPath = this.basePath + "/fax_line/list"; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + if (accountId !== undefined) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + + if (page !== undefined) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + + if (pageSize !== undefined) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + + if (showTeamLines !== undefined) { + localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( + showTeamLines, + "boolean" + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: AxiosRequestConfig = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize( + body, + "FaxLineListResponse" + ); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineListResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Removes a user\'s access to the specified Fax Line. + * @summary Remove Fax Line Access + * @param faxLineRemoveUserRequest + * @param options + */ + public async faxLineRemoveUser( + faxLineRemoveUserRequest: FaxLineRemoveUserRequest, + options: optionsI = { headers: {} } + ): Promise> { + if ( + faxLineRemoveUserRequest !== null && + faxLineRemoveUserRequest !== undefined && + faxLineRemoveUserRequest.constructor.name !== "FaxLineRemoveUserRequest" + ) { + faxLineRemoveUserRequest = ObjectSerializer.deserialize( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + } + + const localVarPath = this.basePath + "/fax_line/remove_user"; + 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 'faxLineRemoveUserRequest' is not null or undefined + if ( + faxLineRemoveUserRequest === null || + faxLineRemoveUserRequest === undefined + ) { + throw new Error( + "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + faxLineRemoveUserRequest, + FaxLineRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + + if ( + response.status && + response.status >= 200 && + response.status <= 299 + ) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + const response = error.response; + + let body; + + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if ( + response.status >= rangeCodeLeft && + response.status <= rangeCodeRight + ) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + + reject(new HttpError(response, body, response.status)); + return; + } + + reject(error); + } + ); + }); + }); + } +} diff --git a/sdks/node/api/index.ts b/sdks/node/api/index.ts index fa778faf6..35c0b5b66 100644 --- a/sdks/node/api/index.ts +++ b/sdks/node/api/index.ts @@ -2,6 +2,7 @@ import { AccountApi } from "./accountApi"; import { ApiAppApi } from "./apiAppApi"; import { BulkSendJobApi } from "./bulkSendJobApi"; import { EmbeddedApi } from "./embeddedApi"; +import { FaxLineApi } from "./faxLineApi"; import { OAuthApi } from "./oAuthApi"; import { ReportApi } from "./reportApi"; import { SignatureRequestApi } from "./signatureRequestApi"; @@ -14,6 +15,7 @@ export { ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, @@ -38,6 +40,7 @@ export const APIS = [ ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index a55935245..a8ea077e2 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -12973,6 +12973,18 @@ __export(api_exports, { EventCallbackRequest: () => EventCallbackRequest, EventCallbackRequestEvent: () => EventCallbackRequestEvent, EventCallbackRequestEventMetadata: () => EventCallbackRequestEventMetadata, + FaxLineAddUserRequest: () => FaxLineAddUserRequest, + FaxLineApi: () => FaxLineApi, + FaxLineAreaCodeGetCountryEnum: () => FaxLineAreaCodeGetCountryEnum, + FaxLineAreaCodeGetProvinceEnum: () => FaxLineAreaCodeGetProvinceEnum, + FaxLineAreaCodeGetResponse: () => FaxLineAreaCodeGetResponse, + FaxLineAreaCodeGetStateEnum: () => FaxLineAreaCodeGetStateEnum, + FaxLineCreateRequest: () => FaxLineCreateRequest, + FaxLineDeleteRequest: () => FaxLineDeleteRequest, + FaxLineListResponse: () => FaxLineListResponse, + FaxLineRemoveUserRequest: () => FaxLineRemoveUserRequest, + FaxLineResponse: () => FaxLineResponse, + FaxLineResponseFaxLine: () => FaxLineResponseFaxLine, FileResponse: () => FileResponse, FileResponseDataUri: () => FileResponseDataUri, HttpBasicAuth: () => HttpBasicAuth, @@ -17652,6 +17664,313 @@ EventCallbackRequestEventMetadata.attributeTypeMap = [ } ]; +// model/faxLineAddUserRequest.ts +var _FaxLineAddUserRequest = class { + static getAttributeTypeMap() { + return _FaxLineAddUserRequest.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineAddUserRequest"); + } +}; +var FaxLineAddUserRequest = _FaxLineAddUserRequest; +FaxLineAddUserRequest.discriminator = void 0; +FaxLineAddUserRequest.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } +]; + +// model/faxLineAreaCodeGetCountryEnum.ts +var FaxLineAreaCodeGetCountryEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetCountryEnum2) => { + FaxLineAreaCodeGetCountryEnum2["Ca"] = "CA"; + FaxLineAreaCodeGetCountryEnum2["Us"] = "US"; + FaxLineAreaCodeGetCountryEnum2["Uk"] = "UK"; + return FaxLineAreaCodeGetCountryEnum2; +})(FaxLineAreaCodeGetCountryEnum || {}); + +// model/faxLineAreaCodeGetProvinceEnum.ts +var FaxLineAreaCodeGetProvinceEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetProvinceEnum2) => { + FaxLineAreaCodeGetProvinceEnum2["Ab"] = "AB"; + FaxLineAreaCodeGetProvinceEnum2["Bc"] = "BC"; + FaxLineAreaCodeGetProvinceEnum2["Mb"] = "MB"; + FaxLineAreaCodeGetProvinceEnum2["Nb"] = "NB"; + FaxLineAreaCodeGetProvinceEnum2["Nl"] = "NL"; + FaxLineAreaCodeGetProvinceEnum2["Nt"] = "NT"; + FaxLineAreaCodeGetProvinceEnum2["Ns"] = "NS"; + FaxLineAreaCodeGetProvinceEnum2["Nu"] = "NU"; + FaxLineAreaCodeGetProvinceEnum2["On"] = "ON"; + FaxLineAreaCodeGetProvinceEnum2["Pe"] = "PE"; + FaxLineAreaCodeGetProvinceEnum2["Qc"] = "QC"; + FaxLineAreaCodeGetProvinceEnum2["Sk"] = "SK"; + FaxLineAreaCodeGetProvinceEnum2["Yt"] = "YT"; + return FaxLineAreaCodeGetProvinceEnum2; +})(FaxLineAreaCodeGetProvinceEnum || {}); + +// model/faxLineAreaCodeGetResponse.ts +var _FaxLineAreaCodeGetResponse = class { + static getAttributeTypeMap() { + return _FaxLineAreaCodeGetResponse.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineAreaCodeGetResponse"); + } +}; +var FaxLineAreaCodeGetResponse = _FaxLineAreaCodeGetResponse; +FaxLineAreaCodeGetResponse.discriminator = void 0; +FaxLineAreaCodeGetResponse.attributeTypeMap = [ + { + name: "areaCodes", + baseName: "area_codes", + type: "Array" + } +]; + +// model/faxLineAreaCodeGetStateEnum.ts +var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2) => { + FaxLineAreaCodeGetStateEnum2["Ak"] = "AK"; + FaxLineAreaCodeGetStateEnum2["Al"] = "AL"; + FaxLineAreaCodeGetStateEnum2["Ar"] = "AR"; + FaxLineAreaCodeGetStateEnum2["Az"] = "AZ"; + FaxLineAreaCodeGetStateEnum2["Ca"] = "CA"; + FaxLineAreaCodeGetStateEnum2["Co"] = "CO"; + FaxLineAreaCodeGetStateEnum2["Ct"] = "CT"; + FaxLineAreaCodeGetStateEnum2["Dc"] = "DC"; + FaxLineAreaCodeGetStateEnum2["De"] = "DE"; + FaxLineAreaCodeGetStateEnum2["Fl"] = "FL"; + FaxLineAreaCodeGetStateEnum2["Ga"] = "GA"; + FaxLineAreaCodeGetStateEnum2["Hi"] = "HI"; + FaxLineAreaCodeGetStateEnum2["Ia"] = "IA"; + FaxLineAreaCodeGetStateEnum2["Id"] = "ID"; + FaxLineAreaCodeGetStateEnum2["Il"] = "IL"; + FaxLineAreaCodeGetStateEnum2["In"] = "IN"; + FaxLineAreaCodeGetStateEnum2["Ks"] = "KS"; + FaxLineAreaCodeGetStateEnum2["Ky"] = "KY"; + FaxLineAreaCodeGetStateEnum2["La"] = "LA"; + FaxLineAreaCodeGetStateEnum2["Ma"] = "MA"; + FaxLineAreaCodeGetStateEnum2["Md"] = "MD"; + FaxLineAreaCodeGetStateEnum2["Me"] = "ME"; + FaxLineAreaCodeGetStateEnum2["Mi"] = "MI"; + FaxLineAreaCodeGetStateEnum2["Mn"] = "MN"; + FaxLineAreaCodeGetStateEnum2["Mo"] = "MO"; + FaxLineAreaCodeGetStateEnum2["Ms"] = "MS"; + FaxLineAreaCodeGetStateEnum2["Mt"] = "MT"; + FaxLineAreaCodeGetStateEnum2["Nc"] = "NC"; + FaxLineAreaCodeGetStateEnum2["Nd"] = "ND"; + FaxLineAreaCodeGetStateEnum2["Ne"] = "NE"; + FaxLineAreaCodeGetStateEnum2["Nh"] = "NH"; + FaxLineAreaCodeGetStateEnum2["Nj"] = "NJ"; + FaxLineAreaCodeGetStateEnum2["Nm"] = "NM"; + FaxLineAreaCodeGetStateEnum2["Nv"] = "NV"; + FaxLineAreaCodeGetStateEnum2["Ny"] = "NY"; + FaxLineAreaCodeGetStateEnum2["Oh"] = "OH"; + FaxLineAreaCodeGetStateEnum2["Ok"] = "OK"; + FaxLineAreaCodeGetStateEnum2["Or"] = "OR"; + FaxLineAreaCodeGetStateEnum2["Pa"] = "PA"; + FaxLineAreaCodeGetStateEnum2["Ri"] = "RI"; + FaxLineAreaCodeGetStateEnum2["Sc"] = "SC"; + FaxLineAreaCodeGetStateEnum2["Sd"] = "SD"; + FaxLineAreaCodeGetStateEnum2["Tn"] = "TN"; + FaxLineAreaCodeGetStateEnum2["Tx"] = "TX"; + FaxLineAreaCodeGetStateEnum2["Ut"] = "UT"; + FaxLineAreaCodeGetStateEnum2["Va"] = "VA"; + FaxLineAreaCodeGetStateEnum2["Vt"] = "VT"; + FaxLineAreaCodeGetStateEnum2["Wa"] = "WA"; + FaxLineAreaCodeGetStateEnum2["Wi"] = "WI"; + FaxLineAreaCodeGetStateEnum2["Wv"] = "WV"; + FaxLineAreaCodeGetStateEnum2["Wy"] = "WY"; + return FaxLineAreaCodeGetStateEnum2; +})(FaxLineAreaCodeGetStateEnum || {}); + +// model/faxLineCreateRequest.ts +var _FaxLineCreateRequest = class { + static getAttributeTypeMap() { + return _FaxLineCreateRequest.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineCreateRequest"); + } +}; +var FaxLineCreateRequest = _FaxLineCreateRequest; +FaxLineCreateRequest.discriminator = void 0; +FaxLineCreateRequest.attributeTypeMap = [ + { + name: "areaCode", + baseName: "area_code", + type: "number" + }, + { + name: "country", + baseName: "country", + type: "FaxLineCreateRequest.CountryEnum" + }, + { + name: "city", + baseName: "city", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + } +]; +((FaxLineCreateRequest2) => { + let CountryEnum; + ((CountryEnum2) => { + CountryEnum2["Ca"] = "CA"; + CountryEnum2["Us"] = "US"; + CountryEnum2["Uk"] = "UK"; + })(CountryEnum = FaxLineCreateRequest2.CountryEnum || (FaxLineCreateRequest2.CountryEnum = {})); +})(FaxLineCreateRequest || (FaxLineCreateRequest = {})); + +// model/faxLineDeleteRequest.ts +var _FaxLineDeleteRequest = class { + static getAttributeTypeMap() { + return _FaxLineDeleteRequest.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineDeleteRequest"); + } +}; +var FaxLineDeleteRequest = _FaxLineDeleteRequest; +FaxLineDeleteRequest.discriminator = void 0; +FaxLineDeleteRequest.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + } +]; + +// model/faxLineListResponse.ts +var _FaxLineListResponse = class { + static getAttributeTypeMap() { + return _FaxLineListResponse.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineListResponse"); + } +}; +var FaxLineListResponse = _FaxLineListResponse; +FaxLineListResponse.discriminator = void 0; +FaxLineListResponse.attributeTypeMap = [ + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "faxLines", + baseName: "fax_lines", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } +]; + +// model/faxLineRemoveUserRequest.ts +var _FaxLineRemoveUserRequest = class { + static getAttributeTypeMap() { + return _FaxLineRemoveUserRequest.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineRemoveUserRequest"); + } +}; +var FaxLineRemoveUserRequest = _FaxLineRemoveUserRequest; +FaxLineRemoveUserRequest.discriminator = void 0; +FaxLineRemoveUserRequest.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } +]; + +// model/faxLineResponse.ts +var _FaxLineResponse = class { + static getAttributeTypeMap() { + return _FaxLineResponse.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineResponse"); + } +}; +var FaxLineResponse = _FaxLineResponse; +FaxLineResponse.discriminator = void 0; +FaxLineResponse.attributeTypeMap = [ + { + name: "faxLine", + baseName: "fax_line", + type: "FaxLineResponseFaxLine" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } +]; + +// model/faxLineResponseFaxLine.ts +var _FaxLineResponseFaxLine = class { + static getAttributeTypeMap() { + return _FaxLineResponseFaxLine.attributeTypeMap; + } + static init(data) { + return ObjectSerializer.deserialize(data, "FaxLineResponseFaxLine"); + } +}; +var FaxLineResponseFaxLine = _FaxLineResponseFaxLine; +FaxLineResponseFaxLine.discriminator = void 0; +FaxLineResponseFaxLine.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + } +]; + // model/fileResponse.ts var _FileResponse = class { static getAttributeTypeMap() { @@ -24082,6 +24401,10 @@ var VoidAuth = class { // model/index.ts var enumsMap = { "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, + FaxLineAreaCodeGetCountryEnum, + FaxLineAreaCodeGetProvinceEnum, + FaxLineAreaCodeGetStateEnum, + "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum, @@ -24144,6 +24467,14 @@ var typeMap = { EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxLineAddUserRequest, + FaxLineAreaCodeGetResponse, + FaxLineCreateRequest, + FaxLineDeleteRequest, + FaxLineListResponse, + FaxLineRemoveUserRequest, + FaxLineResponse, + FaxLineResponseFaxLine, FileResponse, FileResponseDataUri, ListInfoResponse, @@ -25977,9 +26308,9 @@ var EmbeddedApi = class { } }; -// api/oAuthApi.ts -var defaultBasePath5 = "https://app.hellosign.com"; -var OAuthApi = class { +// api/faxLineApi.ts +var defaultBasePath5 = "https://api.hellosign.com/v3"; +var FaxLineApi = class { constructor(basePath) { this._basePath = defaultBasePath5; this._defaultHeaders = { @@ -26029,15 +26360,15 @@ var OAuthApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - oauthTokenGenerate(_0) { - return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { - if (oAuthTokenGenerateRequest !== null && oAuthTokenGenerateRequest !== void 0 && oAuthTokenGenerateRequest.constructor.name !== "OAuthTokenGenerateRequest") { - oAuthTokenGenerateRequest = ObjectSerializer.deserialize( - oAuthTokenGenerateRequest, - "OAuthTokenGenerateRequest" + faxLineAddUser(_0) { + return __async(this, arguments, function* (faxLineAddUserRequest, options = { headers: {} }) { + if (faxLineAddUserRequest !== null && faxLineAddUserRequest !== void 0 && faxLineAddUserRequest.constructor.name !== "FaxLineAddUserRequest") { + faxLineAddUserRequest = ObjectSerializer.deserialize( + faxLineAddUserRequest, + "FaxLineAddUserRequest" ); } - const localVarPath = this.basePath + "/oauth/token"; + const localVarPath = this.basePath + "/fax_line/add_user"; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign( {}, @@ -26051,16 +26382,16 @@ var OAuthApi = class { } let localVarFormParams = {}; let localVarBodyParams = void 0; - if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { + if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { throw new Error( - "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." + "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." ); } Object.assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; const result = generateFormData( - oAuthTokenGenerateRequest, - OAuthTokenGenerateRequest.attributeTypeMap + faxLineAddUserRequest, + FaxLineAddUserRequest.attributeTypeMap ); localVarUseFormData = result.localVarUseFormData; let data = {}; @@ -26070,12 +26401,12 @@ var OAuthApi = class { localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); } else { data = ObjectSerializer.serialize( - oAuthTokenGenerateRequest, - "OAuthTokenGenerateRequest" + faxLineAddUserRequest, + "FaxLineAddUserRequest" ); } let localVarRequestOptions = { - method: "POST", + method: "PUT", params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, @@ -26086,6 +26417,11 @@ var OAuthApi = class { data }; let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } authenticationPromise = authenticationPromise.then( () => this.authentications.default.applyToRequest(localVarRequestOptions) ); @@ -26101,7 +26437,7 @@ var OAuthApi = class { (response) => { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { - body = ObjectSerializer.deserialize(body, "OAuthTokenResponse"); + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); resolve({ response, body }); } else { reject(new HttpError(response, body, response.status)); @@ -26117,7 +26453,17 @@ var OAuthApi = class { if (response.status === 200) { body = ObjectSerializer.deserialize( response.data, - "OAuthTokenResponse" + "FaxLineResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" ); reject(new HttpError(response, body, response.status)); return; @@ -26129,15 +26475,9 @@ var OAuthApi = class { }); }); } - oauthTokenRefresh(_0) { - return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { - if (oAuthTokenRefreshRequest !== null && oAuthTokenRefreshRequest !== void 0 && oAuthTokenRefreshRequest.constructor.name !== "OAuthTokenRefreshRequest") { - oAuthTokenRefreshRequest = ObjectSerializer.deserialize( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" - ); - } - const localVarPath = this.basePath + "/oauth/token?refresh"; + faxLineAreaCodeGet(_0, _1, _2, _3) { + return __async(this, arguments, function* (country, state, province, city, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/area_codes"; let localVarQueryParameters = {}; let localVarHeaderParams = Object.assign( {}, @@ -26151,41 +26491,53 @@ var OAuthApi = class { } let localVarFormParams = {}; let localVarBodyParams = void 0; - if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { + if (country === null || country === void 0) { throw new Error( - "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." + "Required parameter country was null or undefined when calling faxLineAreaCodeGet." ); } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenRefreshRequest, - OAuthTokenRefreshRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" + if (country !== void 0) { + localVarQueryParameters["country"] = ObjectSerializer.serialize( + country, + "'CA' | 'US' | 'UK'" + ); + } + if (state !== void 0) { + localVarQueryParameters["state"] = ObjectSerializer.serialize( + state, + "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" + ); + } + if (province !== void 0) { + localVarQueryParameters["province"] = ObjectSerializer.serialize( + province, + "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" + ); + } + if (city !== void 0) { + localVarQueryParameters["city"] = ObjectSerializer.serialize( + city, + "string" ); } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; let localVarRequestOptions = { - method: "POST", + method: "GET", params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, maxContentLength: Infinity, maxBodyLength: Infinity, - responseType: "json", - data + responseType: "json" }; let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } authenticationPromise = authenticationPromise.then( () => this.authentications.default.applyToRequest(localVarRequestOptions) ); @@ -26196,49 +26548,868 @@ var OAuthApi = class { ); } return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - body = ObjectSerializer.deserialize(body, "OAuthTokenResponse"); - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - const response = error.response; - let body; - if (response.status === 200) { - body = ObjectSerializer.deserialize( - response.data, - "OAuthTokenResponse" - ); - reject(new HttpError(response, body, response.status)); - return; - } - reject(error); - } - ); - }); - }); - }); - } -}; - -// api/reportApi.ts -var defaultBasePath6 = "https://api.hellosign.com/v3"; -var ReportApi = class { - constructor(basePath) { - this._basePath = defaultBasePath6; - this._defaultHeaders = { - "User-Agent": USER_AGENT - }; + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize( + body, + "FaxLineAreaCodeGetResponse" + ); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineAreaCodeGetResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + } + ); + }); + }); + } + faxLineCreate(_0) { + return __async(this, arguments, function* (faxLineCreateRequest, options = { headers: {} }) { + if (faxLineCreateRequest !== null && faxLineCreateRequest !== void 0 && faxLineCreateRequest.constructor.name !== "FaxLineCreateRequest") { + faxLineCreateRequest = ObjectSerializer.deserialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + const localVarPath = this.basePath + "/fax_line/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { + throw new Error( + "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineCreateRequest, + FaxLineCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); + } else { + data = ObjectSerializer.serialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } + faxLineDelete(_0) { + return __async(this, arguments, function* (faxLineDeleteRequest, options = { headers: {} }) { + if (faxLineDeleteRequest !== null && faxLineDeleteRequest !== void 0 && faxLineDeleteRequest.constructor.name !== "FaxLineDeleteRequest") { + faxLineDeleteRequest = ObjectSerializer.deserialize( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + } + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { + throw new Error( + "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineDeleteRequest, + FaxLineDeleteRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); + } else { + data = ObjectSerializer.serialize( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + } + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } + faxLineGet(_0) { + return __async(this, arguments, function* (number, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (number === null || number === void 0) { + throw new Error( + "Required parameter number was null or undefined when calling faxLineGet." + ); + } + if (number !== void 0) { + localVarQueryParameters["number"] = ObjectSerializer.serialize( + number, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } + faxLineList(_0, _1, _2, _3) { + return __async(this, arguments, function* (accountId, page, pageSize, showTeamLines, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (showTeamLines !== void 0) { + localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( + showTeamLines, + "boolean" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize( + body, + "FaxLineListResponse" + ); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineListResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + } + ); + }); + }); + } + faxLineRemoveUser(_0) { + return __async(this, arguments, function* (faxLineRemoveUserRequest, options = { headers: {} }) { + if (faxLineRemoveUserRequest !== null && faxLineRemoveUserRequest !== void 0 && faxLineRemoveUserRequest.constructor.name !== "FaxLineRemoveUserRequest") { + faxLineRemoveUserRequest = ObjectSerializer.deserialize( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + } + const localVarPath = this.basePath + "/fax_line/remove_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { + throw new Error( + "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineRemoveUserRequest, + FaxLineRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); + } else { + data = ObjectSerializer.serialize( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize(body, "FaxLineResponse"); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "FaxLineResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + let rangeCodeLeft = Number("4XX"[0] + "00"); + let rangeCodeRight = Number("4XX"[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + body = ObjectSerializer.deserialize( + response.data, + "ErrorResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } +}; + +// api/oAuthApi.ts +var defaultBasePath6 = "https://app.hellosign.com"; +var OAuthApi = class { + constructor(basePath) { + this._basePath = defaultBasePath6; + this._defaultHeaders = { + "User-Agent": USER_AGENT + }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = defaultHeaders; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + oauthTokenGenerate(_0) { + return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { + if (oAuthTokenGenerateRequest !== null && oAuthTokenGenerateRequest !== void 0 && oAuthTokenGenerateRequest.constructor.name !== "OAuthTokenGenerateRequest") { + oAuthTokenGenerateRequest = ObjectSerializer.deserialize( + oAuthTokenGenerateRequest, + "OAuthTokenGenerateRequest" + ); + } + const localVarPath = this.basePath + "/oauth/token"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenGenerateRequest, + OAuthTokenGenerateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); + } else { + data = ObjectSerializer.serialize( + oAuthTokenGenerateRequest, + "OAuthTokenGenerateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize(body, "OAuthTokenResponse"); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "OAuthTokenResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } + oauthTokenRefresh(_0) { + return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { + if (oAuthTokenRefreshRequest !== null && oAuthTokenRefreshRequest !== void 0 && oAuthTokenRefreshRequest.constructor.name !== "OAuthTokenRefreshRequest") { + oAuthTokenRefreshRequest = ObjectSerializer.deserialize( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" + ); + } + const localVarPath = this.basePath + "/oauth/token?refresh"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenRefreshRequest, + OAuthTokenRefreshRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); + } else { + data = ObjectSerializer.serialize( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let 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) => { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + body = ObjectSerializer.deserialize(body, "OAuthTokenResponse"); + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + const response = error.response; + let body; + if (response.status === 200) { + body = ObjectSerializer.deserialize( + response.data, + "OAuthTokenResponse" + ); + reject(new HttpError(response, body, response.status)); + return; + } + reject(error); + } + ); + }); + }); + }); + } +}; + +// api/reportApi.ts +var defaultBasePath7 = "https://api.hellosign.com/v3"; +var ReportApi = class { + constructor(basePath) { + this._basePath = defaultBasePath7; + this._defaultHeaders = { + "User-Agent": USER_AGENT + }; this._useQuerystring = false; this.authentications = { default: new VoidAuth(), @@ -26406,10 +27577,10 @@ var ReportApi = class { }; // api/signatureRequestApi.ts -var defaultBasePath7 = "https://api.hellosign.com/v3"; +var defaultBasePath8 = "https://api.hellosign.com/v3"; var SignatureRequestApi = class { constructor(basePath) { - this._basePath = defaultBasePath7; + this._basePath = defaultBasePath8; this._defaultHeaders = { "User-Agent": USER_AGENT }; @@ -28293,10 +29464,10 @@ var SignatureRequestApi = class { }; // api/teamApi.ts -var defaultBasePath8 = "https://api.hellosign.com/v3"; +var defaultBasePath9 = "https://api.hellosign.com/v3"; var TeamApi = class { constructor(basePath) { - this._basePath = defaultBasePath8; + this._basePath = defaultBasePath9; this._defaultHeaders = { "User-Agent": USER_AGENT }; @@ -29442,10 +30613,10 @@ var TeamApi = class { }; // api/templateApi.ts -var defaultBasePath9 = "https://api.hellosign.com/v3"; +var defaultBasePath10 = "https://api.hellosign.com/v3"; var TemplateApi = class { constructor(basePath) { - this._basePath = defaultBasePath9; + this._basePath = defaultBasePath10; this._defaultHeaders = { "User-Agent": USER_AGENT }; @@ -30776,10 +31947,10 @@ var TemplateApi = class { }; // api/unclaimedDraftApi.ts -var defaultBasePath10 = "https://api.hellosign.com/v3"; +var defaultBasePath11 = "https://api.hellosign.com/v3"; var UnclaimedDraftApi = class { constructor(basePath) { - this._basePath = defaultBasePath10; + this._basePath = defaultBasePath11; this._defaultHeaders = { "User-Agent": USER_AGENT }; @@ -31416,6 +32587,7 @@ var APIS = [ ApiAppApi, BulkSendJobApi, EmbeddedApi, + FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, @@ -31466,6 +32638,18 @@ var APIS = [ EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxLineAddUserRequest, + FaxLineApi, + FaxLineAreaCodeGetCountryEnum, + FaxLineAreaCodeGetProvinceEnum, + FaxLineAreaCodeGetResponse, + FaxLineAreaCodeGetStateEnum, + FaxLineCreateRequest, + FaxLineDeleteRequest, + FaxLineListResponse, + FaxLineRemoveUserRequest, + FaxLineResponse, + FaxLineResponseFaxLine, FileResponse, FileResponseDataUri, HttpBasicAuth, diff --git a/sdks/node/docs/api/FaxLineApi.md b/sdks/node/docs/api/FaxLineApi.md new file mode 100644 index 000000000..4d9f6208b --- /dev/null +++ b/sdks/node/docs/api/FaxLineApi.md @@ -0,0 +1,567 @@ +# FaxLineApi + +All URIs are relative to https://api.hellosign.com/v3. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**faxLineAddUser()**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User | +| [**faxLineAreaCodeGet()**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +| [**faxLineCreate()**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line | +| [**faxLineDelete()**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line | +| [**faxLineGet()**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line | +| [**faxLineList()**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines | +| [**faxLineRemoveUser()**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | + + +## `faxLineAddUser()` + +```typescript +faxLineAddUser(faxLineAddUserRequest: FaxLineAddUserRequest): FaxLineResponse +``` + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineAddUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineAddUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineAddUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](../model/FaxLineAddUserRequest.md)| | | + +### Return type + +[**FaxLineResponse**](../model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineAreaCodeGet()` + +```typescript +faxLineAreaCodeGet(country: 'CA' | 'US' | 'UK', state: 'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY', province: 'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT', city: string): FaxLineAreaCodeGetResponse +``` + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **country** | **'CA' | 'US' | 'UK'**| Filter area codes by country. | | +| **state** | **'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'**| Filter area codes by state. | [optional] | +| **province** | **'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'**| Filter area codes by province. | [optional] | +| **city** | **string**| Filter area codes by city. | [optional] | + +### Return type + +[**FaxLineAreaCodeGetResponse**](../model/FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineCreate()` + +```typescript +faxLineCreate(faxLineCreateRequest: FaxLineCreateRequest): FaxLineResponse +``` + +Purchase Fax Line + +Purchases a new Fax Line. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineCreateRequest = { + areaCode: 209, + country: "US", +}; + +const result = faxLineApi.faxLineCreate(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + areaCode: 209, + country: "US", +}; + +const result = faxLineApi.faxLineCreate(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxLineCreateRequest** | [**FaxLineCreateRequest**](../model/FaxLineCreateRequest.md)| | | + +### Return type + +[**FaxLineResponse**](../model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineDelete()` + +```typescript +faxLineDelete(faxLineDeleteRequest: FaxLineDeleteRequest) +``` + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineDeleteRequest = { + number: "[FAX_NUMBER]", +}; + +const result = faxLineApi.faxLineDelete(data); + +result.catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", +}; + +const result = faxLineApi.faxLineDelete(data); + +result.catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](../model/FaxLineDeleteRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineGet()` + +```typescript +faxLineGet(number: string): FaxLineResponse +``` + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **number** | **string**| The Fax Line number. | | + +### Return type + +[**FaxLineResponse**](../model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineList()` + +```typescript +faxLineList(accountId: string, page: number, pageSize: number, showTeamLines: boolean): FaxLineListResponse +``` + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineList(); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const result = faxLineApi.faxLineList(); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **accountId** | **string**| Account ID | [optional] | +| **page** | **number**| Page | [optional] [default to 1] | +| **pageSize** | **number**| Page size | [optional] [default to 20] | +| **showTeamLines** | **boolean**| Show team lines | [optional] | + +### Return type + +[**FaxLineListResponse**](../model/FaxLineListResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineRemoveUser()` + +```typescript +faxLineRemoveUser(faxLineRemoveUserRequest: FaxLineRemoveUserRequest): FaxLineResponse +``` + +Remove Fax Line Access + +Removes a user\'s access to the specified Fax Line. + +### TypeScript Example + +```typescript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data: DropboxSign.FaxLineRemoveUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineRemoveUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### JavaScript Example + +```javascript +import * as DropboxSign from "@dropbox/sign"; + +const faxLineApi = new DropboxSign.FaxLineApi(); + +// Configure HTTP basic authorization: api_key +faxLineApi.username = "YOUR_API_KEY"; + +const data = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +const result = faxLineApi.faxLineRemoveUser(data); +result.then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling Dropbox Sign API:"); + console.log(error.body); +}); + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](../model/FaxLineRemoveUserRequest.md)| | | + +### Return type + +[**FaxLineResponse**](../model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) diff --git a/sdks/node/docs/model/FaxLineAddUserRequest.md b/sdks/node/docs/model/FaxLineAddUserRequest.md new file mode 100644 index 000000000..df23c2cdb --- /dev/null +++ b/sdks/node/docs/model/FaxLineAddUserRequest.md @@ -0,0 +1,13 @@ +# # FaxLineAddUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | +| `accountId` | ```string``` | Account ID | | +| `emailAddress` | ```string``` | Email address | | + +[[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/FaxLineAreaCodeGetCountryEnum.md b/sdks/node/docs/model/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..91b758d8f --- /dev/null +++ b/sdks/node/docs/model/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetCountryEnum + + + +## 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/FaxLineAreaCodeGetProvinceEnum.md b/sdks/node/docs/model/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..369a34359 --- /dev/null +++ b/sdks/node/docs/model/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetProvinceEnum + + + +## 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/FaxLineAreaCodeGetResponse.md b/sdks/node/docs/model/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..c35e56042 --- /dev/null +++ b/sdks/node/docs/model/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,11 @@ +# # FaxLineAreaCodeGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCodes` | ```Array``` | | | + +[[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/FaxLineAreaCodeGetStateEnum.md b/sdks/node/docs/model/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..f978b75a2 --- /dev/null +++ b/sdks/node/docs/model/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetStateEnum + + + +## 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/FaxLineCreateRequest.md b/sdks/node/docs/model/FaxLineCreateRequest.md new file mode 100644 index 000000000..ae70b5cb9 --- /dev/null +++ b/sdks/node/docs/model/FaxLineCreateRequest.md @@ -0,0 +1,14 @@ +# # FaxLineCreateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `areaCode`*_required_ | ```number``` | Area code | | +| `country`*_required_ | ```string``` | Country | | +| `city` | ```string``` | City | | +| `accountId` | ```string``` | Account 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/FaxLineDeleteRequest.md b/sdks/node/docs/model/FaxLineDeleteRequest.md new file mode 100644 index 000000000..a2112ed33 --- /dev/null +++ b/sdks/node/docs/model/FaxLineDeleteRequest.md @@ -0,0 +1,11 @@ +# # FaxLineDeleteRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/FaxLineListResponse.md b/sdks/node/docs/model/FaxLineListResponse.md new file mode 100644 index 000000000..68ff414e0 --- /dev/null +++ b/sdks/node/docs/model/FaxLineListResponse.md @@ -0,0 +1,13 @@ +# # FaxLineListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `listInfo` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `faxLines` | [```Array```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.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/FaxLineRemoveUserRequest.md b/sdks/node/docs/model/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..e161ecf38 --- /dev/null +++ b/sdks/node/docs/model/FaxLineRemoveUserRequest.md @@ -0,0 +1,13 @@ +# # FaxLineRemoveUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | +| `accountId` | ```string``` | Account ID | | +| `emailAddress` | ```string``` | Email address | | + +[[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/FaxLineResponse.md b/sdks/node/docs/model/FaxLineResponse.md new file mode 100644 index 000000000..e146e6b15 --- /dev/null +++ b/sdks/node/docs/model/FaxLineResponse.md @@ -0,0 +1,12 @@ +# # FaxLineResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `faxLine` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.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/FaxLineResponseFaxLine.md b/sdks/node/docs/model/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..aaf5b0f21 --- /dev/null +++ b/sdks/node/docs/model/FaxLineResponseFaxLine.md @@ -0,0 +1,14 @@ +# # FaxLineResponseFaxLine + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number` | ```string``` | Number | | +| `createdAt` | ```number``` | Created at | | +| `updatedAt` | ```number``` | Updated at | | +| `accounts` | [```Array```](AccountResponse.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/model/faxLineAddUserRequest.ts b/sdks/node/model/faxLineAddUserRequest.ts new file mode 100644 index 000000000..6e297b5a8 --- /dev/null +++ b/sdks/node/model/faxLineAddUserRequest.ts @@ -0,0 +1,69 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export class FaxLineAddUserRequest { + /** + * The Fax Line number. + */ + "number": string; + /** + * Account ID + */ + "accountId"?: string; + /** + * Email address + */ + "emailAddress"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string", + }, + { + name: "accountId", + baseName: "account_id", + type: "string", + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineAddUserRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineAddUserRequest { + return ObjectSerializer.deserialize(data, "FaxLineAddUserRequest"); + } +} diff --git a/sdks/node/model/faxLineAreaCodeGetCountryEnum.ts b/sdks/node/model/faxLineAreaCodeGetCountryEnum.ts new file mode 100644 index 000000000..abcd32ba3 --- /dev/null +++ b/sdks/node/model/faxLineAreaCodeGetCountryEnum.ts @@ -0,0 +1,31 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export enum FaxLineAreaCodeGetCountryEnum { + Ca = "CA", + Us = "US", + Uk = "UK", +} diff --git a/sdks/node/model/faxLineAreaCodeGetProvinceEnum.ts b/sdks/node/model/faxLineAreaCodeGetProvinceEnum.ts new file mode 100644 index 000000000..4c4ced02b --- /dev/null +++ b/sdks/node/model/faxLineAreaCodeGetProvinceEnum.ts @@ -0,0 +1,41 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export enum FaxLineAreaCodeGetProvinceEnum { + Ab = "AB", + Bc = "BC", + Mb = "MB", + Nb = "NB", + Nl = "NL", + Nt = "NT", + Ns = "NS", + Nu = "NU", + On = "ON", + Pe = "PE", + Qc = "QC", + Sk = "SK", + Yt = "YT", +} diff --git a/sdks/node/model/faxLineAreaCodeGetResponse.ts b/sdks/node/model/faxLineAreaCodeGetResponse.ts new file mode 100644 index 000000000..174a0e200 --- /dev/null +++ b/sdks/node/model/faxLineAreaCodeGetResponse.ts @@ -0,0 +1,48 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export class FaxLineAreaCodeGetResponse { + "areaCodes"?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "areaCodes", + baseName: "area_codes", + type: "Array", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineAreaCodeGetResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineAreaCodeGetResponse { + return ObjectSerializer.deserialize(data, "FaxLineAreaCodeGetResponse"); + } +} diff --git a/sdks/node/model/faxLineAreaCodeGetStateEnum.ts b/sdks/node/model/faxLineAreaCodeGetStateEnum.ts new file mode 100644 index 000000000..83eb8ead1 --- /dev/null +++ b/sdks/node/model/faxLineAreaCodeGetStateEnum.ts @@ -0,0 +1,79 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export enum FaxLineAreaCodeGetStateEnum { + Ak = "AK", + Al = "AL", + Ar = "AR", + Az = "AZ", + Ca = "CA", + Co = "CO", + Ct = "CT", + Dc = "DC", + De = "DE", + Fl = "FL", + Ga = "GA", + Hi = "HI", + Ia = "IA", + Id = "ID", + Il = "IL", + In = "IN", + Ks = "KS", + Ky = "KY", + La = "LA", + Ma = "MA", + Md = "MD", + Me = "ME", + Mi = "MI", + Mn = "MN", + Mo = "MO", + Ms = "MS", + Mt = "MT", + Nc = "NC", + Nd = "ND", + Ne = "NE", + Nh = "NH", + Nj = "NJ", + Nm = "NM", + Nv = "NV", + Ny = "NY", + Oh = "OH", + Ok = "OK", + Or = "OR", + Pa = "PA", + Ri = "RI", + Sc = "SC", + Sd = "SD", + Tn = "TN", + Tx = "TX", + Ut = "UT", + Va = "VA", + Vt = "VT", + Wa = "WA", + Wi = "WI", + Wv = "WV", + Wy = "WY", +} diff --git a/sdks/node/model/faxLineCreateRequest.ts b/sdks/node/model/faxLineCreateRequest.ts new file mode 100644 index 000000000..57d956676 --- /dev/null +++ b/sdks/node/model/faxLineCreateRequest.ts @@ -0,0 +1,86 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export class FaxLineCreateRequest { + /** + * Area code + */ + "areaCode": number; + /** + * Country + */ + "country": FaxLineCreateRequest.CountryEnum; + /** + * City + */ + "city"?: string; + /** + * Account ID + */ + "accountId"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "areaCode", + baseName: "area_code", + type: "number", + }, + { + name: "country", + baseName: "country", + type: "FaxLineCreateRequest.CountryEnum", + }, + { + name: "city", + baseName: "city", + type: "string", + }, + { + name: "accountId", + baseName: "account_id", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineCreateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineCreateRequest { + return ObjectSerializer.deserialize(data, "FaxLineCreateRequest"); + } +} + +export namespace FaxLineCreateRequest { + export enum CountryEnum { + Ca = "CA", + Us = "US", + Uk = "UK", + } +} diff --git a/sdks/node/model/faxLineDeleteRequest.ts b/sdks/node/model/faxLineDeleteRequest.ts new file mode 100644 index 000000000..9db23ffeb --- /dev/null +++ b/sdks/node/model/faxLineDeleteRequest.ts @@ -0,0 +1,51 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export class FaxLineDeleteRequest { + /** + * The Fax Line number. + */ + "number": string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineDeleteRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineDeleteRequest { + return ObjectSerializer.deserialize(data, "FaxLineDeleteRequest"); + } +} diff --git a/sdks/node/model/faxLineListResponse.ts b/sdks/node/model/faxLineListResponse.ts new file mode 100644 index 000000000..22fd72ecf --- /dev/null +++ b/sdks/node/model/faxLineListResponse.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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { ListInfoResponse } from "./listInfoResponse"; +import { WarningResponse } from "./warningResponse"; + +export class FaxLineListResponse { + "listInfo"?: ListInfoResponse; + "faxLines"?: Array; + "warnings"?: WarningResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse", + }, + { + name: "faxLines", + baseName: "fax_lines", + type: "Array", + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineListResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineListResponse { + return ObjectSerializer.deserialize(data, "FaxLineListResponse"); + } +} diff --git a/sdks/node/model/faxLineRemoveUserRequest.ts b/sdks/node/model/faxLineRemoveUserRequest.ts new file mode 100644 index 000000000..b415b8eb5 --- /dev/null +++ b/sdks/node/model/faxLineRemoveUserRequest.ts @@ -0,0 +1,69 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; + +export class FaxLineRemoveUserRequest { + /** + * The Fax Line number. + */ + "number": string; + /** + * Account ID + */ + "accountId"?: string; + /** + * Email address + */ + "emailAddress"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string", + }, + { + name: "accountId", + baseName: "account_id", + type: "string", + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineRemoveUserRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineRemoveUserRequest { + return ObjectSerializer.deserialize(data, "FaxLineRemoveUserRequest"); + } +} diff --git a/sdks/node/model/faxLineResponse.ts b/sdks/node/model/faxLineResponse.ts new file mode 100644 index 000000000..edbd397fd --- /dev/null +++ b/sdks/node/model/faxLineResponse.ts @@ -0,0 +1,56 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { WarningResponse } from "./warningResponse"; + +export class FaxLineResponse { + "faxLine"?: FaxLineResponseFaxLine; + "warnings"?: WarningResponse; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "faxLine", + baseName: "fax_line", + type: "FaxLineResponseFaxLine", + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineResponse { + return ObjectSerializer.deserialize(data, "FaxLineResponse"); + } +} diff --git a/sdks/node/model/faxLineResponseFaxLine.ts b/sdks/node/model/faxLineResponseFaxLine.ts new file mode 100644 index 000000000..da6e919ff --- /dev/null +++ b/sdks/node/model/faxLineResponseFaxLine.ts @@ -0,0 +1,76 @@ +/** + * 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 { RequestFile, AttributeTypeMap, ObjectSerializer } from "./"; +import { AccountResponse } from "./accountResponse"; + +export class FaxLineResponseFaxLine { + /** + * Number + */ + "number"?: string; + /** + * Created at + */ + "createdAt"?: number; + /** + * Updated at + */ + "updatedAt"?: number; + "accounts"?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string", + }, + { + name: "createdAt", + baseName: "created_at", + type: "number", + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number", + }, + { + name: "accounts", + baseName: "accounts", + type: "Array", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return FaxLineResponseFaxLine.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): FaxLineResponseFaxLine { + return ObjectSerializer.deserialize(data, "FaxLineResponseFaxLine"); + } +} diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 60062191f..719921cba 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -32,6 +32,17 @@ import { ErrorResponseError } from "./errorResponseError"; import { EventCallbackRequest } from "./eventCallbackRequest"; import { EventCallbackRequestEvent } from "./eventCallbackRequestEvent"; import { EventCallbackRequestEventMetadata } from "./eventCallbackRequestEventMetadata"; +import { FaxLineAddUserRequest } from "./faxLineAddUserRequest"; +import { FaxLineAreaCodeGetCountryEnum } from "./faxLineAreaCodeGetCountryEnum"; +import { FaxLineAreaCodeGetProvinceEnum } from "./faxLineAreaCodeGetProvinceEnum"; +import { FaxLineAreaCodeGetResponse } from "./faxLineAreaCodeGetResponse"; +import { FaxLineAreaCodeGetStateEnum } from "./faxLineAreaCodeGetStateEnum"; +import { FaxLineCreateRequest } from "./faxLineCreateRequest"; +import { FaxLineDeleteRequest } from "./faxLineDeleteRequest"; +import { FaxLineListResponse } from "./faxLineListResponse"; +import { FaxLineRemoveUserRequest } from "./faxLineRemoveUserRequest"; +import { FaxLineResponse } from "./faxLineResponse"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; @@ -188,6 +199,10 @@ import { export let enumsMap: { [index: string]: any } = { "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, + FaxLineAreaCodeGetCountryEnum: FaxLineAreaCodeGetCountryEnum, + FaxLineAreaCodeGetProvinceEnum: FaxLineAreaCodeGetProvinceEnum, + FaxLineAreaCodeGetStateEnum: FaxLineAreaCodeGetStateEnum, + "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum: @@ -264,6 +279,14 @@ export let typeMap: { [index: string]: any } = { EventCallbackRequest: EventCallbackRequest, EventCallbackRequestEvent: EventCallbackRequestEvent, EventCallbackRequestEventMetadata: EventCallbackRequestEventMetadata, + FaxLineAddUserRequest: FaxLineAddUserRequest, + FaxLineAreaCodeGetResponse: FaxLineAreaCodeGetResponse, + FaxLineCreateRequest: FaxLineCreateRequest, + FaxLineDeleteRequest: FaxLineDeleteRequest, + FaxLineListResponse: FaxLineListResponse, + FaxLineRemoveUserRequest: FaxLineRemoveUserRequest, + FaxLineResponse: FaxLineResponse, + FaxLineResponseFaxLine: FaxLineResponseFaxLine, FileResponse: FileResponse, FileResponseDataUri: FileResponseDataUri, ListInfoResponse: ListInfoResponse, @@ -472,6 +495,17 @@ export { EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, + FaxLineAddUserRequest, + FaxLineAreaCodeGetCountryEnum, + FaxLineAreaCodeGetProvinceEnum, + FaxLineAreaCodeGetResponse, + FaxLineAreaCodeGetStateEnum, + FaxLineCreateRequest, + FaxLineDeleteRequest, + FaxLineListResponse, + FaxLineRemoveUserRequest, + FaxLineResponse, + FaxLineResponseFaxLine, FileResponse, FileResponseDataUri, ListInfoResponse, diff --git a/sdks/node/types/api/faxLineApi.d.ts b/sdks/node/types/api/faxLineApi.d.ts new file mode 100644 index 000000000..7326eaceb --- /dev/null +++ b/sdks/node/types/api/faxLineApi.d.ts @@ -0,0 +1,34 @@ +import { Authentication, Interceptor, HttpBasicAuth, HttpBearerAuth, FaxLineAddUserRequest, FaxLineAreaCodeGetResponse, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse } from "../model"; +import { optionsI, returnTypeT, returnTypeI } from "./"; +export declare enum FaxLineApiApiKeys { +} +export declare class FaxLineApi { + protected _basePath: string; + protected _defaultHeaders: any; + protected _useQuerystring: boolean; + protected authentications: { + default: Authentication; + api_key: HttpBasicAuth; + oauth2: HttpBearerAuth; + }; + protected interceptors: Interceptor[]; + constructor(basePath?: string); + set useQuerystring(value: boolean); + set basePath(basePath: string); + set defaultHeaders(defaultHeaders: any); + get defaultHeaders(): any; + get basePath(): string; + setDefaultAuthentication(auth: Authentication): void; + setApiKey(key: string): void; + set username(username: string); + set password(password: string); + set accessToken(accessToken: string | (() => string)); + addInterceptor(interceptor: Interceptor): void; + faxLineAddUser(faxLineAddUserRequest: FaxLineAddUserRequest, options?: optionsI): Promise>; + faxLineAreaCodeGet(country: "CA" | "US" | "UK", state?: "AK" | "AL" | "AR" | "AZ" | "CA" | "CO" | "CT" | "DC" | "DE" | "FL" | "GA" | "HI" | "IA" | "ID" | "IL" | "IN" | "KS" | "KY" | "LA" | "MA" | "MD" | "ME" | "MI" | "MN" | "MO" | "MS" | "MT" | "NC" | "ND" | "NE" | "NH" | "NJ" | "NM" | "NV" | "NY" | "OH" | "OK" | "OR" | "PA" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VA" | "VT" | "WA" | "WI" | "WV" | "WY", province?: "AB" | "BC" | "MB" | "NB" | "NL" | "NT" | "NS" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT", city?: string, options?: optionsI): Promise>; + faxLineCreate(faxLineCreateRequest: FaxLineCreateRequest, options?: optionsI): Promise>; + faxLineDelete(faxLineDeleteRequest: FaxLineDeleteRequest, options?: optionsI): Promise; + faxLineGet(number: string, options?: optionsI): Promise>; + faxLineList(accountId?: string, page?: number, pageSize?: number, showTeamLines?: boolean, options?: optionsI): Promise>; + faxLineRemoveUser(faxLineRemoveUserRequest: FaxLineRemoveUserRequest, options?: optionsI): Promise>; +} diff --git a/sdks/node/types/api/index.d.ts b/sdks/node/types/api/index.d.ts index 42c100179..05ccdbb0e 100644 --- a/sdks/node/types/api/index.d.ts +++ b/sdks/node/types/api/index.d.ts @@ -2,12 +2,13 @@ import { AccountApi } from "./accountApi"; import { ApiAppApi } from "./apiAppApi"; import { BulkSendJobApi } from "./bulkSendJobApi"; import { EmbeddedApi } from "./embeddedApi"; +import { FaxLineApi } from "./faxLineApi"; import { OAuthApi } from "./oAuthApi"; import { ReportApi } from "./reportApi"; import { SignatureRequestApi } from "./signatureRequestApi"; import { TeamApi } from "./teamApi"; import { TemplateApi } from "./templateApi"; import { UnclaimedDraftApi } from "./unclaimedDraftApi"; -export { AccountApi, ApiAppApi, BulkSendJobApi, EmbeddedApi, OAuthApi, ReportApi, SignatureRequestApi, TeamApi, TemplateApi, UnclaimedDraftApi, }; +export { AccountApi, ApiAppApi, BulkSendJobApi, EmbeddedApi, FaxLineApi, OAuthApi, ReportApi, SignatureRequestApi, TeamApi, TemplateApi, UnclaimedDraftApi, }; export { HttpError, optionsI, returnTypeT, returnTypeI, generateFormData, toFormData, queryParamsSerializer, USER_AGENT, } from "./apis"; -export declare const APIS: (typeof AccountApi | typeof ApiAppApi | typeof BulkSendJobApi | typeof EmbeddedApi | typeof OAuthApi | typeof ReportApi | typeof SignatureRequestApi | typeof TeamApi | typeof TemplateApi | typeof UnclaimedDraftApi)[]; +export declare const APIS: (typeof AccountApi | typeof ApiAppApi | typeof BulkSendJobApi | typeof EmbeddedApi | typeof FaxLineApi | typeof OAuthApi | typeof ReportApi | typeof SignatureRequestApi | typeof TeamApi | typeof TemplateApi | typeof UnclaimedDraftApi)[]; diff --git a/sdks/node/types/model/faxLineAddUserRequest.d.ts b/sdks/node/types/model/faxLineAddUserRequest.d.ts new file mode 100644 index 000000000..56fefd2f3 --- /dev/null +++ b/sdks/node/types/model/faxLineAddUserRequest.d.ts @@ -0,0 +1,10 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxLineAddUserRequest { + "number": string; + "accountId"?: string; + "emailAddress"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineAddUserRequest; +} diff --git a/sdks/node/types/model/faxLineAreaCodeGetCountryEnum.d.ts b/sdks/node/types/model/faxLineAreaCodeGetCountryEnum.d.ts new file mode 100644 index 000000000..8352fd878 --- /dev/null +++ b/sdks/node/types/model/faxLineAreaCodeGetCountryEnum.d.ts @@ -0,0 +1,5 @@ +export declare enum FaxLineAreaCodeGetCountryEnum { + Ca = "CA", + Us = "US", + Uk = "UK" +} diff --git a/sdks/node/types/model/faxLineAreaCodeGetProvinceEnum.d.ts b/sdks/node/types/model/faxLineAreaCodeGetProvinceEnum.d.ts new file mode 100644 index 000000000..e43edf5df --- /dev/null +++ b/sdks/node/types/model/faxLineAreaCodeGetProvinceEnum.d.ts @@ -0,0 +1,15 @@ +export declare enum FaxLineAreaCodeGetProvinceEnum { + Ab = "AB", + Bc = "BC", + Mb = "MB", + Nb = "NB", + Nl = "NL", + Nt = "NT", + Ns = "NS", + Nu = "NU", + On = "ON", + Pe = "PE", + Qc = "QC", + Sk = "SK", + Yt = "YT" +} diff --git a/sdks/node/types/model/faxLineAreaCodeGetResponse.d.ts b/sdks/node/types/model/faxLineAreaCodeGetResponse.d.ts new file mode 100644 index 000000000..30486165b --- /dev/null +++ b/sdks/node/types/model/faxLineAreaCodeGetResponse.d.ts @@ -0,0 +1,8 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxLineAreaCodeGetResponse { + "areaCodes"?: Array; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineAreaCodeGetResponse; +} diff --git a/sdks/node/types/model/faxLineAreaCodeGetStateEnum.d.ts b/sdks/node/types/model/faxLineAreaCodeGetStateEnum.d.ts new file mode 100644 index 000000000..4193d07bd --- /dev/null +++ b/sdks/node/types/model/faxLineAreaCodeGetStateEnum.d.ts @@ -0,0 +1,53 @@ +export declare enum FaxLineAreaCodeGetStateEnum { + Ak = "AK", + Al = "AL", + Ar = "AR", + Az = "AZ", + Ca = "CA", + Co = "CO", + Ct = "CT", + Dc = "DC", + De = "DE", + Fl = "FL", + Ga = "GA", + Hi = "HI", + Ia = "IA", + Id = "ID", + Il = "IL", + In = "IN", + Ks = "KS", + Ky = "KY", + La = "LA", + Ma = "MA", + Md = "MD", + Me = "ME", + Mi = "MI", + Mn = "MN", + Mo = "MO", + Ms = "MS", + Mt = "MT", + Nc = "NC", + Nd = "ND", + Ne = "NE", + Nh = "NH", + Nj = "NJ", + Nm = "NM", + Nv = "NV", + Ny = "NY", + Oh = "OH", + Ok = "OK", + Or = "OR", + Pa = "PA", + Ri = "RI", + Sc = "SC", + Sd = "SD", + Tn = "TN", + Tx = "TX", + Ut = "UT", + Va = "VA", + Vt = "VT", + Wa = "WA", + Wi = "WI", + Wv = "WV", + Wy = "WY" +} diff --git a/sdks/node/types/model/faxLineCreateRequest.d.ts b/sdks/node/types/model/faxLineCreateRequest.d.ts new file mode 100644 index 000000000..a91bcda4d --- /dev/null +++ b/sdks/node/types/model/faxLineCreateRequest.d.ts @@ -0,0 +1,18 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxLineCreateRequest { + "areaCode": number; + "country": FaxLineCreateRequest.CountryEnum; + "city"?: string; + "accountId"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineCreateRequest; +} +export declare namespace FaxLineCreateRequest { + enum CountryEnum { + Ca = "CA", + Us = "US", + Uk = "UK" + } +} diff --git a/sdks/node/types/model/faxLineDeleteRequest.d.ts b/sdks/node/types/model/faxLineDeleteRequest.d.ts new file mode 100644 index 000000000..3dd720983 --- /dev/null +++ b/sdks/node/types/model/faxLineDeleteRequest.d.ts @@ -0,0 +1,8 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxLineDeleteRequest { + "number": string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineDeleteRequest; +} diff --git a/sdks/node/types/model/faxLineListResponse.d.ts b/sdks/node/types/model/faxLineListResponse.d.ts new file mode 100644 index 000000000..e1e098d4a --- /dev/null +++ b/sdks/node/types/model/faxLineListResponse.d.ts @@ -0,0 +1,13 @@ +import { AttributeTypeMap } from "./"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { ListInfoResponse } from "./listInfoResponse"; +import { WarningResponse } from "./warningResponse"; +export declare class FaxLineListResponse { + "listInfo"?: ListInfoResponse; + "faxLines"?: Array; + "warnings"?: WarningResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineListResponse; +} diff --git a/sdks/node/types/model/faxLineRemoveUserRequest.d.ts b/sdks/node/types/model/faxLineRemoveUserRequest.d.ts new file mode 100644 index 000000000..a57a09421 --- /dev/null +++ b/sdks/node/types/model/faxLineRemoveUserRequest.d.ts @@ -0,0 +1,10 @@ +import { AttributeTypeMap } from "./"; +export declare class FaxLineRemoveUserRequest { + "number": string; + "accountId"?: string; + "emailAddress"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineRemoveUserRequest; +} diff --git a/sdks/node/types/model/faxLineResponse.d.ts b/sdks/node/types/model/faxLineResponse.d.ts new file mode 100644 index 000000000..38bbc1a1c --- /dev/null +++ b/sdks/node/types/model/faxLineResponse.d.ts @@ -0,0 +1,11 @@ +import { AttributeTypeMap } from "./"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; +import { WarningResponse } from "./warningResponse"; +export declare class FaxLineResponse { + "faxLine"?: FaxLineResponseFaxLine; + "warnings"?: WarningResponse; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineResponse; +} diff --git a/sdks/node/types/model/faxLineResponseFaxLine.d.ts b/sdks/node/types/model/faxLineResponseFaxLine.d.ts new file mode 100644 index 000000000..d5f8c4aa7 --- /dev/null +++ b/sdks/node/types/model/faxLineResponseFaxLine.d.ts @@ -0,0 +1,12 @@ +import { AttributeTypeMap } from "./"; +import { AccountResponse } from "./accountResponse"; +export declare class FaxLineResponseFaxLine { + "number"?: string; + "createdAt"?: number; + "updatedAt"?: number; + "accounts"?: Array; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): FaxLineResponseFaxLine; +} diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index f748121c4..f8a7cde2c 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -32,6 +32,17 @@ import { ErrorResponseError } from "./errorResponseError"; import { EventCallbackRequest } from "./eventCallbackRequest"; import { EventCallbackRequestEvent } from "./eventCallbackRequestEvent"; import { EventCallbackRequestEventMetadata } from "./eventCallbackRequestEventMetadata"; +import { FaxLineAddUserRequest } from "./faxLineAddUserRequest"; +import { FaxLineAreaCodeGetCountryEnum } from "./faxLineAreaCodeGetCountryEnum"; +import { FaxLineAreaCodeGetProvinceEnum } from "./faxLineAreaCodeGetProvinceEnum"; +import { FaxLineAreaCodeGetResponse } from "./faxLineAreaCodeGetResponse"; +import { FaxLineAreaCodeGetStateEnum } from "./faxLineAreaCodeGetStateEnum"; +import { FaxLineCreateRequest } from "./faxLineCreateRequest"; +import { FaxLineDeleteRequest } from "./faxLineDeleteRequest"; +import { FaxLineListResponse } from "./faxLineListResponse"; +import { FaxLineRemoveUserRequest } from "./faxLineRemoveUserRequest"; +import { FaxLineResponse } from "./faxLineResponse"; +import { FaxLineResponseFaxLine } from "./faxLineResponseFaxLine"; import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; @@ -178,4 +189,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FileResponse, FileResponseDataUri, ListInfoResponse, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ReportCreateRequest, ReportCreateResponse, ReportResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, WarningResponse, EventCallbackHelper, RequestDetailedFile, RequestFile, AttributeTypeMap, ObjectSerializer, Authentication, HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, VoidAuth, Interceptor, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FileResponse, FileResponseDataUri, ListInfoResponse, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ReportCreateRequest, ReportCreateResponse, ReportResponse, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, WarningResponse, EventCallbackHelper, RequestDetailedFile, RequestFile, AttributeTypeMap, ObjectSerializer, Authentication, HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, VoidAuth, Interceptor, }; diff --git a/sdks/php/README.md b/sdks/php/README.md index 6dc14707d..f694462fa 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -160,6 +160,13 @@ All URIs are relative to *https://api.hellosign.com/v3* | *BulkSendJobApi* | [**bulkSendJobList**](docs/Api/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs | | *EmbeddedApi* | [**embeddedEditUrl**](docs/Api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](docs/Api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | +| *FaxLineApi* | [**faxLineAddUser**](docs/Api/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User | +| *FaxLineApi* | [**faxLineAreaCodeGet**](docs/Api/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +| *FaxLineApi* | [**faxLineCreate**](docs/Api/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line | +| *FaxLineApi* | [**faxLineDelete**](docs/Api/FaxLineApi.md#faxlinedelete) | **DELETE** /fax_line | Delete Fax Line | +| *FaxLineApi* | [**faxLineGet**](docs/Api/FaxLineApi.md#faxlineget) | **GET** /fax_line | Get Fax Line | +| *FaxLineApi* | [**faxLineList**](docs/Api/FaxLineApi.md#faxlinelist) | **GET** /fax_line/list | List Fax Lines | +| *FaxLineApi* | [**faxLineRemoveUser**](docs/Api/FaxLineApi.md#faxlineremoveuser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | | *OAuthApi* | [**oauthTokenGenerate**](docs/Api/OAuthApi.md#oauthtokengenerate) | **POST** /oauth/token | OAuth Token Generate | | *OAuthApi* | [**oauthTokenRefresh**](docs/Api/OAuthApi.md#oauthtokenrefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh | | *ReportApi* | [**reportCreate**](docs/Api/ReportApi.md#reportcreate) | **POST** /report/create | Create Report | @@ -241,6 +248,17 @@ All URIs are relative to *https://api.hellosign.com/v3* - [EventCallbackRequest](docs/Model/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/Model/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/Model/EventCallbackRequestEventMetadata.md) +- [FaxLineAddUserRequest](docs/Model/FaxLineAddUserRequest.md) +- [FaxLineAreaCodeGetCountryEnum](docs/Model/FaxLineAreaCodeGetCountryEnum.md) +- [FaxLineAreaCodeGetProvinceEnum](docs/Model/FaxLineAreaCodeGetProvinceEnum.md) +- [FaxLineAreaCodeGetResponse](docs/Model/FaxLineAreaCodeGetResponse.md) +- [FaxLineAreaCodeGetStateEnum](docs/Model/FaxLineAreaCodeGetStateEnum.md) +- [FaxLineCreateRequest](docs/Model/FaxLineCreateRequest.md) +- [FaxLineDeleteRequest](docs/Model/FaxLineDeleteRequest.md) +- [FaxLineListResponse](docs/Model/FaxLineListResponse.md) +- [FaxLineRemoveUserRequest](docs/Model/FaxLineRemoveUserRequest.md) +- [FaxLineResponse](docs/Model/FaxLineResponse.md) +- [FaxLineResponseFaxLine](docs/Model/FaxLineResponseFaxLine.md) - [FileResponse](docs/Model/FileResponse.md) - [FileResponseDataUri](docs/Model/FileResponseDataUri.md) - [ListInfoResponse](docs/Model/ListInfoResponse.md) diff --git a/sdks/php/docs/Api/FaxLineApi.md b/sdks/php/docs/Api/FaxLineApi.md new file mode 100644 index 000000000..677d605e9 --- /dev/null +++ b/sdks/php/docs/Api/FaxLineApi.md @@ -0,0 +1,440 @@ +# Dropbox\Sign\FaxLineApi + +All URIs are relative to https://api.hellosign.com/v3. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**faxLineAddUser()**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User | +| [**faxLineAreaCodeGet()**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +| [**faxLineCreate()**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line | +| [**faxLineDelete()**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line | +| [**faxLineGet()**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line | +| [**faxLineList()**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines | +| [**faxLineRemoveUser()**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access | + + +## `faxLineAddUser()` + +```php +faxLineAddUser($fax_line_add_user_request): \Dropbox\Sign\Model\FaxLineResponse +``` + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); +$data->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $result = $faxLineApi->faxLineAddUser($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_line_add_user_request** | [**\Dropbox\Sign\Model\FaxLineAddUserRequest**](../Model/FaxLineAddUserRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineResponse**](../Model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineAreaCodeGet()` + +```php +faxLineAreaCodeGet($country, $state, $province, $city): \Dropbox\Sign\Model\FaxLineAreaCodeGetResponse +``` + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **country** | **string**| Filter area codes by country. | | +| **state** | **string**| Filter area codes by state. | [optional] | +| **province** | **string**| Filter area codes by province. | [optional] | +| **city** | **string**| Filter area codes by city. | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse**](../Model/FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineCreate()` + +```php +faxLineCreate($fax_line_create_request): \Dropbox\Sign\Model\FaxLineResponse +``` + +Purchase Fax Line + +Purchases a new Fax Line. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); +$data->setAreaCode(209) + ->setCountry("US"); + +try { + $result = $faxLineApi->faxLineCreate($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_line_create_request** | [**\Dropbox\Sign\Model\FaxLineCreateRequest**](../Model/FaxLineCreateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineResponse**](../Model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineDelete()` + +```php +faxLineDelete($fax_line_delete_request) +``` + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); +$data->setNumber("[FAX_NUMBER]"); + +try { + $faxLineApi->faxLineDelete($data); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_line_delete_request** | [**\Dropbox\Sign\Model\FaxLineDeleteRequest**](../Model/FaxLineDeleteRequest.md)| | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) + +## `faxLineGet()` + +```php +faxLineGet($number): \Dropbox\Sign\Model\FaxLineResponse +``` + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **number** | **string**| The Fax Line number. | | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineResponse**](../Model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineList()` + +```php +faxLineList($account_id, $page, $page_size, $show_team_lines): \Dropbox\Sign\Model\FaxLineListResponse +``` + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +try { + $result = $faxLineApi->faxLineList(); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Account ID | [optional] | +| **page** | **int**| Page | [optional] [default to 1] | +| **page_size** | **int**| Page size | [optional] [default to 20] | +| **show_team_lines** | **bool**| Show team lines | [optional] | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineListResponse**](../Model/FaxLineListResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `faxLineRemoveUser()` + +```php +faxLineRemoveUser($fax_line_remove_user_request): \Dropbox\Sign\Model\FaxLineResponse +``` + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); + +$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); +$data->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $result = $faxLineApi->faxLineRemoveUser($data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **fax_line_remove_user_request** | [**\Dropbox\Sign\Model\FaxLineRemoveUserRequest**](../Model/FaxLineRemoveUserRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\FaxLineResponse**](../Model/FaxLineResponse.md) + +### Authorization + +[api_key](../../README.md#api_key) + +### 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) diff --git a/sdks/php/docs/Model/FaxLineAddUserRequest.md b/sdks/php/docs/Model/FaxLineAddUserRequest.md new file mode 100644 index 000000000..aef875b22 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineAddUserRequest.md @@ -0,0 +1,13 @@ +# # FaxLineAddUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | +| `account_id` | ```string``` | Account ID | | +| `email_address` | ```string``` | Email address | | + +[[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/FaxLineAreaCodeGetCountryEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..91b758d8f --- /dev/null +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetCountryEnum + + + +## 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/FaxLineAreaCodeGetProvinceEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..369a34359 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetProvinceEnum + + + +## 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/FaxLineAreaCodeGetResponse.md b/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..2275a4f8e --- /dev/null +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,11 @@ +# # FaxLineAreaCodeGetResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `area_codes` | ```int[]``` | | | + +[[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/FaxLineAreaCodeGetStateEnum.md b/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..f978b75a2 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,10 @@ +# # FaxLineAreaCodeGetStateEnum + + + +## 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/FaxLineCreateRequest.md b/sdks/php/docs/Model/FaxLineCreateRequest.md new file mode 100644 index 000000000..6b599a339 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineCreateRequest.md @@ -0,0 +1,14 @@ +# # FaxLineCreateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `area_code`*_required_ | ```int``` | Area code | | +| `country`*_required_ | ```string``` | Country | | +| `city` | ```string``` | City | | +| `account_id` | ```string``` | Account 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/FaxLineDeleteRequest.md b/sdks/php/docs/Model/FaxLineDeleteRequest.md new file mode 100644 index 000000000..a2112ed33 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineDeleteRequest.md @@ -0,0 +1,11 @@ +# # FaxLineDeleteRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/FaxLineListResponse.md b/sdks/php/docs/Model/FaxLineListResponse.md new file mode 100644 index 000000000..c9aef89c1 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineListResponse.md @@ -0,0 +1,13 @@ +# # FaxLineListResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `list_info` | [```\Dropbox\Sign\Model\ListInfoResponse```](ListInfoResponse.md) | | | +| `fax_lines` | [```\Dropbox\Sign\Model\FaxLineResponseFaxLine[]```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```\Dropbox\Sign\Model\WarningResponse```](WarningResponse.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/FaxLineRemoveUserRequest.md b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..6def01071 --- /dev/null +++ b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md @@ -0,0 +1,13 @@ +# # FaxLineRemoveUserRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number`*_required_ | ```string``` | The Fax Line number. | | +| `account_id` | ```string``` | Account ID | | +| `email_address` | ```string``` | Email address | | + +[[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/FaxLineResponse.md b/sdks/php/docs/Model/FaxLineResponse.md new file mode 100644 index 000000000..8a62eefff --- /dev/null +++ b/sdks/php/docs/Model/FaxLineResponse.md @@ -0,0 +1,12 @@ +# # FaxLineResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `fax_line` | [```\Dropbox\Sign\Model\FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```\Dropbox\Sign\Model\WarningResponse```](WarningResponse.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/FaxLineResponseFaxLine.md b/sdks/php/docs/Model/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..51f479adc --- /dev/null +++ b/sdks/php/docs/Model/FaxLineResponseFaxLine.md @@ -0,0 +1,14 @@ +# # FaxLineResponseFaxLine + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `number` | ```string``` | Number | | +| `created_at` | ```int``` | Created at | | +| `updated_at` | ```int``` | Updated at | | +| `accounts` | [```\Dropbox\Sign\Model\AccountResponse[]```](AccountResponse.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/src/Api/FaxLineApi.php b/sdks/php/src/Api/FaxLineApi.php new file mode 100644 index 000000000..11a334e0e --- /dev/null +++ b/sdks/php/src/Api/FaxLineApi.php @@ -0,0 +1,2361 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Operation faxLineAddUser + * + * Add Fax Line User + * + * @param Model\FaxLineAddUserRequest $fax_line_add_user_request fax_line_add_user_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineResponse + */ + public function faxLineAddUser(Model\FaxLineAddUserRequest $fax_line_add_user_request) + { + list($response) = $this->faxLineAddUserWithHttpInfo($fax_line_add_user_request); + + return $response; + } + + /** + * Operation faxLineAddUserWithHttpInfo + * + * Add Fax Line User + * + * @param Model\FaxLineAddUserRequest $fax_line_add_user_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line_add_user_request) + { + $request = $this->faxLineAddUserRequest($fax_line_add_user_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineAddUserAsync + * + * Add Fax Line User + * + * @param Model\FaxLineAddUserRequest $fax_line_add_user_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineAddUserAsync(Model\FaxLineAddUserRequest $fax_line_add_user_request) + { + return $this->faxLineAddUserAsyncWithHttpInfo($fax_line_add_user_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineAddUserAsyncWithHttpInfo + * + * Add Fax Line User + * + * @param Model\FaxLineAddUserRequest $fax_line_add_user_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineAddUserAsyncWithHttpInfo(Model\FaxLineAddUserRequest $fax_line_add_user_request) + { + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + $request = $this->faxLineAddUserRequest($fax_line_add_user_request); + + 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(); + } + + 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 'faxLineAddUser' + * + * @param Model\FaxLineAddUserRequest $fax_line_add_user_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineAddUserRequest(Model\FaxLineAddUserRequest $fax_line_add_user_request) + { + // verify the required parameter 'fax_line_add_user_request' is set + if ($fax_line_add_user_request === null || (is_array($fax_line_add_user_request) && count($fax_line_add_user_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_line_add_user_request when calling faxLineAddUser' + ); + } + + $resourcePath = '/fax_line/add_user'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $fax_line_add_user_request + ); + + $multipart = !empty($formParams); + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fax_line_add_user_request)); + } else { + $httpBody = $fax_line_add_user_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $fax_line_add_user_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineAreaCodeGet + * + * Get Available Fax Line Area Codes + * + * @param string $country Filter area codes by country. (required) + * @param string $state Filter area codes by state. (optional) + * @param string $province Filter area codes by province. (optional) + * @param string $city Filter area codes by city. (optional) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineAreaCodeGetResponse + */ + public function faxLineAreaCodeGet(string $country, string $state = null, string $province = null, string $city = null) + { + list($response) = $this->faxLineAreaCodeGetWithHttpInfo($country, $state, $province, $city); + + return $response; + } + + /** + * Operation faxLineAreaCodeGetWithHttpInfo + * + * Get Available Fax Line Area Codes + * + * @param string $country Filter area codes by country. (required) + * @param string $state Filter area codes by state. (optional) + * @param string $province Filter area codes by province. (optional) + * @param string $city Filter area codes by city. (optional) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineAreaCodeGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null) + { + $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineAreaCodeGetAsync + * + * Get Available Fax Line Area Codes + * + * @param string $country Filter area codes by country. (required) + * @param string $state Filter area codes by state. (optional) + * @param string $province Filter area codes by province. (optional) + * @param string $city Filter area codes by city. (optional) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineAreaCodeGetAsync(string $country, string $state = null, string $province = null, string $city = null) + { + return $this->faxLineAreaCodeGetAsyncWithHttpInfo($country, $state, $province, $city) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineAreaCodeGetAsyncWithHttpInfo + * + * Get Available Fax Line Area Codes + * + * @param string $country Filter area codes by country. (required) + * @param string $state Filter area codes by state. (optional) + * @param string $province Filter area codes by province. (optional) + * @param string $city Filter area codes by city. (optional) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineAreaCodeGetAsyncWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null) + { + $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; + $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city); + + 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(); + } + + 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 'faxLineAreaCodeGet' + * + * @param string $country Filter area codes by country. (required) + * @param string $state Filter area codes by state. (optional) + * @param string $province Filter area codes by province. (optional) + * @param string $city Filter area codes by city. (optional) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineAreaCodeGetRequest(string $country, string $state = null, string $province = null, string $city = null) + { + // verify the required parameter 'country' is set + if ($country === null || (is_array($country) && count($country) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $country when calling faxLineAreaCodeGet' + ); + } + + $resourcePath = '/fax_line/area_codes'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = []; + $multipart = false; + + // query params + if ($country !== null) { + if ('form' === 'form' && is_array($country)) { + foreach ($country as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['country'] = $country; + } + } + // query params + if ($state !== null) { + if ('form' === 'form' && is_array($state)) { + foreach ($state as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['state'] = $state; + } + } + // query params + if ($province !== null) { + if ('form' === 'form' && is_array($province)) { + foreach ($province as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['province'] = $province; + } + } + // query params + if ($city !== null) { + if ('form' === 'form' && is_array($city)) { + foreach ($city as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['city'] = $city; + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // 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 Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineCreate + * + * Purchase Fax Line + * + * @param Model\FaxLineCreateRequest $fax_line_create_request fax_line_create_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineResponse + */ + public function faxLineCreate(Model\FaxLineCreateRequest $fax_line_create_request) + { + list($response) = $this->faxLineCreateWithHttpInfo($fax_line_create_request); + + return $response; + } + + /** + * Operation faxLineCreateWithHttpInfo + * + * Purchase Fax Line + * + * @param Model\FaxLineCreateRequest $fax_line_create_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_create_request) + { + $request = $this->faxLineCreateRequest($fax_line_create_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineCreateAsync + * + * Purchase Fax Line + * + * @param Model\FaxLineCreateRequest $fax_line_create_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineCreateAsync(Model\FaxLineCreateRequest $fax_line_create_request) + { + return $this->faxLineCreateAsyncWithHttpInfo($fax_line_create_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineCreateAsyncWithHttpInfo + * + * Purchase Fax Line + * + * @param Model\FaxLineCreateRequest $fax_line_create_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineCreateAsyncWithHttpInfo(Model\FaxLineCreateRequest $fax_line_create_request) + { + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + $request = $this->faxLineCreateRequest($fax_line_create_request); + + 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(); + } + + 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 'faxLineCreate' + * + * @param Model\FaxLineCreateRequest $fax_line_create_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineCreateRequest(Model\FaxLineCreateRequest $fax_line_create_request) + { + // verify the required parameter 'fax_line_create_request' is set + if ($fax_line_create_request === null || (is_array($fax_line_create_request) && count($fax_line_create_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_line_create_request when calling faxLineCreate' + ); + } + + $resourcePath = '/fax_line/create'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $fax_line_create_request + ); + + $multipart = !empty($formParams); + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fax_line_create_request)); + } else { + $httpBody = $fax_line_create_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $fax_line_create_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineDelete + * + * Delete Fax Line + * + * @param Model\FaxLineDeleteRequest $fax_line_delete_request fax_line_delete_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return void + */ + public function faxLineDelete(Model\FaxLineDeleteRequest $fax_line_delete_request) + { + $this->faxLineDeleteWithHttpInfo($fax_line_delete_request); + } + + /** + * Operation faxLineDeleteWithHttpInfo + * + * Delete Fax Line + * + * @param Model\FaxLineDeleteRequest $fax_line_delete_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineDeleteWithHttpInfo(Model\FaxLineDeleteRequest $fax_line_delete_request) + { + $request = $this->faxLineDeleteRequest($fax_line_delete_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineDeleteAsync + * + * Delete Fax Line + * + * @param Model\FaxLineDeleteRequest $fax_line_delete_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineDeleteAsync(Model\FaxLineDeleteRequest $fax_line_delete_request) + { + return $this->faxLineDeleteAsyncWithHttpInfo($fax_line_delete_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineDeleteAsyncWithHttpInfo + * + * Delete Fax Line + * + * @param Model\FaxLineDeleteRequest $fax_line_delete_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineDeleteAsyncWithHttpInfo(Model\FaxLineDeleteRequest $fax_line_delete_request) + { + $returnType = ''; + $request = $this->faxLineDeleteRequest($fax_line_delete_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'faxLineDelete' + * + * @param Model\FaxLineDeleteRequest $fax_line_delete_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineDeleteRequest(Model\FaxLineDeleteRequest $fax_line_delete_request) + { + // verify the required parameter 'fax_line_delete_request' is set + if ($fax_line_delete_request === null || (is_array($fax_line_delete_request) && count($fax_line_delete_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_line_delete_request when calling faxLineDelete' + ); + } + + $resourcePath = '/fax_line'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $fax_line_delete_request + ); + + $multipart = !empty($formParams); + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fax_line_delete_request)); + } else { + $httpBody = $fax_line_delete_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $fax_line_delete_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineGet + * + * Get Fax Line + * + * @param string $number The Fax Line number. (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineResponse + */ + public function faxLineGet(string $number) + { + list($response) = $this->faxLineGetWithHttpInfo($number); + + return $response; + } + + /** + * Operation faxLineGetWithHttpInfo + * + * Get Fax Line + * + * @param string $number The Fax Line number. (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineGetWithHttpInfo(string $number) + { + $request = $this->faxLineGetRequest($number); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineGetAsync + * + * Get Fax Line + * + * @param string $number The Fax Line number. (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineGetAsync(string $number) + { + return $this->faxLineGetAsyncWithHttpInfo($number) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineGetAsyncWithHttpInfo + * + * Get Fax Line + * + * @param string $number The Fax Line number. (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineGetAsyncWithHttpInfo(string $number) + { + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + $request = $this->faxLineGetRequest($number); + + 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(); + } + + 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 'faxLineGet' + * + * @param string $number The Fax Line number. (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineGetRequest(string $number) + { + // verify the required parameter 'number' is set + if ($number === null || (is_array($number) && count($number) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $number when calling faxLineGet' + ); + } + + $resourcePath = '/fax_line'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = []; + $multipart = false; + + // query params + if ($number !== null) { + if ('form' === 'form' && is_array($number)) { + foreach ($number as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['number'] = $number; + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // 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 Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineList + * + * List Fax Lines + * + * @param string $account_id Account ID (optional) + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (optional, default to 20) + * @param bool $show_team_lines Show team lines (optional) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineListResponse + */ + public function faxLineList(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + { + list($response) = $this->faxLineListWithHttpInfo($account_id, $page, $page_size, $show_team_lines); + + return $response; + } + + /** + * Operation faxLineListWithHttpInfo + * + * List Fax Lines + * + * @param string $account_id Account ID (optional) + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (optional, default to 20) + * @param bool $show_team_lines Show team lines (optional) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineListResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + { + $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineListResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineListAsync + * + * List Fax Lines + * + * @param string $account_id Account ID (optional) + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (optional, default to 20) + * @param bool $show_team_lines Show team lines (optional) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineListAsync(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + { + return $this->faxLineListAsyncWithHttpInfo($account_id, $page, $page_size, $show_team_lines) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineListAsyncWithHttpInfo + * + * List Fax Lines + * + * @param string $account_id Account ID (optional) + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (optional, default to 20) + * @param bool $show_team_lines Show team lines (optional) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + { + $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; + $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines); + + 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(); + } + + 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 'faxLineList' + * + * @param string $account_id Account ID (optional) + * @param int $page Page (optional, default to 1) + * @param int $page_size Page size (optional, default to 20) + * @param bool $show_team_lines Show team lines (optional) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineListRequest(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + { + $resourcePath = '/fax_line/list'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = []; + $multipart = false; + + // query params + if ($account_id !== null) { + if ('form' === 'form' && is_array($account_id)) { + foreach ($account_id as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['account_id'] = $account_id; + } + } + // query params + if ($page !== null) { + if ('form' === 'form' && is_array($page)) { + foreach ($page as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page'] = $page; + } + } + // query params + if ($page_size !== null) { + if ('form' === 'form' && is_array($page_size)) { + foreach ($page_size as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['page_size'] = $page_size; + } + } + // query params + if ($show_team_lines !== null) { + if ('form' === 'form' && is_array($show_team_lines)) { + foreach ($show_team_lines as $key => $value) { + $queryParams[$key] = $value; + } + } else { + $queryParams['show_team_lines'] = $show_team_lines; + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // 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 Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation faxLineRemoveUser + * + * Remove Fax Line Access + * + * @param Model\FaxLineRemoveUserRequest $fax_line_remove_user_request fax_line_remove_user_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\FaxLineResponse + */ + public function faxLineRemoveUser(Model\FaxLineRemoveUserRequest $fax_line_remove_user_request) + { + list($response) = $this->faxLineRemoveUserWithHttpInfo($fax_line_remove_user_request); + + return $response; + } + + /** + * Operation faxLineRemoveUserWithHttpInfo + * + * Remove Fax Line Access + * + * @param Model\FaxLineRemoveUserRequest $fax_line_remove_user_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fax_line_remove_user_request) + { + $request = $this->faxLineRemoveUserRequest($fax_line_remove_user_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\FaxLineResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\FaxLineResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\FaxLineResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation faxLineRemoveUserAsync + * + * Remove Fax Line Access + * + * @param Model\FaxLineRemoveUserRequest $fax_line_remove_user_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineRemoveUserAsync(Model\FaxLineRemoveUserRequest $fax_line_remove_user_request) + { + return $this->faxLineRemoveUserAsyncWithHttpInfo($fax_line_remove_user_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation faxLineRemoveUserAsyncWithHttpInfo + * + * Remove Fax Line Access + * + * @param Model\FaxLineRemoveUserRequest $fax_line_remove_user_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function faxLineRemoveUserAsyncWithHttpInfo(Model\FaxLineRemoveUserRequest $fax_line_remove_user_request) + { + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; + $request = $this->faxLineRemoveUserRequest($fax_line_remove_user_request); + + 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(); + } + + 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 'faxLineRemoveUser' + * + * @param Model\FaxLineRemoveUserRequest $fax_line_remove_user_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function faxLineRemoveUserRequest(Model\FaxLineRemoveUserRequest $fax_line_remove_user_request) + { + // verify the required parameter 'fax_line_remove_user_request' is set + if ($fax_line_remove_user_request === null || (is_array($fax_line_remove_user_request) && count($fax_line_remove_user_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $fax_line_remove_user_request when calling faxLineRemoveUser' + ); + } + + $resourcePath = '/fax_line/remove_user'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $fax_line_remove_user_request + ); + + $multipart = !empty($formParams); + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fax_line_remove_user_request)); + } else { + $httpBody = $fax_line_remove_user_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $fax_line_remove_user_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = $this->config->getOptions(); + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/sdks/php/src/Model/FaxLineAddUserRequest.php b/sdks/php/src/Model/FaxLineAddUserRequest.php new file mode 100644 index 000000000..02c975ca4 --- /dev/null +++ b/sdks/php/src/Model/FaxLineAddUserRequest.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FaxLineAddUserRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineAddUserRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'string', + 'account_id' => 'string', + 'email_address' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + 'account_id' => null, + 'email_address' => 'email', + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'number' => 'number', + 'account_id' => 'account_id', + 'email_address' => 'email_address', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + 'account_id' => 'setAccountId', + 'email_address' => 'setEmailAddress', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + 'account_id' => 'getAccountId', + 'email_address' => 'getEmailAddress', + ]; + + /** + * 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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['number'] = $data['number'] ?? null; + $this->container['account_id'] = $data['account_id'] ?? null; + $this->container['email_address'] = $data['email_address'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineAddUserRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineAddUserRequest + { + /** @var FaxLineAddUserRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineAddUserRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['number'] === null) { + $invalidProperties[] = "'number' 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 number + * + * @return string + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string $number the Fax Line number + * + * @return self + */ + public function setNumber(string $number) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId() + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id Account ID + * + * @return self + */ + public function setAccountId(?string $account_id) + { + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets email_address + * + * @return string|null + */ + public function getEmailAddress() + { + return $this->container['email_address']; + } + + /** + * Sets email_address + * + * @param string|null $email_address Email address + * + * @return self + */ + public function setEmailAddress(?string $email_address) + { + $this->container['email_address'] = $email_address; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineAreaCodeGetCountryEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php new file mode 100644 index 000000000..d310fb693 --- /dev/null +++ b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php @@ -0,0 +1,61 @@ + + * @template TKey int|null + * @template TValue mixed|null + * @internal This class should not be instantiated directly + */ +class FaxLineAreaCodeGetResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineAreaCodeGetResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'area_codes' => 'int[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'area_codes' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'area_codes' => 'area_codes', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'area_codes' => 'setAreaCodes', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'area_codes' => 'getAreaCodes', + ]; + + /** + * 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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['area_codes'] = $data['area_codes'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineAreaCodeGetResponse + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineAreaCodeGetResponse + { + /** @var FaxLineAreaCodeGetResponse $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineAreaCodeGetResponse::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 area_codes + * + * @return int[]|null + */ + public function getAreaCodes() + { + return $this->container['area_codes']; + } + + /** + * Sets area_codes + * + * @param int[]|null $area_codes area_codes + * + * @return self + */ + public function setAreaCodes(?array $area_codes) + { + $this->container['area_codes'] = $area_codes; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineAreaCodeGetStateEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php new file mode 100644 index 000000000..14e49fe85 --- /dev/null +++ b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php @@ -0,0 +1,205 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FaxLineCreateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineCreateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'area_code' => 'int', + 'country' => 'string', + 'city' => 'string', + 'account_id' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'area_code' => null, + 'country' => null, + 'city' => null, + 'account_id' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'area_code' => 'area_code', + 'country' => 'country', + 'city' => 'city', + 'account_id' => 'account_id', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'area_code' => 'setAreaCode', + 'country' => 'setCountry', + 'city' => 'setCity', + 'account_id' => 'setAccountId', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'area_code' => 'getAreaCode', + 'country' => 'getCountry', + 'city' => 'getCity', + 'account_id' => 'getAccountId', + ]; + + /** + * 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 COUNTRY_CA = 'CA'; + public const COUNTRY_US = 'US'; + public const COUNTRY_UK = 'UK'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCountryAllowableValues() + { + return [ + self::COUNTRY_CA, + self::COUNTRY_US, + self::COUNTRY_UK, + ]; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['area_code'] = $data['area_code'] ?? null; + $this->container['country'] = $data['country'] ?? null; + $this->container['city'] = $data['city'] ?? null; + $this->container['account_id'] = $data['account_id'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineCreateRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineCreateRequest + { + /** @var FaxLineCreateRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineCreateRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['area_code'] === null) { + $invalidProperties[] = "'area_code' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + $allowedValues = $this->getCountryAllowableValues(); + if (!is_null($this->container['country']) && !in_array($this->container['country'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'country', must be one of '%s'", + $this->container['country'], + 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 area_code + * + * @return int + */ + public function getAreaCode() + { + return $this->container['area_code']; + } + + /** + * Sets area_code + * + * @param int $area_code Area code + * + * @return self + */ + public function setAreaCode(int $area_code) + { + $this->container['area_code'] = $area_code; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country Country + * + * @return self + */ + public function setCountry(string $country) + { + $allowedValues = $this->getCountryAllowableValues(); + if (!in_array($country, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'country', must be one of '%s'", + $country, + implode("', '", $allowedValues) + ) + ); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city City + * + * @return self + */ + public function setCity(?string $city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId() + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id Account ID + * + * @return self + */ + public function setAccountId(?string $account_id) + { + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineDeleteRequest.php b/sdks/php/src/Model/FaxLineDeleteRequest.php new file mode 100644 index 000000000..cb3152aa8 --- /dev/null +++ b/sdks/php/src/Model/FaxLineDeleteRequest.php @@ -0,0 +1,345 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FaxLineDeleteRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineDeleteRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'number' => 'number', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + ]; + + /** + * 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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['number'] = $data['number'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineDeleteRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineDeleteRequest + { + /** @var FaxLineDeleteRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineDeleteRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['number'] === null) { + $invalidProperties[] = "'number' 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 number + * + * @return string + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string $number the Fax Line number + * + * @return self + */ + public function setNumber(string $number) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineListResponse.php b/sdks/php/src/Model/FaxLineListResponse.php new file mode 100644 index 000000000..18c13f69c --- /dev/null +++ b/sdks/php/src/Model/FaxLineListResponse.php @@ -0,0 +1,402 @@ + + * @template TKey int|null + * @template TValue mixed|null + * @internal This class should not be instantiated directly + */ +class FaxLineListResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'list_info' => '\Dropbox\Sign\Model\ListInfoResponse', + 'fax_lines' => '\Dropbox\Sign\Model\FaxLineResponseFaxLine[]', + '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 = [ + 'list_info' => null, + 'fax_lines' => null, + 'warnings' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'list_info' => 'list_info', + 'fax_lines' => 'fax_lines', + 'warnings' => 'warnings', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list_info' => 'setListInfo', + 'fax_lines' => 'setFaxLines', + 'warnings' => 'setWarnings', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list_info' => 'getListInfo', + 'fax_lines' => 'getFaxLines', + '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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['list_info'] = $data['list_info'] ?? null; + $this->container['fax_lines'] = $data['fax_lines'] ?? null; + $this->container['warnings'] = $data['warnings'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineListResponse + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineListResponse + { + /** @var FaxLineListResponse $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineListResponse::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 list_info + * + * @return ListInfoResponse|null + */ + public function getListInfo() + { + return $this->container['list_info']; + } + + /** + * Sets list_info + * + * @param ListInfoResponse|null $list_info list_info + * + * @return self + */ + public function setListInfo(?ListInfoResponse $list_info) + { + $this->container['list_info'] = $list_info; + + return $this; + } + + /** + * Gets fax_lines + * + * @return FaxLineResponseFaxLine[]|null + */ + public function getFaxLines() + { + return $this->container['fax_lines']; + } + + /** + * Sets fax_lines + * + * @param FaxLineResponseFaxLine[]|null $fax_lines fax_lines + * + * @return self + */ + public function setFaxLines(?array $fax_lines) + { + $this->container['fax_lines'] = $fax_lines; + + return $this; + } + + /** + * Gets warnings + * + * @return WarningResponse|null + */ + public function getWarnings() + { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param WarningResponse|null $warnings warnings + * + * @return self + */ + public function setWarnings(?WarningResponse $warnings) + { + $this->container['warnings'] = $warnings; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineRemoveUserRequest.php b/sdks/php/src/Model/FaxLineRemoveUserRequest.php new file mode 100644 index 000000000..fcc2b1f97 --- /dev/null +++ b/sdks/php/src/Model/FaxLineRemoveUserRequest.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FaxLineRemoveUserRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineRemoveUserRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'string', + 'account_id' => 'string', + 'email_address' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + 'account_id' => null, + 'email_address' => 'email', + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'number' => 'number', + 'account_id' => 'account_id', + 'email_address' => 'email_address', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + 'account_id' => 'setAccountId', + 'email_address' => 'setEmailAddress', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + 'account_id' => 'getAccountId', + 'email_address' => 'getEmailAddress', + ]; + + /** + * 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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['number'] = $data['number'] ?? null; + $this->container['account_id'] = $data['account_id'] ?? null; + $this->container['email_address'] = $data['email_address'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineRemoveUserRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineRemoveUserRequest + { + /** @var FaxLineRemoveUserRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineRemoveUserRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['number'] === null) { + $invalidProperties[] = "'number' 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 number + * + * @return string + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string $number the Fax Line number + * + * @return self + */ + public function setNumber(string $number) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId() + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id Account ID + * + * @return self + */ + public function setAccountId(?string $account_id) + { + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets email_address + * + * @return string|null + */ + public function getEmailAddress() + { + return $this->container['email_address']; + } + + /** + * Sets email_address + * + * @param string|null $email_address Email address + * + * @return self + */ + public function setEmailAddress(?string $email_address) + { + $this->container['email_address'] = $email_address; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineResponse.php b/sdks/php/src/Model/FaxLineResponse.php new file mode 100644 index 000000000..f8676d7b0 --- /dev/null +++ b/sdks/php/src/Model/FaxLineResponse.php @@ -0,0 +1,372 @@ + + * @template TKey int|null + * @template TValue mixed|null + * @internal This class should not be instantiated directly + */ +class FaxLineResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'fax_line' => '\Dropbox\Sign\Model\FaxLineResponseFaxLine', + 'warnings' => '\Dropbox\Sign\Model\WarningResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'fax_line' => null, + 'warnings' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fax_line' => 'fax_line', + 'warnings' => 'warnings', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fax_line' => 'setFaxLine', + 'warnings' => 'setWarnings', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fax_line' => 'getFaxLine', + '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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fax_line'] = $data['fax_line'] ?? null; + $this->container['warnings'] = $data['warnings'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineResponse + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineResponse + { + /** @var FaxLineResponse $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineResponse::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets fax_line + * + * @return FaxLineResponseFaxLine|null + */ + public function getFaxLine() + { + return $this->container['fax_line']; + } + + /** + * Sets fax_line + * + * @param FaxLineResponseFaxLine|null $fax_line fax_line + * + * @return self + */ + public function setFaxLine(?FaxLineResponseFaxLine $fax_line) + { + $this->container['fax_line'] = $fax_line; + + return $this; + } + + /** + * Gets warnings + * + * @return WarningResponse|null + */ + public function getWarnings() + { + return $this->container['warnings']; + } + + /** + * Sets warnings + * + * @param WarningResponse|null $warnings warnings + * + * @return self + */ + public function setWarnings(?WarningResponse $warnings) + { + $this->container['warnings'] = $warnings; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/FaxLineResponseFaxLine.php b/sdks/php/src/Model/FaxLineResponseFaxLine.php new file mode 100644 index 000000000..6ccc2ddf5 --- /dev/null +++ b/sdks/php/src/Model/FaxLineResponseFaxLine.php @@ -0,0 +1,432 @@ + + * @template TKey int|null + * @template TValue mixed|null + * @internal This class should not be instantiated directly + */ +class FaxLineResponseFaxLine implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FaxLineResponseFaxLine'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'string', + 'created_at' => 'int', + 'updated_at' => 'int', + 'accounts' => '\Dropbox\Sign\Model\AccountResponse[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + 'created_at' => null, + 'updated_at' => null, + 'accounts' => null, + ]; + + /** + * 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 attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'number' => 'number', + 'created_at' => 'created_at', + 'updated_at' => 'updated_at', + 'accounts' => 'accounts', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'accounts' => 'setAccounts', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'accounts' => 'getAccounts', + ]; + + /** + * 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 array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['number'] = $data['number'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['accounts'] = $data['accounts'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): FaxLineResponseFaxLine + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): FaxLineResponseFaxLine + { + /** @var FaxLineResponseFaxLine $obj */ + $obj = ObjectSerializer::deserialize( + $data, + FaxLineResponseFaxLine::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number Number + * + * @return self + */ + public function setNumber(?string $number) + { + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets created_at + * + * @return int|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param int|null $created_at Created at + * + * @return self + */ + public function setCreatedAt(?int $created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return int|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param int|null $updated_at Updated at + * + * @return self + */ + public function setUpdatedAt(?int $updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets accounts + * + * @return AccountResponse[]|null + */ + public function getAccounts() + { + return $this->container['accounts']; + } + + /** + * Sets accounts + * + * @param AccountResponse[]|null $accounts accounts + * + * @return self + */ + public function setAccounts(?array $accounts) + { + $this->container['accounts'] = $accounts; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + 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 scalar|object|array|null 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/.openapi-generator/FILES b/sdks/python/.openapi-generator/FILES index 22b647339..8dc4861d9 100644 --- a/sdks/python/.openapi-generator/FILES +++ b/sdks/python/.openapi-generator/FILES @@ -41,6 +41,18 @@ docs/ErrorResponseError.md docs/EventCallbackRequest.md docs/EventCallbackRequestEvent.md docs/EventCallbackRequestEventMetadata.md +docs/FaxLineAddUserRequest.md +docs/FaxLineApi.md +docs/FaxLineAreaCodeGetCountryEnum.md +docs/FaxLineAreaCodeGetProvinceEnum.md +docs/FaxLineAreaCodeGetResponse.md +docs/FaxLineAreaCodeGetStateEnum.md +docs/FaxLineCreateRequest.md +docs/FaxLineDeleteRequest.md +docs/FaxLineListResponse.md +docs/FaxLineRemoveUserRequest.md +docs/FaxLineResponse.md +docs/FaxLineResponseFaxLine.md docs/FileResponse.md docs/FileResponseDataUri.md docs/ListInfoResponse.md @@ -191,6 +203,7 @@ dropbox_sign/api/account_api.py dropbox_sign/api/api_app_api.py dropbox_sign/api/bulk_send_job_api.py dropbox_sign/api/embedded_api.py +dropbox_sign/api/fax_line_api.py dropbox_sign/api/o_auth_api.py dropbox_sign/api/report_api.py dropbox_sign/api/signature_request_api.py @@ -237,6 +250,17 @@ dropbox_sign/model/error_response_error.py dropbox_sign/model/event_callback_request.py dropbox_sign/model/event_callback_request_event.py dropbox_sign/model/event_callback_request_event_metadata.py +dropbox_sign/model/fax_line_add_user_request.py +dropbox_sign/model/fax_line_area_code_get_country_enum.py +dropbox_sign/model/fax_line_area_code_get_province_enum.py +dropbox_sign/model/fax_line_area_code_get_response.py +dropbox_sign/model/fax_line_area_code_get_state_enum.py +dropbox_sign/model/fax_line_create_request.py +dropbox_sign/model/fax_line_delete_request.py +dropbox_sign/model/fax_line_list_response.py +dropbox_sign/model/fax_line_remove_user_request.py +dropbox_sign/model/fax_line_response.py +dropbox_sign/model/fax_line_response_fax_line.py dropbox_sign/model/file_response.py dropbox_sign/model/file_response_data_uri.py dropbox_sign/model/list_info_response.py diff --git a/sdks/python/README.md b/sdks/python/README.md index b2233372c..8897d3033 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -118,6 +118,13 @@ All URIs are relative to *https://api.hellosign.com/v3* ```BulkSendJobApi``` | [```bulk_send_job_list```](docs/BulkSendJobApi.md#bulk_send_job_list) | ```GET /bulk_send_job/list``` | List Bulk Send Jobs| |```EmbeddedApi``` | [```embedded_edit_url```](docs/EmbeddedApi.md#embedded_edit_url) | ```POST /embedded/edit_url/{template_id}``` | Get Embedded Template Edit URL| ```EmbeddedApi``` | [```embedded_sign_url```](docs/EmbeddedApi.md#embedded_sign_url) | ```GET /embedded/sign_url/{signature_id}``` | Get Embedded Sign URL| +|```FaxLineApi``` | [```fax_line_add_user```](docs/FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| +```FaxLineApi``` | [```fax_line_area_code_get```](docs/FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| +```FaxLineApi``` | [```fax_line_create```](docs/FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| +```FaxLineApi``` | [```fax_line_delete```](docs/FaxLineApi.md#fax_line_delete) | ```DELETE /fax_line``` | Delete Fax Line| +```FaxLineApi``` | [```fax_line_get```](docs/FaxLineApi.md#fax_line_get) | ```GET /fax_line``` | Get Fax Line| +```FaxLineApi``` | [```fax_line_list```](docs/FaxLineApi.md#fax_line_list) | ```GET /fax_line/list``` | List Fax Lines| +```FaxLineApi``` | [```fax_line_remove_user```](docs/FaxLineApi.md#fax_line_remove_user) | ```PUT /fax_line/remove_user``` | Remove Fax Line Access| |```OAuthApi``` | [```oauth_token_generate```](docs/OAuthApi.md#oauth_token_generate) | ```POST /oauth/token``` | OAuth Token Generate| ```OAuthApi``` | [```oauth_token_refresh```](docs/OAuthApi.md#oauth_token_refresh) | ```POST /oauth/token?refresh``` | OAuth Token Refresh| |```ReportApi``` | [```report_create```](docs/ReportApi.md#report_create) | ```POST /report/create``` | Create Report| @@ -200,6 +207,17 @@ All URIs are relative to *https://api.hellosign.com/v3* - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) + - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) + - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) + - [FaxLineAreaCodeGetResponse](docs/FaxLineAreaCodeGetResponse.md) + - [FaxLineAreaCodeGetStateEnum](docs/FaxLineAreaCodeGetStateEnum.md) + - [FaxLineCreateRequest](docs/FaxLineCreateRequest.md) + - [FaxLineDeleteRequest](docs/FaxLineDeleteRequest.md) + - [FaxLineListResponse](docs/FaxLineListResponse.md) + - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) + - [FaxLineResponse](docs/FaxLineResponse.md) + - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/python/docs/FaxLineAddUserRequest.md b/sdks/python/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..9ad0485b7 --- /dev/null +++ b/sdks/python/docs/FaxLineAddUserRequest.md @@ -0,0 +1,16 @@ +# FaxLineAddUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```str``` | The Fax Line number. | | +| `account_id` | ```str``` | Account ID | | +| `email_address` | ```str``` | Email address | | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/FaxLineApi.md b/sdks/python/docs/FaxLineApi.md new file mode 100644 index 000000000..028d5fe83 --- /dev/null +++ b/sdks/python/docs/FaxLineApi.md @@ -0,0 +1,480 @@ +# ```dropbox_sign.FaxLineApi``` + +All URIs are relative to *https://api.hellosign.com/v3* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[```fax_line_add_user```](FaxLineApi.md#fax_line_add_user) | ```PUT /fax_line/add_user``` | Add Fax Line User| +|[```fax_line_area_code_get```](FaxLineApi.md#fax_line_area_code_get) | ```GET /fax_line/area_codes``` | Get Available Fax Line Area Codes| +|[```fax_line_create```](FaxLineApi.md#fax_line_create) | ```POST /fax_line/create``` | Purchase Fax Line| +|[```fax_line_delete```](FaxLineApi.md#fax_line_delete) | ```DELETE /fax_line``` | Delete Fax Line| +|[```fax_line_get```](FaxLineApi.md#fax_line_get) | ```GET /fax_line``` | Get Fax Line| +|[```fax_line_list```](FaxLineApi.md#fax_line_list) | ```GET /fax_line/list``` | List Fax Lines| +|[```fax_line_remove_user```](FaxLineApi.md#fax_line_remove_user) | ```PUT /fax_line/remove_user``` | Remove Fax Line Access| + + +# ```fax_line_add_user``` +> ```FaxLineResponse fax_line_add_user(fax_line_add_user_request)``` + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineAddUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_add_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_add_user_request` | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# ```fax_line_area_code_get``` +> ```FaxLineAreaCodeGetResponse fax_line_area_code_get(country)``` + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_area_code_get("US", "CA") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `country` | **str** | Filter area codes by country. | | +| `state` | **str** | Filter area codes by state. | [optional] | +| `province` | **str** | Filter area codes by province. | [optional] | +| `city` | **str** | Filter area codes by city. | [optional] | + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_line_create``` +> ```FaxLineResponse fax_line_create(fax_line_create_request)``` + +Purchase Fax Line + +Purchases a new Fax Line. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineCreateRequest( + area_code=209, + country="US", + ) + + try: + response = fax_line_api.fax_line_create(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_create_request` | [**FaxLineCreateRequest**](FaxLineCreateRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# ```fax_line_delete``` +> ```fax_line_delete(fax_line_delete_request)``` + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineDeleteRequest( + number="[FAX_NUMBER]", + ) + + try: + fax_line_api.fax_line_delete(data) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_delete_request` | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md) | | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# ```fax_line_get``` +> ```FaxLineResponse fax_line_get(number)``` + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_get("[FAX_NUMBER]") + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number` | **str** | The Fax Line number. | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_line_list``` +> ```FaxLineListResponse fax_line_list()``` + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + try: + response = fax_line_api.fax_line_list() + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_id` | **str** | Account ID | [optional] | +| `page` | **int** | Page | [optional][default to 1] | +| `page_size` | **int** | Page size | [optional][default to 20] | +| `show_team_lines` | **bool** | Show team lines | [optional] | + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +**4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```fax_line_remove_user``` +> ```FaxLineResponse fax_line_remove_user(fax_line_remove_user_request)``` + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Example + +* Basic Authentication (api_key): + +```python +from pprint import pprint + +from dropbox_sign import \ + ApiClient, ApiException, Configuration, apis, models + +configuration = Configuration( + # Configure HTTP basic authorization: api_key + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_api = apis.FaxLineApi(api_client) + + data = models.FaxLineRemoveUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = fax_line_api.fax_line_remove_user(data) + pprint(response) + except ApiException as e: + print("Exception when calling Dropbox Sign API: %s\n" % e) + +``` + + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_remove_user_request` | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + diff --git a/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..2df64fe3d --- /dev/null +++ b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,13 @@ +# FaxLineAreaCodeGetCountryEnum + + + +## 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/FaxLineAreaCodeGetProvinceEnum.md b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..46be71327 --- /dev/null +++ b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,13 @@ +# FaxLineAreaCodeGetProvinceEnum + + + +## 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/FaxLineAreaCodeGetResponse.md b/sdks/python/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..f05c3ec36 --- /dev/null +++ b/sdks/python/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,14 @@ +# FaxLineAreaCodeGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `area_codes` | ```[int]``` | | | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..9557a82b5 --- /dev/null +++ b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,13 @@ +# FaxLineAreaCodeGetStateEnum + + + +## 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/FaxLineCreateRequest.md b/sdks/python/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..75eda463d --- /dev/null +++ b/sdks/python/docs/FaxLineCreateRequest.md @@ -0,0 +1,17 @@ +# FaxLineCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `area_code`*_required_ | ```int``` | Area code | | +| `country`*_required_ | ```str``` | Country | | +| `city` | ```str``` | City | | +| `account_id` | ```str``` | Account 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/FaxLineDeleteRequest.md b/sdks/python/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..8e803d32c --- /dev/null +++ b/sdks/python/docs/FaxLineDeleteRequest.md @@ -0,0 +1,14 @@ +# FaxLineDeleteRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```str``` | The Fax Line number. | | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/FaxLineListResponse.md b/sdks/python/docs/FaxLineListResponse.md new file mode 100644 index 000000000..a4fecd5e1 --- /dev/null +++ b/sdks/python/docs/FaxLineListResponse.md @@ -0,0 +1,16 @@ +# FaxLineListResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `fax_lines` | [```[FaxLineResponseFaxLine]```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.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/FaxLineRemoveUserRequest.md b/sdks/python/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..934ff186a --- /dev/null +++ b/sdks/python/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,16 @@ +# FaxLineRemoveUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```str``` | The Fax Line number. | | +| `account_id` | ```str``` | Account ID | | +| `email_address` | ```str``` | Email address | | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/FaxLineResponse.md b/sdks/python/docs/FaxLineResponse.md new file mode 100644 index 000000000..71128088c --- /dev/null +++ b/sdks/python/docs/FaxLineResponse.md @@ -0,0 +1,15 @@ +# FaxLineResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.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/FaxLineResponseFaxLine.md b/sdks/python/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..1eea506f9 --- /dev/null +++ b/sdks/python/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,17 @@ +# FaxLineResponseFaxLine + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number` | ```str``` | Number | | +| `created_at` | ```int``` | Created at | | +| `updated_at` | ```int``` | Updated at | | +| `accounts` | [```[AccountResponse]```](AccountResponse.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/dropbox_sign/api/fax_line_api.py b/sdks/python/dropbox_sign/api/fax_line_api.py new file mode 100644 index 000000000..84e0d1b40 --- /dev/null +++ b/sdks/python/dropbox_sign/api/fax_line_api.py @@ -0,0 +1,1195 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign.api_client import ApiClient, ApiException, Endpoint as _Endpoint +from dropbox_sign.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from dropbox_sign.model.error_response import ErrorResponse +from dropbox_sign.model.fax_line_add_user_request import FaxLineAddUserRequest +from dropbox_sign.model.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse +from dropbox_sign.model.fax_line_create_request import FaxLineCreateRequest +from dropbox_sign.model.fax_line_delete_request import FaxLineDeleteRequest +from dropbox_sign.model.fax_line_list_response import FaxLineListResponse +from dropbox_sign.model.fax_line_remove_user_request import FaxLineRemoveUserRequest +from dropbox_sign.model.fax_line_response import FaxLineResponse + + +class FaxLineApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.fax_line_add_user_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line/add_user', + 'operation_id': 'fax_line_add_user', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'fax_line_add_user_request', + ], + 'required': [ + 'fax_line_add_user_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'fax_line_add_user_request': + (FaxLineAddUserRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'fax_line_add_user_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.fax_line_area_code_get_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineAreaCodeGetResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line/area_codes', + 'operation_id': 'fax_line_area_code_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'country', + 'state', + 'province', + 'city', + ], + 'required': [ + 'country', + ], + 'nullable': [ + ], + 'enum': [ + 'country', + 'state', + 'province', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('country',): { + + "CA": "CA", + "US": "US", + "UK": "UK" + }, + ('state',): { + + "AK": "AK", + "AL": "AL", + "AR": "AR", + "AZ": "AZ", + "CA": "CA", + "CO": "CO", + "CT": "CT", + "DC": "DC", + "DE": "DE", + "FL": "FL", + "GA": "GA", + "HI": "HI", + "IA": "IA", + "ID": "ID", + "IL": "IL", + "IN": "IN", + "KS": "KS", + "KY": "KY", + "LA": "LA", + "MA": "MA", + "MD": "MD", + "ME": "ME", + "MI": "MI", + "MN": "MN", + "MO": "MO", + "MS": "MS", + "MT": "MT", + "NC": "NC", + "ND": "ND", + "NE": "NE", + "NH": "NH", + "NJ": "NJ", + "NM": "NM", + "NV": "NV", + "NY": "NY", + "OH": "OH", + "OK": "OK", + "OR": "OR", + "PA": "PA", + "RI": "RI", + "SC": "SC", + "SD": "SD", + "TN": "TN", + "TX": "TX", + "UT": "UT", + "VA": "VA", + "VT": "VT", + "WA": "WA", + "WI": "WI", + "WV": "WV", + "WY": "WY" + }, + ('province',): { + + "AB": "AB", + "BC": "BC", + "MB": "MB", + "NB": "NB", + "NL": "NL", + "NT": "NT", + "NS": "NS", + "NU": "NU", + "ON": "ON", + "PE": "PE", + "QC": "QC", + "SK": "SK", + "YT": "YT" + }, + }, + 'openapi_types': { + 'country': + (str,), + 'state': + (str,), + 'province': + (str,), + 'city': + (str,), + }, + 'attribute_map': { + 'country': 'country', + 'state': 'state', + 'province': 'province', + 'city': 'city', + }, + 'location_map': { + 'country': 'query', + 'state': 'query', + 'province': 'query', + 'city': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.fax_line_create_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line/create', + 'operation_id': 'fax_line_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'fax_line_create_request', + ], + 'required': [ + 'fax_line_create_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'fax_line_create_request': + (FaxLineCreateRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'fax_line_create_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.fax_line_delete_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line', + 'operation_id': 'fax_line_delete', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'fax_line_delete_request', + ], + 'required': [ + 'fax_line_delete_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'fax_line_delete_request': + (FaxLineDeleteRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'fax_line_delete_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.fax_line_get_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line', + 'operation_id': 'fax_line_get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'number', + ], + 'required': [ + 'number', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'number': + (str,), + }, + 'attribute_map': { + 'number': 'number', + }, + 'location_map': { + 'number': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.fax_line_list_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineListResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line/list', + 'operation_id': 'fax_line_list', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'account_id', + 'page', + 'page_size', + 'show_team_lines', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'account_id': + (str,), + 'page': + (int,), + 'page_size': + (int,), + 'show_team_lines': + (bool,), + }, + 'attribute_map': { + 'account_id': 'account_id', + 'page': 'page', + 'page_size': 'page_size', + 'show_team_lines': 'show_team_lines', + }, + 'location_map': { + 'account_id': 'query', + 'page': 'query', + 'page_size': 'query', + 'show_team_lines': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.fax_line_remove_user_endpoint = _Endpoint( + settings={ + 'response_type': (FaxLineResponse,), + 'auth': [ + 'api_key' + ], + 'endpoint_path': '/fax_line/remove_user', + 'operation_id': 'fax_line_remove_user', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'fax_line_remove_user_request', + ], + 'required': [ + 'fax_line_remove_user_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'fax_line_remove_user_request': + (FaxLineRemoveUserRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'fax_line_remove_user_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def fax_line_add_user( + self, + fax_line_add_user_request, + **kwargs + ) -> FaxLineResponse: + """Add Fax Line User # noqa: E501 + + Grants a user access to the specified Fax Line. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_add_user(fax_line_add_user_request, async_req=True) + >>> result = thread.get() + + Args: + fax_line_add_user_request (FaxLineAddUserRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['fax_line_add_user_request'] = \ + fax_line_add_user_request + try: + return self.fax_line_add_user_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + + def fax_line_area_code_get( + self, + country, + **kwargs + ) -> FaxLineAreaCodeGetResponse: + """Get Available Fax Line Area Codes # noqa: E501 + + Returns a response with the area codes available for a given state/provice and city. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_area_code_get(country, async_req=True) + >>> result = thread.get() + + Args: + country (str): Filter area codes by country. + + Keyword Args: + state (str): Filter area codes by state.. [optional] + province (str): Filter area codes by province.. [optional] + city (str): Filter area codes by city.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineAreaCodeGetResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['country'] = \ + country + try: + return self.fax_line_area_code_get_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineAreaCodeGetResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + + def fax_line_create( + self, + fax_line_create_request, + **kwargs + ) -> FaxLineResponse: + """Purchase Fax Line # noqa: E501 + + Purchases a new Fax Line. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_create(fax_line_create_request, async_req=True) + >>> result = thread.get() + + Args: + fax_line_create_request (FaxLineCreateRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['fax_line_create_request'] = \ + fax_line_create_request + try: + return self.fax_line_create_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + + def fax_line_delete( + self, + fax_line_delete_request, + **kwargs + ) -> None: + """Delete Fax Line # noqa: E501 + + Deletes the specified Fax Line from the subscription. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_delete(fax_line_delete_request, async_req=True) + >>> result = thread.get() + + Args: + fax_line_delete_request (FaxLineDeleteRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['fax_line_delete_request'] = \ + fax_line_delete_request + return self.fax_line_delete_endpoint.call_with_http_info(**kwargs) + + def fax_line_get( + self, + number, + **kwargs + ) -> FaxLineResponse: + """Get Fax Line # noqa: E501 + + Returns the properties and settings of a Fax Line. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_get(number, async_req=True) + >>> result = thread.get() + + Args: + number (str): The Fax Line number. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['number'] = \ + number + try: + return self.fax_line_get_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + + def fax_line_list( + self, + **kwargs + ) -> FaxLineListResponse: + """List Fax Lines # noqa: E501 + + Returns the properties and settings of multiple Fax Lines. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + account_id (str): Account ID. [optional] + page (int): Page. [optional] if omitted the server will use the default value of 1 + page_size (int): Page size. [optional] if omitted the server will use the default value of 20 + show_team_lines (bool): Show team lines. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineListResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + try: + return self.fax_line_list_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineListResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + + def fax_line_remove_user( + self, + fax_line_remove_user_request, + **kwargs + ) -> FaxLineResponse: + """Remove Fax Line Access # noqa: E501 + + Removes a user's access to the specified Fax Line. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fax_line_remove_user(fax_line_remove_user_request, async_req=True) + >>> result = thread.get() + + Args: + fax_line_remove_user_request (FaxLineRemoveUserRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): 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. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FaxLineResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['fax_line_remove_user_request'] = \ + fax_line_remove_user_request + try: + return self.fax_line_remove_user_endpoint.call_with_http_info(**kwargs) + except ApiException as e: + if e.status == 200: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[FaxLineResponse], + _check_type=True, + ) + + raise e + range_code = "4XX"[0] + range_code_left = int(f"{range_code}00") + range_code_right = int(f"{range_code}99") + + if range_code_left <= e.status <= range_code_right: + e.body = self.api_client.deserialize( + response=type('obj_dict', (object,), {'data': e.body}), + response_type=[ErrorResponse], + _check_type=True, + ) + + raise e + diff --git a/sdks/python/dropbox_sign/apis/__init__.py b/sdks/python/dropbox_sign/apis/__init__.py index dca24c92e..413c12aa2 100644 --- a/sdks/python/dropbox_sign/apis/__init__.py +++ b/sdks/python/dropbox_sign/apis/__init__.py @@ -18,6 +18,7 @@ from dropbox_sign.api.api_app_api import ApiAppApi from dropbox_sign.api.bulk_send_job_api import BulkSendJobApi from dropbox_sign.api.embedded_api import EmbeddedApi +from dropbox_sign.api.fax_line_api import FaxLineApi from dropbox_sign.api.o_auth_api import OAuthApi from dropbox_sign.api.report_api import ReportApi from dropbox_sign.api.signature_request_api import SignatureRequestApi diff --git a/sdks/python/dropbox_sign/model/fax_line.py b/sdks/python/dropbox_sign/model/fax_line.py new file mode 100644 index 000000000..5c0da8910 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line.py @@ -0,0 +1,327 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError +if TYPE_CHECKING: + from dropbox_sign.model.account_response import AccountResponse + + +def lazy_import(): + from dropbox_sign.model.account_response import AccountResponse + globals()['AccountResponse'] = AccountResponse + + +class FaxLine(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'number': (str,), # noqa: E501 + 'created_at': (str,), # noqa: E501 + 'updated_at': (str,), # noqa: E501 + 'accounts': ([AccountResponse],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLine: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLine], + _check_type=True, + ) + + attribute_map = { + 'number': 'number', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'accounts': 'accounts', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def number(self) -> str: + return self.get("number") + + @number.setter + def number(self, value: str): + setattr(self, "number", value) + + @property + def created_at(self) -> str: + return self.get("created_at") + + @created_at.setter + def created_at(self, value: str): + setattr(self, "created_at", value) + + @property + def updated_at(self) -> str: + return self.get("updated_at") + + @updated_at.setter + def updated_at(self, value: str): + setattr(self, "updated_at", value) + + @property + def accounts(self) -> List[AccountResponse]: + return self.get("accounts") + + @accounts.setter + def accounts(self, value: List[AccountResponse]): + setattr(self, "accounts", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FaxLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): Number. [optional] # noqa: E501 + created_at (str): Created at. [optional] # noqa: E501 + updated_at (str): Updated at. [optional] # noqa: E501 + accounts ([AccountResponse]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FaxLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): Number. [optional] # noqa: E501 + created_at (str): Created at. [optional] # noqa: E501 + updated_at (str): Updated at. [optional] # noqa: E501 + accounts ([AccountResponse]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_add_user_request.py b/sdks/python/dropbox_sign/model/fax_line_add_user_request.py new file mode 100644 index 000000000..234fdbafa --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_add_user_request.py @@ -0,0 +1,313 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineAddUserRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'email_address': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineAddUserRequest: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineAddUserRequest], + _check_type=True, + ) + + attribute_map = { + 'number': 'number', # noqa: E501 + 'account_id': 'account_id', # noqa: E501 + 'email_address': 'email_address', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def number(self) -> str: + return self.get("number") + + @number.setter + def number(self, value: str): + setattr(self, "number", value) + + @property + def account_id(self) -> str: + return self.get("account_id") + + @account_id.setter + def account_id(self, value: str): + setattr(self, "account_id", value) + + @property + def email_address(self) -> str: + return self.get("email_address") + + @email_address.setter + def email_address(self, value: str): + setattr(self, "email_address", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 + """FaxLineAddUserRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + account_id (str): Account ID. [optional] # noqa: E501 + email_address (str): Email address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, number, *args, **kwargs): # noqa: E501 + """FaxLineAddUserRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + account_id (str): Account ID. [optional] # noqa: E501 + email_address (str): Email address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py new file mode 100644 index 000000000..cbd0d8ce4 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_area_code_get_country_enum.py @@ -0,0 +1,304 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineAreaCodeGetCountryEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'CA': "CA", + 'US': "US", + 'UK': "UK", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineAreaCodeGetCountryEnum: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineAreaCodeGetCountryEnum], + _check_type=True, + ) + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """FaxLineAreaCodeGetCountryEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """FaxLineAreaCodeGetCountryEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["CA", "US", "UK", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py new file mode 100644 index 000000000..a9e640a58 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_area_code_get_province_enum.py @@ -0,0 +1,314 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineAreaCodeGetProvinceEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AB': "AB", + 'BC': "BC", + 'MB': "MB", + 'NB': "NB", + 'NL': "NL", + 'NT': "NT", + 'NS': "NS", + 'NU': "NU", + 'ON': "ON", + 'PE': "PE", + 'QC': "QC", + 'SK': "SK", + 'YT': "YT", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineAreaCodeGetProvinceEnum: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineAreaCodeGetProvinceEnum], + _check_type=True, + ) + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """FaxLineAreaCodeGetProvinceEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """FaxLineAreaCodeGetProvinceEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py new file mode 100644 index 000000000..d856d9e2c --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_area_code_get_response.py @@ -0,0 +1,283 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineAreaCodeGetResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'area_codes': ([int],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineAreaCodeGetResponse: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineAreaCodeGetResponse], + _check_type=True, + ) + + attribute_map = { + 'area_codes': 'area_codes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def area_codes(self) -> List[int]: + return self.get("area_codes") + + @area_codes.setter + def area_codes(self, value: List[int]): + setattr(self, "area_codes", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FaxLineAreaCodeGetResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area_codes ([int]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FaxLineAreaCodeGetResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + area_codes ([int]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py b/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py new file mode 100644 index 000000000..e070603d3 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_area_code_get_state_enum.py @@ -0,0 +1,352 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineAreaCodeGetStateEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'AK': "AK", + 'AL': "AL", + 'AR': "AR", + 'AZ': "AZ", + 'CA': "CA", + 'CO': "CO", + 'CT': "CT", + 'DC': "DC", + 'DE': "DE", + 'FL': "FL", + 'GA': "GA", + 'HI': "HI", + 'IA': "IA", + 'ID': "ID", + 'IL': "IL", + 'IN': "IN", + 'KS': "KS", + 'KY': "KY", + 'LA': "LA", + 'MA': "MA", + 'MD': "MD", + 'ME': "ME", + 'MI': "MI", + 'MN': "MN", + 'MO': "MO", + 'MS': "MS", + 'MT': "MT", + 'NC': "NC", + 'ND': "ND", + 'NE': "NE", + 'NH': "NH", + 'NJ': "NJ", + 'NM': "NM", + 'NV': "NV", + 'NY': "NY", + 'OH': "OH", + 'OK': "OK", + 'OR': "OR", + 'PA': "PA", + 'RI': "RI", + 'SC': "SC", + 'SD': "SD", + 'TN': "TN", + 'TX': "TX", + 'UT': "UT", + 'VA': "VA", + 'VT': "VT", + 'WA': "WA", + 'WI': "WI", + 'WV': "WV", + 'WY': "WY", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineAreaCodeGetStateEnum: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineAreaCodeGetStateEnum], + _check_type=True, + ) + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """FaxLineAreaCodeGetStateEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """FaxLineAreaCodeGetStateEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/sdks/python/dropbox_sign/model/fax_line_create_request.py b/sdks/python/dropbox_sign/model/fax_line_create_request.py new file mode 100644 index 000000000..6a0789680 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_create_request.py @@ -0,0 +1,332 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineCreateRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('country',): { + 'CA': "CA", + 'US': "US", + 'UK': "UK", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'area_code': (int,), # noqa: E501 + 'country': (str,), # noqa: E501 + 'city': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineCreateRequest: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineCreateRequest], + _check_type=True, + ) + + attribute_map = { + 'area_code': 'area_code', # noqa: E501 + 'country': 'country', # noqa: E501 + 'city': 'city', # noqa: E501 + 'account_id': 'account_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def area_code(self) -> int: + return self.get("area_code") + + @area_code.setter + def area_code(self, value: int): + setattr(self, "area_code", value) + + @property + def country(self) -> str: + return self.get("country") + + @country.setter + def country(self, value: str): + setattr(self, "country", value) + + @property + def city(self) -> str: + return self.get("city") + + @city.setter + def city(self, value: str): + setattr(self, "city", value) + + @property + def account_id(self) -> str: + return self.get("account_id") + + @account_id.setter + def account_id(self, value: str): + setattr(self, "account_id", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, area_code, country, *args, **kwargs): # noqa: E501 + """FaxLineCreateRequest - a model defined in OpenAPI + + Args: + area_code (int): Area code + country (str): Country + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + city (str): City. [optional] # noqa: E501 + account_id (str): Account ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.area_code = area_code + self.country = country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, area_code, country, *args, **kwargs): # noqa: E501 + """FaxLineCreateRequest - a model defined in OpenAPI + + Args: + area_code (int): Area code + country (str): Country + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + city (str): City. [optional] # noqa: E501 + account_id (str): Account ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.area_code = area_code + self.country = country + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_delete_request.py b/sdks/python/dropbox_sign/model/fax_line_delete_request.py new file mode 100644 index 000000000..68605d0ce --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_delete_request.py @@ -0,0 +1,289 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineDeleteRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineDeleteRequest: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineDeleteRequest], + _check_type=True, + ) + + attribute_map = { + 'number': 'number', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def number(self) -> str: + return self.get("number") + + @number.setter + def number(self, value: str): + setattr(self, "number", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 + """FaxLineDeleteRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, number, *args, **kwargs): # noqa: E501 + """FaxLineDeleteRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_list_response.py b/sdks/python/dropbox_sign/model/fax_line_list_response.py new file mode 100644 index 000000000..1bcac65d0 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_list_response.py @@ -0,0 +1,321 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError +if TYPE_CHECKING: + from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine + from dropbox_sign.model.list_info_response import ListInfoResponse + from dropbox_sign.model.warning_response import WarningResponse + + +def lazy_import(): + from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine + from dropbox_sign.model.list_info_response import ListInfoResponse + from dropbox_sign.model.warning_response import WarningResponse + globals()['FaxLineResponseFaxLine'] = FaxLineResponseFaxLine + globals()['ListInfoResponse'] = ListInfoResponse + globals()['WarningResponse'] = WarningResponse + + +class FaxLineListResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'list_info': (ListInfoResponse,), # noqa: E501 + 'fax_lines': ([FaxLineResponseFaxLine],), # noqa: E501 + 'warnings': (WarningResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineListResponse: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineListResponse], + _check_type=True, + ) + + attribute_map = { + 'list_info': 'list_info', # noqa: E501 + 'fax_lines': 'fax_lines', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def list_info(self) -> ListInfoResponse: + return self.get("list_info") + + @list_info.setter + def list_info(self, value: ListInfoResponse): + setattr(self, "list_info", value) + + @property + def fax_lines(self) -> List[FaxLineResponseFaxLine]: + return self.get("fax_lines") + + @fax_lines.setter + def fax_lines(self, value: List[FaxLineResponseFaxLine]): + setattr(self, "fax_lines", value) + + @property + def warnings(self) -> WarningResponse: + return self.get("warnings") + + @warnings.setter + def warnings(self, value: WarningResponse): + setattr(self, "warnings", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FaxLineListResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + list_info (ListInfoResponse): [optional] # noqa: E501 + fax_lines ([FaxLineResponseFaxLine]): [optional] # noqa: E501 + warnings (WarningResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FaxLineListResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + list_info (ListInfoResponse): [optional] # noqa: E501 + fax_lines ([FaxLineResponseFaxLine]): [optional] # noqa: E501 + warnings (WarningResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py b/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py new file mode 100644 index 000000000..7867fa69a --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_remove_user_request.py @@ -0,0 +1,313 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError + + + +class FaxLineRemoveUserRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'email_address': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineRemoveUserRequest: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineRemoveUserRequest], + _check_type=True, + ) + + attribute_map = { + 'number': 'number', # noqa: E501 + 'account_id': 'account_id', # noqa: E501 + 'email_address': 'email_address', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def number(self) -> str: + return self.get("number") + + @number.setter + def number(self, value: str): + setattr(self, "number", value) + + @property + def account_id(self) -> str: + return self.get("account_id") + + @account_id.setter + def account_id(self, value: str): + setattr(self, "account_id", value) + + @property + def email_address(self) -> str: + return self.get("email_address") + + @email_address.setter + def email_address(self, value: str): + setattr(self, "email_address", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, number, *args, **kwargs): # noqa: E501 + """FaxLineRemoveUserRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + account_id (str): Account ID. [optional] # noqa: E501 + email_address (str): Email address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, number, *args, **kwargs): # noqa: E501 + """FaxLineRemoveUserRequest - a model defined in OpenAPI + + Args: + number (str): The Fax Line number. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + account_id (str): Account ID. [optional] # noqa: E501 + email_address (str): Email address. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.number = number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_response.py b/sdks/python/dropbox_sign/model/fax_line_response.py new file mode 100644 index 000000000..7de499c2b --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_response.py @@ -0,0 +1,306 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError +if TYPE_CHECKING: + from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine + from dropbox_sign.model.warning_response import WarningResponse + + +def lazy_import(): + from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine + from dropbox_sign.model.warning_response import WarningResponse + globals()['FaxLineResponseFaxLine'] = FaxLineResponseFaxLine + globals()['WarningResponse'] = WarningResponse + + +class FaxLineResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'fax_line': (FaxLineResponseFaxLine,), # noqa: E501 + 'warnings': (WarningResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineResponse: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineResponse], + _check_type=True, + ) + + attribute_map = { + 'fax_line': 'fax_line', # noqa: E501 + 'warnings': 'warnings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def fax_line(self) -> FaxLineResponseFaxLine: + return self.get("fax_line") + + @fax_line.setter + def fax_line(self, value: FaxLineResponseFaxLine): + setattr(self, "fax_line", value) + + @property + def warnings(self) -> WarningResponse: + return self.get("warnings") + + @warnings.setter + def warnings(self, value: WarningResponse): + setattr(self, "warnings", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FaxLineResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + fax_line (FaxLineResponseFaxLine): [optional] # noqa: E501 + warnings (WarningResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FaxLineResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + fax_line (FaxLineResponseFaxLine): [optional] # noqa: E501 + warnings (WarningResponse): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py b/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py new file mode 100644 index 000000000..844b7d771 --- /dev/null +++ b/sdks/python/dropbox_sign/model/fax_line_response_fax_line.py @@ -0,0 +1,327 @@ +""" + Dropbox Sign API + + Dropbox Sign v3 API # noqa: E501 + + The version of the OpenAPI document: 3.0.0 + Contact: apisupport@hellosign.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import annotations +from typing import TYPE_CHECKING, Optional, List, Dict, Union +import json # noqa: F401 +import re # noqa: F401 +import sys # noqa: F401 + +from dropbox_sign import ApiClient +from dropbox_sign.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from dropbox_sign.exceptions import ApiAttributeError +if TYPE_CHECKING: + from dropbox_sign.model.account_response import AccountResponse + + +def lazy_import(): + from dropbox_sign.model.account_response import AccountResponse + globals()['AccountResponse'] = AccountResponse + + +class FaxLineResponseFaxLine(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'number': (str,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + 'accounts': ([AccountResponse],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + @staticmethod + def init(data: any) -> FaxLineResponseFaxLine: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + try: + obj_data = json.dumps(data) + except TypeError: + obj_data = data + + return ApiClient().deserialize( + response=type('obj_dict', (object,), {'data': obj_data}), + response_type=[FaxLineResponseFaxLine], + _check_type=True, + ) + + attribute_map = { + 'number': 'number', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'accounts': 'accounts', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @property + def number(self) -> str: + return self.get("number") + + @number.setter + def number(self, value: str): + setattr(self, "number", value) + + @property + def created_at(self) -> int: + return self.get("created_at") + + @created_at.setter + def created_at(self, value: int): + setattr(self, "created_at", value) + + @property + def updated_at(self) -> int: + return self.get("updated_at") + + @updated_at.setter + def updated_at(self, value: int): + setattr(self, "updated_at", value) + + @property + def accounts(self) -> List[AccountResponse]: + return self.get("accounts") + + @accounts.setter + def accounts(self, value: List[AccountResponse]): + setattr(self, "accounts", value) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FaxLineResponseFaxLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): Number. [optional] # noqa: E501 + created_at (int): Created at. [optional] # noqa: E501 + updated_at (int): Updated at. [optional] # noqa: E501 + accounts ([AccountResponse]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """FaxLineResponseFaxLine - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): Number. [optional] # noqa: E501 + created_at (int): Created at. [optional] # noqa: E501 + updated_at (int): Updated at. [optional] # noqa: E501 + accounts ([AccountResponse]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index 81a97b084..e568ef334 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -43,6 +43,17 @@ from dropbox_sign.model.event_callback_request import EventCallbackRequest from dropbox_sign.model.event_callback_request_event import EventCallbackRequestEvent from dropbox_sign.model.event_callback_request_event_metadata import EventCallbackRequestEventMetadata +from dropbox_sign.model.fax_line_add_user_request import FaxLineAddUserRequest +from dropbox_sign.model.fax_line_area_code_get_country_enum import FaxLineAreaCodeGetCountryEnum +from dropbox_sign.model.fax_line_area_code_get_province_enum import FaxLineAreaCodeGetProvinceEnum +from dropbox_sign.model.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse +from dropbox_sign.model.fax_line_area_code_get_state_enum import FaxLineAreaCodeGetStateEnum +from dropbox_sign.model.fax_line_create_request import FaxLineCreateRequest +from dropbox_sign.model.fax_line_delete_request import FaxLineDeleteRequest +from dropbox_sign.model.fax_line_list_response import FaxLineListResponse +from dropbox_sign.model.fax_line_remove_user_request import FaxLineRemoveUserRequest +from dropbox_sign.model.fax_line_response import FaxLineResponse +from dropbox_sign.model.fax_line_response_fax_line import FaxLineResponseFaxLine from dropbox_sign.model.file_response import FileResponse from dropbox_sign.model.file_response_data_uri import FileResponseDataUri from dropbox_sign.model.list_info_response import ListInfoResponse diff --git a/sdks/ruby/.openapi-generator/FILES b/sdks/ruby/.openapi-generator/FILES index f02adf49e..2ff1424e3 100644 --- a/sdks/ruby/.openapi-generator/FILES +++ b/sdks/ruby/.openapi-generator/FILES @@ -45,6 +45,18 @@ docs/ErrorResponseError.md docs/EventCallbackRequest.md docs/EventCallbackRequestEvent.md docs/EventCallbackRequestEventMetadata.md +docs/FaxLineAddUserRequest.md +docs/FaxLineApi.md +docs/FaxLineAreaCodeGetCountryEnum.md +docs/FaxLineAreaCodeGetProvinceEnum.md +docs/FaxLineAreaCodeGetResponse.md +docs/FaxLineAreaCodeGetStateEnum.md +docs/FaxLineCreateRequest.md +docs/FaxLineDeleteRequest.md +docs/FaxLineListResponse.md +docs/FaxLineRemoveUserRequest.md +docs/FaxLineResponse.md +docs/FaxLineResponseFaxLine.md docs/FileResponse.md docs/FileResponseDataUri.md docs/ListInfoResponse.md @@ -195,6 +207,7 @@ lib/dropbox-sign/api/account_api.rb lib/dropbox-sign/api/api_app_api.rb lib/dropbox-sign/api/bulk_send_job_api.rb lib/dropbox-sign/api/embedded_api.rb +lib/dropbox-sign/api/fax_line_api.rb lib/dropbox-sign/api/o_auth_api.rb lib/dropbox-sign/api/report_api.rb lib/dropbox-sign/api/signature_request_api.rb @@ -239,6 +252,17 @@ lib/dropbox-sign/models/error_response_error.rb lib/dropbox-sign/models/event_callback_request.rb lib/dropbox-sign/models/event_callback_request_event.rb lib/dropbox-sign/models/event_callback_request_event_metadata.rb +lib/dropbox-sign/models/fax_line_add_user_request.rb +lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb +lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb +lib/dropbox-sign/models/fax_line_area_code_get_response.rb +lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb +lib/dropbox-sign/models/fax_line_create_request.rb +lib/dropbox-sign/models/fax_line_delete_request.rb +lib/dropbox-sign/models/fax_line_list_response.rb +lib/dropbox-sign/models/fax_line_remove_user_request.rb +lib/dropbox-sign/models/fax_line_response.rb +lib/dropbox-sign/models/fax_line_response_fax_line.rb lib/dropbox-sign/models/file_response.rb lib/dropbox-sign/models/file_response_data_uri.rb lib/dropbox-sign/models/list_info_response.rb diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 784af10dc..5dbddb756 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -120,6 +120,13 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs | |*Dropbox::Sign::EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | |*Dropbox::Sign::EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_add_user**](docs/FaxLineApi.md#fax_line_add_user) | **PUT** /fax_line/add_user | Add Fax Line User | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_area_code_get**](docs/FaxLineApi.md#fax_line_area_code_get) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_create**](docs/FaxLineApi.md#fax_line_create) | **POST** /fax_line/create | Purchase Fax Line | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_delete**](docs/FaxLineApi.md#fax_line_delete) | **DELETE** /fax_line | Delete Fax Line | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_get**](docs/FaxLineApi.md#fax_line_get) | **GET** /fax_line | Get Fax Line | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_list**](docs/FaxLineApi.md#fax_line_list) | **GET** /fax_line/list | List Fax Lines | +|*Dropbox::Sign::FaxLineApi* | [**fax_line_remove_user**](docs/FaxLineApi.md#fax_line_remove_user) | **PUT** /fax_line/remove_user | Remove Fax Line Access | |*Dropbox::Sign::OAuthApi* | [**oauth_token_generate**](docs/OAuthApi.md#oauth_token_generate) | **POST** /oauth/token | OAuth Token Generate | |*Dropbox::Sign::OAuthApi* | [**oauth_token_refresh**](docs/OAuthApi.md#oauth_token_refresh) | **POST** /oauth/token?refresh | OAuth Token Refresh | |*Dropbox::Sign::ReportApi* | [**report_create**](docs/ReportApi.md#report_create) | **POST** /report/create | Create Report | @@ -202,6 +209,17 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::EventCallbackRequest](docs/EventCallbackRequest.md) - [Dropbox::Sign::EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Dropbox::Sign::EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Dropbox::Sign::FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) + - [Dropbox::Sign::FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) + - [Dropbox::Sign::FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) + - [Dropbox::Sign::FaxLineAreaCodeGetResponse](docs/FaxLineAreaCodeGetResponse.md) + - [Dropbox::Sign::FaxLineAreaCodeGetStateEnum](docs/FaxLineAreaCodeGetStateEnum.md) + - [Dropbox::Sign::FaxLineCreateRequest](docs/FaxLineCreateRequest.md) + - [Dropbox::Sign::FaxLineDeleteRequest](docs/FaxLineDeleteRequest.md) + - [Dropbox::Sign::FaxLineListResponse](docs/FaxLineListResponse.md) + - [Dropbox::Sign::FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) + - [Dropbox::Sign::FaxLineResponse](docs/FaxLineResponse.md) + - [Dropbox::Sign::FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) - [Dropbox::Sign::FileResponse](docs/FileResponse.md) - [Dropbox::Sign::FileResponseDataUri](docs/FileResponseDataUri.md) - [Dropbox::Sign::ListInfoResponse](docs/ListInfoResponse.md) diff --git a/sdks/ruby/docs/FaxLineAddUserRequest.md b/sdks/ruby/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..272d38367 --- /dev/null +++ b/sdks/ruby/docs/FaxLineAddUserRequest.md @@ -0,0 +1,12 @@ +# Dropbox::Sign::FaxLineAddUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `account_id` | ```String``` | Account ID | | +| `email_address` | ```String``` | Email address | | + diff --git a/sdks/ruby/docs/FaxLineApi.md b/sdks/ruby/docs/FaxLineApi.md new file mode 100644 index 000000000..f5b1d3b43 --- /dev/null +++ b/sdks/ruby/docs/FaxLineApi.md @@ -0,0 +1,503 @@ +# Dropbox::Sign::FaxLineApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [`fax_line_add_user`](FaxLineApi.md#fax_line_add_user) | **PUT** `/fax_line/add_user` | Add Fax Line User | +| [`fax_line_area_code_get`](FaxLineApi.md#fax_line_area_code_get) | **GET** `/fax_line/area_codes` | Get Available Fax Line Area Codes | +| [`fax_line_create`](FaxLineApi.md#fax_line_create) | **POST** `/fax_line/create` | Purchase Fax Line | +| [`fax_line_delete`](FaxLineApi.md#fax_line_delete) | **DELETE** `/fax_line` | Delete Fax Line | +| [`fax_line_get`](FaxLineApi.md#fax_line_get) | **GET** `/fax_line` | Get Fax Line | +| [`fax_line_list`](FaxLineApi.md#fax_line_list) | **GET** `/fax_line/list` | List Fax Lines | +| [`fax_line_remove_user`](FaxLineApi.md#fax_line_remove_user) | **PUT** `/fax_line/remove_user` | Remove Fax Line Access | + + +## `fax_line_add_user` + +> ` fax_line_add_user(fax_line_add_user_request)` + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineAddUserRequest.new +data.number = "[FAX_NUMBER]" +data.email_address = "member@dropboxsign.com" + +begin + result = fax_line_api.fax_line_add_user(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_add_user_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_add_user_with_http_info(fax_line_add_user_request)` + +```ruby +begin + # Add Fax Line User + data, status_code, headers = api_instance.fax_line_add_user_with_http_info(fax_line_add_user_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_add_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_add_user_request` | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## `fax_line_area_code_get` + +> ` fax_line_area_code_get(country, opts)` + +Get Available Fax Line Area Codes + +Returns a response with the area codes available for a given state/provice and city. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_area_code_get("US", "CA") + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_area_code_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_area_code_get_with_http_info(country, opts)` + +```ruby +begin + # Get Available Fax Line Area Codes + data, status_code, headers = api_instance.fax_line_area_code_get_with_http_info(country, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_area_code_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `country` | **String** | Filter area codes by country. | | +| `state` | **String** | Filter area codes by state. | [optional] | +| `province` | **String** | Filter area codes by province. | [optional] | +| `city` | **String** | Filter area codes by city. | [optional] | + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_line_create` + +> ` fax_line_create(fax_line_create_request)` + +Purchase Fax Line + +Purchases a new Fax Line. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineCreateRequest.new +data.area_code = 209 +data.country = "US" + +begin + result = fax_line_api.fax_line_create(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_create_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_create_with_http_info(fax_line_create_request)` + +```ruby +begin + # Purchase Fax Line + data, status_code, headers = api_instance.fax_line_create_with_http_info(fax_line_create_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_create_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_create_request` | [**FaxLineCreateRequest**](FaxLineCreateRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## `fax_line_delete` + +> `fax_line_delete(fax_line_delete_request)` + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineDeleteRequest.new +data.number = "[FAX_NUMBER]" + +begin + fax_line_api.fax_line_delete(data) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_delete_with_http_info` variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> ` fax_line_delete_with_http_info(fax_line_delete_request)` + +```ruby +begin + # Delete Fax Line + data, status_code, headers = api_instance.fax_line_delete_with_http_info(fax_line_delete_request) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_delete_request` | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md) | | | + +### Return type + +nil (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## `fax_line_get` + +> ` fax_line_get(number)` + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_get("[NUMBER]") + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_get_with_http_info(number)` + +```ruby +begin + # Get Fax Line + data, status_code, headers = api_instance.fax_line_get_with_http_info(number) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number` | **String** | The Fax Line number. | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_line_list` + +> ` fax_line_list(opts)` + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +begin + result = fax_line_api.fax_line_list() + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_list_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_list_with_http_info(opts)` + +```ruby +begin + # List Fax Lines + data, status_code, headers = api_instance.fax_line_list_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_list_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `account_id` | **String** | Account ID | [optional] | +| `page` | **Integer** | Page | [optional][default to 1] | +| `page_size` | **Integer** | Page size | [optional][default to 20] | +| `show_team_lines` | **Boolean** | Show team lines | [optional] | + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_line_remove_user` + +> ` fax_line_remove_user(fax_line_remove_user_request)` + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_line_api = Dropbox::Sign::FaxLineApi.new + +data = Dropbox::Sign::FaxLineRemoveUserRequest.new +data.number = "[FAX_NUMBER]" +data.email_address = "member@dropboxsign.com" + +begin + result = fax_line_api.fax_line_remove_user(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_line_remove_user_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_line_remove_user_with_http_info(fax_line_remove_user_request)` + +```ruby +begin + # Remove Fax Line Access + data, status_code, headers = api_instance.fax_line_remove_user_with_http_info(fax_line_remove_user_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxLineApi->fax_line_remove_user_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line_remove_user_request` | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md) | | | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/sdks/ruby/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/ruby/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..1b6b5aaa5 --- /dev/null +++ b/sdks/ruby/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::FaxLineAreaCodeGetCountryEnum + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/ruby/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..26d51f7c1 --- /dev/null +++ b/sdks/ruby/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::FaxLineAreaCodeGetProvinceEnum + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/FaxLineAreaCodeGetResponse.md b/sdks/ruby/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..ec20a8793 --- /dev/null +++ b/sdks/ruby/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,10 @@ +# Dropbox::Sign::FaxLineAreaCodeGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `area_codes` | ```Array``` | | | + diff --git a/sdks/ruby/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/ruby/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..92f903f1c --- /dev/null +++ b/sdks/ruby/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,9 @@ +# Dropbox::Sign::FaxLineAreaCodeGetStateEnum + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + diff --git a/sdks/ruby/docs/FaxLineCreateRequest.md b/sdks/ruby/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..bbe5312c6 --- /dev/null +++ b/sdks/ruby/docs/FaxLineCreateRequest.md @@ -0,0 +1,13 @@ +# Dropbox::Sign::FaxLineCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `area_code`*_required_ | ```Integer``` | Area code | | +| `country`*_required_ | ```String``` | Country | | +| `city` | ```String``` | City | | +| `account_id` | ```String``` | Account ID | | + diff --git a/sdks/ruby/docs/FaxLineDeleteRequest.md b/sdks/ruby/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..5c781f3b4 --- /dev/null +++ b/sdks/ruby/docs/FaxLineDeleteRequest.md @@ -0,0 +1,10 @@ +# Dropbox::Sign::FaxLineDeleteRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```String``` | The Fax Line number. | | + diff --git a/sdks/ruby/docs/FaxLineListResponse.md b/sdks/ruby/docs/FaxLineListResponse.md new file mode 100644 index 000000000..ab14849aa --- /dev/null +++ b/sdks/ruby/docs/FaxLineListResponse.md @@ -0,0 +1,12 @@ +# Dropbox::Sign::FaxLineListResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `list_info` | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `fax_lines` | [```Array```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + diff --git a/sdks/ruby/docs/FaxLineRemoveUserRequest.md b/sdks/ruby/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..98388f6f4 --- /dev/null +++ b/sdks/ruby/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,12 @@ +# Dropbox::Sign::FaxLineRemoveUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number`*_required_ | ```String``` | The Fax Line number. | | +| `account_id` | ```String``` | Account ID | | +| `email_address` | ```String``` | Email address | | + diff --git a/sdks/ruby/docs/FaxLineResponse.md b/sdks/ruby/docs/FaxLineResponse.md new file mode 100644 index 000000000..bd3fce74d --- /dev/null +++ b/sdks/ruby/docs/FaxLineResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::FaxLineResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_line` | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + diff --git a/sdks/ruby/docs/FaxLineResponseFaxLine.md b/sdks/ruby/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..03d2a1d95 --- /dev/null +++ b/sdks/ruby/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,13 @@ +# Dropbox::Sign::FaxLineResponseFaxLine + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `number` | ```String``` | Number | | +| `created_at` | ```Integer``` | Created at | | +| `updated_at` | ```Integer``` | Updated at | | +| `accounts` | [```Array```](AccountResponse.md) | | | + diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 9e790e34b..91fce4a10 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -51,6 +51,17 @@ require 'dropbox-sign/models/event_callback_request' require 'dropbox-sign/models/event_callback_request_event' require 'dropbox-sign/models/event_callback_request_event_metadata' +require 'dropbox-sign/models/fax_line_add_user_request' +require 'dropbox-sign/models/fax_line_area_code_get_country_enum' +require 'dropbox-sign/models/fax_line_area_code_get_province_enum' +require 'dropbox-sign/models/fax_line_area_code_get_response' +require 'dropbox-sign/models/fax_line_area_code_get_state_enum' +require 'dropbox-sign/models/fax_line_create_request' +require 'dropbox-sign/models/fax_line_delete_request' +require 'dropbox-sign/models/fax_line_list_response' +require 'dropbox-sign/models/fax_line_remove_user_request' +require 'dropbox-sign/models/fax_line_response' +require 'dropbox-sign/models/fax_line_response_fax_line' require 'dropbox-sign/models/file_response' require 'dropbox-sign/models/file_response_data_uri' require 'dropbox-sign/models/list_info_response' @@ -195,6 +206,7 @@ require 'dropbox-sign/api/api_app_api' require 'dropbox-sign/api/bulk_send_job_api' require 'dropbox-sign/api/embedded_api' +require 'dropbox-sign/api/fax_line_api' require 'dropbox-sign/api/o_auth_api' require 'dropbox-sign/api/report_api' require 'dropbox-sign/api/signature_request_api' diff --git a/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb b/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb new file mode 100644 index 000000000..5eac1b2ad --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb @@ -0,0 +1,746 @@ +=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.7.0 + +=end + +require 'cgi' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Add Fax Line User + # Grants a user access to the specified Fax Line. + # @param fax_line_add_user_request [FaxLineAddUserRequest] + # @param [Hash] opts the optional parameters + # @return [FaxLineResponse] + def fax_line_add_user(fax_line_add_user_request, opts = {}) + data, _status_code, _headers = fax_line_add_user_with_http_info(fax_line_add_user_request, opts) + data + end + + # Add Fax Line User + # Grants a user access to the specified Fax Line. + # @param fax_line_add_user_request [FaxLineAddUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers + def fax_line_add_user_with_http_info(fax_line_add_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_add_user ...' + end + # verify the required parameter 'fax_line_add_user_request' is set + if @api_client.config.client_side_validation && fax_line_add_user_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_line_add_user_request' when calling FaxLineApi.fax_line_add_user" + end + # resource path + local_var_path = '/fax_line/add_user' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # 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( + fax_line_add_user_request, + Dropbox::Sign::FaxLineAddUserRequest.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] || 'FaxLineResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_add_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxLineResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_add_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Available Fax Line Area Codes + # Returns a response with the area codes available for a given state/provice and city. + # @param country [String] Filter area codes by country. + # @param [Hash] opts the optional parameters + # @option opts [String] :state Filter area codes by state. + # @option opts [String] :province Filter area codes by province. + # @option opts [String] :city Filter area codes by city. + # @return [FaxLineAreaCodeGetResponse] + def fax_line_area_code_get(country, opts = {}) + data, _status_code, _headers = fax_line_area_code_get_with_http_info(country, opts) + data + end + + # Get Available Fax Line Area Codes + # Returns a response with the area codes available for a given state/provice and city. + # @param country [String] Filter area codes by country. + # @param [Hash] opts the optional parameters + # @option opts [String] :state Filter area codes by state. + # @option opts [String] :province Filter area codes by province. + # @option opts [String] :city Filter area codes by city. + # @return [Array<(FaxLineAreaCodeGetResponse, Integer, Hash)>] FaxLineAreaCodeGetResponse data, response status code and response headers + def fax_line_area_code_get_with_http_info(country, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_area_code_get ...' + end + # verify the required parameter 'country' is set + if @api_client.config.client_side_validation && country.nil? + fail ArgumentError, "Missing the required parameter 'country' when calling FaxLineApi.fax_line_area_code_get" + end + # verify enum value + allowable_values = ["CA", "US", "UK"] + if @api_client.config.client_side_validation && !allowable_values.include?(country) + fail ArgumentError, "invalid value for \"country\", must be one of #{allowable_values}" + end + allowable_values = ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY"] + if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state']) + fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}" + end + allowable_values = ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"] + if @api_client.config.client_side_validation && opts[:'province'] && !allowable_values.include?(opts[:'province']) + fail ArgumentError, "invalid value for \"province\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/fax_line/area_codes' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'country'] = country + query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? + query_params[:'province'] = opts[:'province'] if !opts[:'province'].nil? + query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxLineAreaCodeGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_area_code_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::FaxLineAreaCodeGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_area_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Purchase Fax Line + # Purchases a new Fax Line. + # @param fax_line_create_request [FaxLineCreateRequest] + # @param [Hash] opts the optional parameters + # @return [FaxLineResponse] + def fax_line_create(fax_line_create_request, opts = {}) + data, _status_code, _headers = fax_line_create_with_http_info(fax_line_create_request, opts) + data + end + + # Purchase Fax Line + # Purchases a new Fax Line. + # @param fax_line_create_request [FaxLineCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers + def fax_line_create_with_http_info(fax_line_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_create ...' + end + # verify the required parameter 'fax_line_create_request' is set + if @api_client.config.client_side_validation && fax_line_create_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_line_create_request' when calling FaxLineApi.fax_line_create" + end + # resource path + local_var_path = '/fax_line/create' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # 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( + fax_line_create_request, + Dropbox::Sign::FaxLineCreateRequest.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] || 'FaxLineResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_create", + :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::FaxLineResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Fax Line + # Deletes the specified Fax Line from the subscription. + # @param fax_line_delete_request [FaxLineDeleteRequest] + # @param [Hash] opts the optional parameters + # @return [nil] + def fax_line_delete(fax_line_delete_request, opts = {}) + fax_line_delete_with_http_info(fax_line_delete_request, opts) + nil + end + + # Delete Fax Line + # Deletes the specified Fax Line from the subscription. + # @param fax_line_delete_request [FaxLineDeleteRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def fax_line_delete_with_http_info(fax_line_delete_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_delete ...' + end + # verify the required parameter 'fax_line_delete_request' is set + if @api_client.config.client_side_validation && fax_line_delete_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_line_delete_request' when calling FaxLineApi.fax_line_delete" + end + # resource path + local_var_path = '/fax_line' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # 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( + fax_line_delete_request, + Dropbox::Sign::FaxLineDeleteRequest.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] + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_delete", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Fax Line + # Returns the properties and settings of a Fax Line. + # @param number [String] The Fax Line number. + # @param [Hash] opts the optional parameters + # @return [FaxLineResponse] + def fax_line_get(number, opts = {}) + data, _status_code, _headers = fax_line_get_with_http_info(number, opts) + data + end + + # Get Fax Line + # Returns the properties and settings of a Fax Line. + # @param number [String] The Fax Line number. + # @param [Hash] opts the optional parameters + # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers + def fax_line_get_with_http_info(number, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_get ...' + end + # verify the required parameter 'number' is set + if @api_client.config.client_side_validation && number.nil? + fail ArgumentError, "Missing the required parameter 'number' when calling FaxLineApi.fax_line_get" + end + # resource path + local_var_path = '/fax_line' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'number'] = number + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxLineResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_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::FaxLineResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Fax Lines + # Returns the properties and settings of multiple Fax Lines. + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Account ID + # @option opts [Integer] :page Page (default to 1) + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Boolean] :show_team_lines Show team lines + # @return [FaxLineListResponse] + def fax_line_list(opts = {}) + data, _status_code, _headers = fax_line_list_with_http_info(opts) + data + end + + # List Fax Lines + # Returns the properties and settings of multiple Fax Lines. + # @param [Hash] opts the optional parameters + # @option opts [String] :account_id Account ID + # @option opts [Integer] :page Page (default to 1) + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Boolean] :show_team_lines Show team lines + # @return [Array<(FaxLineListResponse, Integer, Hash)>] FaxLineListResponse data, response status code and response headers + def fax_line_list_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_list ...' + end + # resource path + local_var_path = '/fax_line/list' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'show_team_lines'] = opts[:'show_team_lines'] if !opts[:'show_team_lines'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxLineListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_list", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxLineListResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove Fax Line Access + # Removes a user's access to the specified Fax Line. + # @param fax_line_remove_user_request [FaxLineRemoveUserRequest] + # @param [Hash] opts the optional parameters + # @return [FaxLineResponse] + def fax_line_remove_user(fax_line_remove_user_request, opts = {}) + data, _status_code, _headers = fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts) + data + end + + # Remove Fax Line Access + # Removes a user's access to the specified Fax Line. + # @param fax_line_remove_user_request [FaxLineRemoveUserRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers + def fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_remove_user ...' + end + # verify the required parameter 'fax_line_remove_user_request' is set + if @api_client.config.client_side_validation && fax_line_remove_user_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_line_remove_user_request' when calling FaxLineApi.fax_line_remove_user" + end + # resource path + local_var_path = '/fax_line/remove_user' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # 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( + fax_line_remove_user_request, + Dropbox::Sign::FaxLineRemoveUserRequest.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] || 'FaxLineResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxLineApi.fax_line_remove_user", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxLineResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxLineApi#fax_line_remove_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb new file mode 100644 index 000000000..ffbc66ca0 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb @@ -0,0 +1,276 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineAddUserRequest + # The Fax Line number. + # @return [String] + attr_accessor :number + + # Account ID + # @return [String] + attr_accessor :account_id + + # Email address + # @return [String] + attr_accessor :email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'account_id' => :'account_id', + :'email_address' => :'email_address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'account_id' => :'String', + :'email_address' => :'String' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineAddUserRequest] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineAddUserRequest" + ) || FaxLineAddUserRequest.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::FaxLineAddUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAddUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + 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 @number.nil? + invalid_properties.push('invalid value for "number", number 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 @number.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + account_id == o.account_id && + email_address == o.email_address + 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 + [number, account_id, email_address].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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb new file mode 100644 index 000000000..cc8194087 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineAreaCodeGetCountryEnum + CA = "CA".freeze + US = "US".freeze + UK = "UK".freeze + + def self.all_vars + @all_vars ||= [CA, US, UK].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 FaxLineAreaCodeGetCountryEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #FaxLineAreaCodeGetCountryEnum" + end + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb new file mode 100644 index 000000000..c5325e731 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb @@ -0,0 +1,55 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineAreaCodeGetProvinceEnum + AB = "AB".freeze + BC = "BC".freeze + MB = "MB".freeze + NB = "NB".freeze + NL = "NL".freeze + NT = "NT".freeze + NS = "NS".freeze + NU = "NU".freeze + ON = "ON".freeze + PE = "PE".freeze + QC = "QC".freeze + SK = "SK".freeze + YT = "YT".freeze + + def self.all_vars + @all_vars ||= [AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT].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 FaxLineAreaCodeGetProvinceEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #FaxLineAreaCodeGetProvinceEnum" + end + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb new file mode 100644 index 000000000..ee8304034 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb @@ -0,0 +1,250 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineAreaCodeGetResponse + # @return [Array] + attr_accessor :area_codes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'area_codes' => :'area_codes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'area_codes' => :'Array' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineAreaCodeGetResponse] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineAreaCodeGetResponse" + ) || FaxLineAreaCodeGetResponse.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::FaxLineAreaCodeGetResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAreaCodeGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'area_codes') + if (value = attributes[:'area_codes']).is_a?(Array) + self.area_codes = 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 && + area_codes == o.area_codes + 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 + [area_codes].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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb new file mode 100644 index 000000000..e48a2d074 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb @@ -0,0 +1,93 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineAreaCodeGetStateEnum + AK = "AK".freeze + AL = "AL".freeze + AR = "AR".freeze + AZ = "AZ".freeze + CA = "CA".freeze + CO = "CO".freeze + CT = "CT".freeze + DC = "DC".freeze + DE = "DE".freeze + FL = "FL".freeze + GA = "GA".freeze + HI = "HI".freeze + IA = "IA".freeze + ID = "ID".freeze + IL = "IL".freeze + IN = "IN".freeze + KS = "KS".freeze + KY = "KY".freeze + LA = "LA".freeze + MA = "MA".freeze + MD = "MD".freeze + ME = "ME".freeze + MI = "MI".freeze + MN = "MN".freeze + MO = "MO".freeze + MS = "MS".freeze + MT = "MT".freeze + NC = "NC".freeze + ND = "ND".freeze + NE = "NE".freeze + NH = "NH".freeze + NJ = "NJ".freeze + NM = "NM".freeze + NV = "NV".freeze + NY = "NY".freeze + OH = "OH".freeze + OK = "OK".freeze + OR = "OR".freeze + PA = "PA".freeze + RI = "RI".freeze + SC = "SC".freeze + SD = "SD".freeze + TN = "TN".freeze + TX = "TX".freeze + UT = "UT".freeze + VA = "VA".freeze + VT = "VT".freeze + WA = "WA".freeze + WI = "WI".freeze + WV = "WV".freeze + WY = "WY".freeze + + def self.all_vars + @all_vars ||= [AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY].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 FaxLineAreaCodeGetStateEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #FaxLineAreaCodeGetStateEnum" + end + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb new file mode 100644 index 000000000..e4c200b11 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb @@ -0,0 +1,326 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineCreateRequest + # Area code + # @return [Integer] + attr_accessor :area_code + + # Country + # @return [String] + attr_accessor :country + + # City + # @return [String] + attr_accessor :city + + # Account ID + # @return [String] + attr_accessor :account_id + + 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 + { + :'area_code' => :'area_code', + :'country' => :'country', + :'city' => :'city', + :'account_id' => :'account_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'area_code' => :'Integer', + :'country' => :'String', + :'city' => :'String', + :'account_id' => :'String' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineCreateRequest] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineCreateRequest" + ) || FaxLineCreateRequest.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::FaxLineCreateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'area_code') + self.area_code = attributes[:'area_code'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + 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 @area_code.nil? + invalid_properties.push('invalid value for "area_code", area_code cannot be nil.') + end + + if @country.nil? + invalid_properties.push('invalid value for "country", country 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 @area_code.nil? + return false if @country.nil? + country_validator = EnumAttributeValidator.new('String', ["CA", "US", "UK"]) + return false unless country_validator.valid?(@country) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] country Object to be assigned + def country=(country) + validator = EnumAttributeValidator.new('String', ["CA", "US", "UK"]) + unless validator.valid?(country) + fail ArgumentError, "invalid value for \"country\", must be one of #{validator.allowable_values}." + end + @country = country + 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 && + area_code == o.area_code && + country == o.country && + city == o.city && + account_id == o.account_id + 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 + [area_code, country, city, account_id].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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb new file mode 100644 index 000000000..9faa9dd97 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb @@ -0,0 +1,254 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineDeleteRequest + # The Fax Line number. + # @return [String] + attr_accessor :number + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineDeleteRequest] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineDeleteRequest" + ) || FaxLineDeleteRequest.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::FaxLineDeleteRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + 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 @number.nil? + invalid_properties.push('invalid value for "number", number 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 @number.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number + 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 + [number].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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb new file mode 100644 index 000000000..096e0eb54 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb @@ -0,0 +1,270 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineListResponse + # @return [ListInfoResponse] + attr_accessor :list_info + + # @return [Array] + attr_accessor :fax_lines + + # @return [WarningResponse] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'list_info' => :'list_info', + :'fax_lines' => :'fax_lines', + :'warnings' => :'warnings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'list_info' => :'ListInfoResponse', + :'fax_lines' => :'Array', + :'warnings' => :'WarningResponse' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineListResponse] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineListResponse" + ) || FaxLineListResponse.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::FaxLineListResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'list_info') + self.list_info = attributes[:'list_info'] + end + + if attributes.key?(:'fax_lines') + if (value = attributes[:'fax_lines']).is_a?(Array) + self.fax_lines = value + end + end + + if attributes.key?(:'warnings') + self.warnings = attributes[:'warnings'] + 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 && + list_info == o.list_info && + fax_lines == o.fax_lines && + 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 + [list_info, fax_lines, 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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb new file mode 100644 index 000000000..99cf104fa --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb @@ -0,0 +1,276 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineRemoveUserRequest + # The Fax Line number. + # @return [String] + attr_accessor :number + + # Account ID + # @return [String] + attr_accessor :account_id + + # Email address + # @return [String] + attr_accessor :email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'account_id' => :'account_id', + :'email_address' => :'email_address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'account_id' => :'String', + :'email_address' => :'String' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineRemoveUserRequest] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineRemoveUserRequest" + ) || FaxLineRemoveUserRequest.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::FaxLineRemoveUserRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineRemoveUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + 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 @number.nil? + invalid_properties.push('invalid value for "number", number 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 @number.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + account_id == o.account_id && + email_address == o.email_address + 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 + [number, account_id, email_address].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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb new file mode 100644 index 000000000..4406a4e9a --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb @@ -0,0 +1,258 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineResponse + # @return [FaxLineResponseFaxLine] + attr_accessor :fax_line + + # @return [WarningResponse] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax_line' => :'fax_line', + :'warnings' => :'warnings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax_line' => :'FaxLineResponseFaxLine', + :'warnings' => :'WarningResponse' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineResponse] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineResponse" + ) || FaxLineResponse.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::FaxLineResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fax_line') + self.fax_line = attributes[:'fax_line'] + end + + if attributes.key?(:'warnings') + self.warnings = attributes[:'warnings'] + 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 && + fax_line == o.fax_line && + warnings == o.warnings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fax_line, 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 + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb new file mode 100644 index 000000000..8860c6b77 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb @@ -0,0 +1,283 @@ +=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.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxLineResponseFaxLine + # Number + # @return [String] + attr_accessor :number + + # Created at + # @return [Integer] + attr_accessor :created_at + + # Updated at + # @return [Integer] + attr_accessor :updated_at + + # @return [Array] + attr_accessor :accounts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at', + :'accounts' => :'accounts' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'created_at' => :'Integer', + :'updated_at' => :'Integer', + :'accounts' => :'Array' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + 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 [FaxLineResponseFaxLine] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "FaxLineResponseFaxLine" + ) || FaxLineResponseFaxLine.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::FaxLineResponseFaxLine` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponseFaxLine`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = 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 && + number == o.number && + created_at == o.created_at && + updated_at == o.updated_at && + accounts == o.accounts + 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 + [number, created_at, updated_at, accounts].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 + # models (e.g. Pet) + 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 2e8cd816a..6925e38a4 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -21,6 +21,7 @@ "OpenApi::TAG::UNCLAIMED_DRAFT::DESCRIPTION": ./markdown/en/tags/unclaimed-draft-tag-description.md "OpenApi::TAG::OAUTH::DESCRIPTION": ./markdown/en/tags/oauth-tag-description.md "OpenApi::TAG::CALLBACKS_AND_EVENTS::DESCRIPTION": ./markdown/en/tags/callbacks-tag-description.md +"OpenApi::TAG::TAG_FAX_LINE::DESCRIPTION": ./markdown/en/tags/fax-lines-tag-description.md "OpenApi::ACCOUNT_CALLBACK::SUMMARY": Account Callbacks "OpenApi::ACCOUNT_CALLBACK::DESCRIPTION": ./markdown/en/descriptions/account-callback-description.md @@ -129,6 +130,47 @@ "EmbeddedSignUrl::DESCRIPTION": Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. "EmbeddedSignUrl::SIGNATURE_ID": The id of the signature to get a signature url for. +"FaxLineAddUser::SUMMARY": Add Fax Line User +"FaxLineAddUser::DESCRIPTION": Grants a user access to the specified Fax Line. +"FaxLineAddUser::NUMBER": The Fax Line number. +"FaxLineAddUser::ACCOUNT_ID": Account ID +"FaxLineAddUser::EMAIL_ADDRESS": Email address +"FaxLineAreaCodeGet::SUMMARY": Get Available Fax Line Area Codes +"FaxLineAreaCodeGet::DESCRIPTION": Returns a response with the area codes available for a given state/provice and city. +"FaxLineAreaCodeGet::CITY": Filter area codes by city. +"FaxLineAreaCodeGet::STATE": Filter area codes by state. +"FaxLineAreaCodeGet::PROVINCE": Filter area codes by province. +"FaxLineAreaCodeGet::COUNTRY": Filter area codes by country. +"FaxLineCreate::SUMMARY": Purchase Fax Line +"FaxLineCreate::DESCRIPTION": Purchases a new Fax Line. +"FaxLineDelete::SUMMARY": Delete Fax Line +"FaxLineDelete::DESCRIPTION": Deletes the specified Fax Line from the subscription. +"FaxLineGet::SUMMARY": Get Fax Line +"FaxLineGet::DESCRIPTION": Returns the properties and settings of a Fax Line. +"FaxLineGet::NUMBER": The Fax Line number. +"FaxLineList::SUMMARY": List Fax Lines +"FaxLineList::DESCRIPTION": Returns the properties and settings of multiple Fax Lines. +"FaxLineList::ACCOUNT_ID": Account ID +"FaxLineList::PAGE": Page +"FaxLineList::PAGE_SIZE": Page size +"FaxLineList::SHOW_TEAM_LINES": Show team lines +"FaxLineRemoveUser::SUMMARY": Remove Fax Line Access +"FaxLineRemoveUser::DESCRIPTION": Removes a user's access to the specified Fax Line. +"FaxLineRemoveUser::NUMBER": The Fax Line number. +"FaxLineRemoveUser::ACCOUNT_ID": Account ID +"FaxLineRemoveUser::EMAIL_ADDRESS": Email address +"FaxLineCreate::AREA_CODE": Area code +"FaxLineCreate::CITY": City +"FaxLineCreate::COUNTRY": Country +"FaxLineCreate::ACCOUNT_ID": Account ID +"FaxLineDelete::NUMBER": The Fax Line number. +"FaxLineResponseExample::SUMMARY": Sample Fax Line Response +"FaxLineAreaCodeGetResponseExample::SUMMARY": Sample Area Code Response +"FaxLineListResponseExample::SUMMARY": Sample Fax Line List Response +"FaxLineResponseFaxLine::NUMBER": Number +"FaxLineResponseFaxLine::CREATED_AT": Created at +"FaxLineResponseFaxLine::UPDATED_AT": Updated at + "OAuthTokenGenerate::SUMMARY": OAuth Token Generate "OAuthTokenGenerate::DESCRIPTION": Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. "OAuthTokenGenerate::CLIENT_ID": The client id of the app requesting authorization. @@ -1617,6 +1659,20 @@ "EmbeddedEditUrl::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a template url, click here." "EmbeddedSignUrl::SEO::TITLE": "Get Embedded Sign URL | iFrame | Dropbox Sign for Developers" "EmbeddedSignUrl::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here." +"FaxLineAddUser::SEO::TITLE": "Fax Line Add User | API Documentation | Dropbox Fax for Developers" +"FaxLineAddUser::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to add a user to an existing fax line, click here." +"FaxLineAreaCodeGet::SEO::TITLE": "Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers" +"FaxLineAreaCodeGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here." +"FaxLineCreate::SEO::TITLE": "Purchase Fax Line | API Documentation | Dropbox Fax for Developers" +"FaxLineCreate::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here." +"FaxLineDelete::SEO::TITLE": "Delete Fax Line | API Documentation | Dropbox Fax for Developers" +"FaxLineDelete::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here." +"FaxLineGet::SEO::TITLE": "Get Fax Line | API Documentation | Dropbox Fax for Developers" +"FaxLineGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here." +"FaxLineList::SEO::TITLE": "List Fax Lines | API Documentation | Dropbox Fax for Developers" +"FaxLineList::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here." +"FaxLineRemoveUser::SEO::TITLE": "Fax Line Remove User | API Documentation | Dropbox Fax for Developers" +"FaxLineRemoveUser::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here." "OAuthTokenGenerate::SEO::TITLE": "Generate OAuth Token | Documentation | Dropbox Sign for Developers" "OAuthTokenGenerate::SEO::DESCRIPTION": "The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to generate a new OAuth token with the API, click here." "OAuthTokenRefresh::SEO::TITLE": "OAuth Token Refresh | Documentation | Dropbox Sign for Developers"