diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index a4f54be..1046c5f 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -19,6 +19,9 @@ jobs: - name: Build SDK run: ./run-build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status diff --git a/README.md b/README.md index 3fbc810..4991dc4 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ directory that corresponds to the file you want updated. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- SDK version: 1.6.1 +- SDK version: 1.7.0 - Generator version: 7.8.0 - Build package: org.openapitools.codegen.languages.CSharpClientCodegen @@ -141,6 +141,11 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**BulkSendJobList**](docs/BulkSendJobApi.md#bulksendjoblist) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**EmbeddedEditUrl**](docs/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**EmbeddedSignUrl**](docs/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxApi* | [**FaxDelete**](docs/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax +*FaxApi* | [**FaxFiles**](docs/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files +*FaxApi* | [**FaxGet**](docs/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax +*FaxApi* | [**FaxList**](docs/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes +*FaxApi* | [**FaxSend**](docs/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax *FaxLineApi* | [**FaxLineAddUser**](docs/FaxLineApi.md#faxlineadduser) | **PUT** /fax_line/add_user | Add Fax Line User *FaxLineApi* | [**FaxLineAreaCodeGet**](docs/FaxLineApi.md#faxlineareacodeget) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes *FaxLineApi* | [**FaxLineCreate**](docs/FaxLineApi.md#faxlinecreate) | **POST** /fax_line/create | Purchase Fax Line @@ -178,7 +183,7 @@ Class | Method | HTTP request | Description *TeamApi* | [**TeamSubTeams**](docs/TeamApi.md#teamsubteams) | **GET** /team/sub_teams/{team_id} | List Sub Teams *TeamApi* | [**TeamUpdate**](docs/TeamApi.md#teamupdate) | **PUT** /team | Update Team *TemplateApi* | [**TemplateAddUser**](docs/TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**TemplateCreate**](docs/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template +*TemplateApi* | [**TemplateCreate**](docs/TemplateApi.md#templatecreate) | **POST** /template/create | Create Template *TemplateApi* | [**TemplateCreateEmbeddedDraft**](docs/TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft *TemplateApi* | [**TemplateDelete**](docs/TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template *TemplateApi* | [**TemplateFiles**](docs/TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files @@ -231,6 +236,7 @@ Class | Method | HTTP request | Description - [Model.EventCallbackRequest](docs/EventCallbackRequest.md) - [Model.EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Model.EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Model.FaxGetResponse](docs/FaxGetResponse.md) - [Model.FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [Model.FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [Model.FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -242,6 +248,10 @@ Class | Method | HTTP request | Description - [Model.FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [Model.FaxLineResponse](docs/FaxLineResponse.md) - [Model.FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [Model.FaxListResponse](docs/FaxListResponse.md) + - [Model.FaxResponse](docs/FaxResponse.md) + - [Model.FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [Model.FaxSendRequest](docs/FaxSendRequest.md) - [Model.FileResponse](docs/FileResponse.md) - [Model.FileResponseDataUri](docs/FileResponseDataUri.md) - [Model.ListInfoResponse](docs/ListInfoResponse.md) diff --git a/VERSION b/VERSION index 9c6d629..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.7.0 diff --git a/docs/AccountResponseQuotas.md b/docs/AccountResponseQuotas.md index 2e12ea8..8fc9dcf 100644 --- a/docs/AccountResponseQuotas.md +++ b/docs/AccountResponseQuotas.md @@ -5,7 +5,7 @@ Details concerning remaining monthly quotas. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] **DocumentsLeft** | **int?** | Signature requests remaining. | [optional] **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] **NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] +**ApiSignatureRequestsLeft** | **int?** | API signature requests remaining. | [optional] **DocumentsLeft** | **int?** | Signature requests remaining. | [optional] **TemplatesTotal** | **int?** | Total API templates allowed. | [optional] **TemplatesLeft** | **int?** | API templates remaining. | [optional] **SmsVerificationsLeft** | **int?** | SMS verifications remaining. | [optional] **NumFaxPagesLeft** | **int?** | Number of fax pages left | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FaxApi.md b/docs/FaxApi.md new file mode 100644 index 0000000..303d4ef --- /dev/null +++ b/docs/FaxApi.md @@ -0,0 +1,489 @@ +# Dropbox.Sign.Api.FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**FaxDelete**](FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | +| [**FaxFiles**](FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| [**FaxGet**](FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | +| [**FaxList**](FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | +| [**FaxSend**](FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | + + +# **FaxDelete** +> void FaxDelete (string faxId) + +Delete Fax + +Deletes the specified Fax from the system. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + try + { + faxApi.FaxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxDeleteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete Fax + apiInstance.FaxDeleteWithHttpInfo(faxId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxDeleteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxFiles** +> System.IO.Stream FaxFiles (string faxId) + +List Fax Files + +Returns list of fax files + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try + { + var result = faxApi.FaxFiles(faxId); + var fileStream = File.Create("file_response.pdf"); + result.Seek(0, SeekOrigin.Begin); + result.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxFilesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Fax Files + ApiResponse response = apiInstance.FaxFilesWithHttpInfo(faxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxFilesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +**System.IO.Stream** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/pdf, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxGet** +> FaxGetResponse FaxGet (string faxId) + +Get Fax + +Returns information about fax + +### Example +```csharp +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try + { + var result = faxApi.FaxGet(faxId); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxGetWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Fax + ApiResponse response = apiInstance.FaxGetWithHttpInfo(faxId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxGetWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxId** | **string** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxList** +> FaxListResponse FaxList (int? page = null, int? pageSize = null) + +Lists Faxes + +Returns properties of multiple faxes + +### Example +```csharp +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var page = 1; + var pageSize = 2; + + try + { + var result = faxApi.FaxList(page, pageSize); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxListWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Lists Faxes + ApiResponse response = apiInstance.FaxListWithHttpInfo(page, pageSize); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxListWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **page** | **int?** | Page | [optional] [default to 1] | +| **pageSize** | **int?** | Page size | [optional] [default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FaxSend** +> FaxGetResponse FaxSend (FaxSendRequest faxSendRequest) + +Send Fax + +Action to prepare and send a fax + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var files = new List { + new FileStream( + "./example_fax.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new FaxSendRequest( + files: files, + testMode: true, + recipient: "16690000001", + sender: "16690000000", + coverPageTo: "Jill Fax", + coverPageMessage: "I'm sending you a fax!", + coverPageFrom: "Faxer Faxerson", + title: "This is what the fax is about!", + ); + + try + { + var result = faxApi.FaxSend(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the FaxSendWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send Fax + ApiResponse response = apiInstance.FaxSendWithHttpInfo(faxSendRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling FaxApi.FaxSendWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FaxGetResponse.md b/docs/FaxGetResponse.md new file mode 100644 index 0000000..42b82e1 --- /dev/null +++ b/docs/FaxGetResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | [**FaxResponse**](FaxResponse.md) | | **Warnings** | [**List<WarningResponse>**](WarningResponse.md) | A list of warnings. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxListResponse.md b/docs/FaxListResponse.md new file mode 100644 index 0000000..1cea114 --- /dev/null +++ b/docs/FaxListResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Faxes** | [**List<FaxResponse>**](FaxResponse.md) | | **ListInfo** | [**ListInfoResponse**](ListInfoResponse.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxResponse.md b/docs/FaxResponse.md new file mode 100644 index 0000000..27a0614 --- /dev/null +++ b/docs/FaxResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FaxId** | **string** | Fax ID | **Title** | **string** | Fax Title | **OriginalTitle** | **string** | Fax Original Title | **Subject** | **string** | Fax Subject | **Message** | **string** | Fax Message | **Metadata** | **Dictionary<string, Object>** | Fax Metadata | **CreatedAt** | **int** | Fax Created At Timestamp | **Sender** | **string** | Fax Sender Email | **Transmissions** | [**List<FaxResponseTransmission>**](FaxResponseTransmission.md) | Fax Transmissions List | **FilesUrl** | **string** | Fax Files URL | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxResponseTransmission.md b/docs/FaxResponseTransmission.md new file mode 100644 index 0000000..c306b85 --- /dev/null +++ b/docs/FaxResponseTransmission.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxResponseTransmission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipient** | **string** | Fax Transmission Recipient | **Sender** | **string** | Fax Transmission Sender | **StatusCode** | **string** | Fax Transmission Status Code | **SentAt** | **int** | Fax Transmission Sent Timestamp | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FaxSendRequest.md b/docs/FaxSendRequest.md new file mode 100644 index 0000000..b02d7f0 --- /dev/null +++ b/docs/FaxSendRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.FaxSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipient** | **string** | Fax Send To Recipient | **Sender** | **string** | Fax Send From Sender (used only with fax number) | [optional] **Files** | **List<System.IO.Stream>** | Fax File to Send | [optional] **FileUrls** | **List<string>** | Fax File URL to Send | [optional] **TestMode** | **bool** | API Test Mode Setting | [optional] [default to false]**CoverPageTo** | **string** | Fax Cover Page for Recipient | [optional] **CoverPageFrom** | **string** | Fax Cover Page for Sender | [optional] **CoverPageMessage** | **string** | Fax Cover Page Message | [optional] **Title** | **string** | Fax Title | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index 5af9123..c80ee27 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -99,6 +99,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -191,6 +192,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md index c9866d3..5e33e77 100644 --- a/docs/OAuthTokenRefreshRequest.md +++ b/docs/OAuthTokenRefreshRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"]**RefreshToken** | **string** | The token provided when you got the expired access token. | +**GrantType** | **string** | When refreshing an existing token use `refresh_token`. | [default to "refresh_token"]**RefreshToken** | **string** | The token provided when you got the expired access token. | **ClientId** | **string** | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | [optional] **ClientSecret** | **string** | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index c411d0c..a507cc0 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -312,7 +312,7 @@ catch (ApiException e) Cancel Incomplete Signature Request -Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. +Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. ### Example ```csharp diff --git a/docs/SubWhiteLabelingOptions.md b/docs/SubWhiteLabelingOptions.md index 930a345..1634a1a 100644 --- a/docs/SubWhiteLabelingOptions.md +++ b/docs/SubWhiteLabelingOptions.md @@ -5,7 +5,7 @@ An array of elements and values serialized to a string, to be used to customize Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HeaderBackgroundColor** | **string** | | [optional] [default to "#1A1A1A"]**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1]**LinkColor** | **string** | | [optional] [default to "#00B3E6"]**PageBackgroundColor** | **string** | | [optional] [default to "#F7F8F9"]**PrimaryButtonColor** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonColorHover** | **string** | | [optional] [default to "#00B3E6"]**PrimaryButtonTextColor** | **string** | | [optional] [default to "#FFFFFF"]**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColor** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonColorHover** | **string** | | [optional] [default to "#FFFFFF"]**SecondaryButtonTextColor** | **string** | | [optional] [default to "#00B3E6"]**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#00B3E6"]**TextColor1** | **string** | | [optional] [default to "#808080"]**TextColor2** | **string** | | [optional] [default to "#FFFFFF"]**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [optional] +**HeaderBackgroundColor** | **string** | | [optional] [default to "#1a1a1a"]**LegalVersion** | **string** | | [optional] [default to LegalVersionEnum.Terms1]**LinkColor** | **string** | | [optional] [default to "#0061FE"]**PageBackgroundColor** | **string** | | [optional] [default to "#f7f8f9"]**PrimaryButtonColor** | **string** | | [optional] [default to "#0061FE"]**PrimaryButtonColorHover** | **string** | | [optional] [default to "#0061FE"]**PrimaryButtonTextColor** | **string** | | [optional] [default to "#ffffff"]**PrimaryButtonTextColorHover** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonColor** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonColorHover** | **string** | | [optional] [default to "#ffffff"]**SecondaryButtonTextColor** | **string** | | [optional] [default to "#0061FE"]**SecondaryButtonTextColorHover** | **string** | | [optional] [default to "#0061FE"]**TextColor1** | **string** | | [optional] [default to "#808080"]**TextColor2** | **string** | | [optional] [default to "#ffffff"]**ResetToDefault** | **bool** | Resets white labeling options to defaults. Only useful when updating an API App. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index d7f4c3b..c51decd 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | |--------|--------------|-------------| | [**TemplateAddUser**](TemplateApi.md#templateadduser) | **POST** /template/add_user/{template_id} | Add User to Template | -| [**TemplateCreate**](TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | +| [**TemplateCreate**](TemplateApi.md#templatecreate) | **POST** /template/create | Create Template | | [**TemplateCreateEmbeddedDraft**](TemplateApi.md#templatecreateembeddeddraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | | [**TemplateDelete**](TemplateApi.md#templatedelete) | **POST** /template/delete/{template_id} | Delete Template | | [**TemplateFiles**](TemplateApi.md#templatefiles) | **GET** /template/files/{template_id} | Get Template Files | @@ -120,7 +120,7 @@ catch (ApiException e) # **TemplateCreate** > TemplateCreateResponse TemplateCreate (TemplateCreateRequest templateCreateRequest) -Create Template +Create Template Creates a template that can then be used. @@ -214,7 +214,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - // Create Template + // Create Template ApiResponse response = apiInstance.TemplateCreateWithHttpInfo(templateCreateRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); diff --git a/docs/TemplateResponse.md b/docs/TemplateResponse.md index ce17e37..ded2dee 100644 --- a/docs/TemplateResponse.md +++ b/docs/TemplateResponse.md @@ -5,7 +5,7 @@ Contains information about the templates you and your team have created. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TemplateId** | **string** | The id of the Template. | [optional] **Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **UpdatedAt** | **int** | Time the template was last updated. | [optional] **IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. | [optional] **IsCreator** | **bool?** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] **CanEdit** | **bool?** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] **IsLocked** | **bool?** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] **Metadata** | **Object** | The metadata attached to the template. | [optional] **SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] **Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] +**TemplateId** | **string** | The id of the Template. | [optional] **Title** | **string** | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **Message** | **string** | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | [optional] **UpdatedAt** | **int** | Time the template was last updated. | [optional] **IsEmbedded** | **bool?** | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | [optional] **IsCreator** | **bool** | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | [optional] **CanEdit** | **bool** | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | [optional] **IsLocked** | **bool** | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | [optional] **Metadata** | **Object** | The metadata attached to the template. | [optional] **SignerRoles** | [**List<TemplateResponseSignerRole>**](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | [optional] **CcRoles** | [**List<TemplateResponseCCRole>**](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | [optional] **Documents** | [**List<TemplateResponseDocument>**](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | [optional] **CustomFields** | [**List<TemplateResponseDocumentCustomFieldBase>**](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **NamedFormFields** | [**List<TemplateResponseDocumentFormFieldBase>**](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | [optional] **Accounts** | [**List<TemplateResponseAccount>**](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldBase.md b/docs/TemplateResponseDocumentFormFieldBase.md index 0e941c7..191f73c 100644 --- a/docs/TemplateResponseDocumentFormFieldBase.md +++ b/docs/TemplateResponseDocumentFormFieldBase.md @@ -5,7 +5,7 @@ An array of Form Field objects containing the name and type of each named field. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | **ApiId** | **string** | A unique id for the form field. | [optional] **Name** | **string** | The name of the form field. | [optional] **Signer** | **string** | The signer of the Form Field. | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] +**Type** | **string** | | **ApiId** | **string** | A unique id for the form field. | [optional] **Name** | **string** | The name of the form field. | [optional] **Signer** | **string** | The signer of the Form Field. | [optional] **X** | **int** | The horizontal offset in pixels for this form field. | [optional] **Y** | **int** | The vertical offset in pixels for this form field. | [optional] **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TemplateResponseDocumentFormFieldCheckbox.md b/docs/TemplateResponseDocumentFormFieldCheckbox.md index 45636fa..4a94b37 100644 --- a/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -13,8 +13,7 @@ Name | Type | Description | Notes **Width** | **int** | The width in pixels of this form field. | [optional] **Height** | **int** | The height in pixels of this form field. | [optional] **Required** | **bool** | Boolean showing whether or not this field is required. | [optional] -**Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] -**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] +**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field's text. | [optional] **FontFamily** | **string** | Font family used in this form field's text. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/examples/FaxDelete.cs b/examples/FaxDelete.cs new file mode 100644 index 0000000..88a6ed0 --- /dev/null +++ b/examples/FaxDelete.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + try + { + faxApi.FaxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxFiles.cs b/examples/FaxFiles.cs new file mode 100644 index 0000000..fbaf416 --- /dev/null +++ b/examples/FaxFiles.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try + { + var result = faxApi.FaxFiles(faxId); + var fileStream = File.Create("file_response.pdf"); + result.Seek(0, SeekOrigin.Begin); + result.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxGet.cs b/examples/FaxGet.cs new file mode 100644 index 0000000..6396e0c --- /dev/null +++ b/examples/FaxGet.cs @@ -0,0 +1,31 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try + { + var result = faxApi.FaxGet(faxId); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxList.cs b/examples/FaxList.cs new file mode 100644 index 0000000..f87d9b8 --- /dev/null +++ b/examples/FaxList.cs @@ -0,0 +1,32 @@ +using System; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var page = 1; + var pageSize = 2; + + try + { + var result = faxApi.FaxList(page, pageSize); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxSend.cs b/examples/FaxSend.cs new file mode 100644 index 0000000..8e72a4f --- /dev/null +++ b/examples/FaxSend.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxApi = new FaxApi(config); + + var files = new List { + new FileStream( + "./example_fax.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new FaxSendRequest( + files: files, + testMode: true, + recipient: "16690000001", + sender: "16690000000", + coverPageTo: "Jill Fax", + coverPageMessage: "I'm sending you a fax!", + coverPageFrom: "Faxer Faxerson", + title: "This is what the fax is about!", + ); + + try + { + var result = faxApi.FaxSend(data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/openapi-config.yaml b/openapi-config.yaml index be16c6f..b3dd5d6 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -6,7 +6,7 @@ additionalProperties: packageCompany: Dropbox Sign API Team packageCopyright: Dropbox 2024 packageDescription: Client library for using the Dropbox Sign API - packageVersion: 1.6.1 + packageVersion: 1.7.0 packageTitle: Dropbox Sign .Net SDK sortModelPropertiesByRequiredFlag: true optionalEmitDefaultValues: true diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c7189fd..fe81aca 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9091,7 +9687,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9100,40 +9696,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10211,6 +10807,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10246,6 +10855,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10388,7 +11010,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10456,6 +11078,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10589,6 +11212,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10606,6 +11277,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11218,24 +11918,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11273,7 +11970,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11377,7 +12078,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11529,10 +12229,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11549,12 +12245,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11570,6 +12266,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11579,8 +12279,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11596,6 +12294,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11605,8 +12307,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11622,6 +12322,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11631,8 +12335,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11659,6 +12361,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11668,8 +12374,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11685,6 +12389,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11695,8 +12403,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11712,6 +12418,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11721,8 +12430,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11738,6 +12445,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11747,8 +12458,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11790,6 +12499,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11849,8 +12562,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11875,8 +12586,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11901,8 +12610,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11927,8 +12634,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11953,8 +12658,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11979,8 +12682,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12005,8 +12706,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12031,8 +12730,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12418,6 +13115,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12662,6 +13363,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12674,6 +13379,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/run-build b/run-build index 808568a..8a2332a 100755 --- a/run-build +++ b/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/dotnet" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/Dropbox.Sign/Api/"*.cs +rm -f "${DIR}/src/Dropbox.Sign/Model/"*.cs + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/src/Dropbox.Sign/Api/FaxApi.cs b/src/Dropbox.Sign/Api/FaxApi.cs new file mode 100644 index 0000000..b9819df --- /dev/null +++ b/src/Dropbox.Sign/Api/FaxApi.cs @@ -0,0 +1,1206 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.Sign.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// + void FaxDelete(string faxId, int operationIndex = 0); + + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse FaxDeleteWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// System.IO.Stream + System.IO.Stream FaxFiles(string faxId, int operationIndex = 0); + + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of System.IO.Stream + ApiResponse FaxFilesWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// FaxGetResponse + FaxGetResponse FaxGet(string faxId, int operationIndex = 0); + + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + ApiResponse FaxGetWithHttpInfo(string faxId, int operationIndex = 0); + /// + /// Lists Faxes + /// + /// + /// Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// FaxListResponse + FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); + + /// + /// Lists Faxes + /// + /// + /// Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// ApiResponse of FaxListResponse + ApiResponse FaxListWithHttpInfo(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxGetResponse + FaxGetResponse FaxSend(FaxSendRequest faxSendRequest, int operationIndex = 0); + + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + ApiResponse FaxSendWithHttpInfo(FaxSendRequest faxSendRequest, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task FaxDeleteAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Delete Fax + /// + /// + /// Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> FaxDeleteWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + System.Threading.Tasks.Task FaxFilesAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// List Fax Files + /// + /// + /// Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + System.Threading.Tasks.Task> FaxFilesWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + System.Threading.Tasks.Task FaxGetAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Get Fax + /// + /// + /// Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + System.Threading.Tasks.Task> FaxGetWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Lists Faxes + /// + /// + /// Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxListResponse + System.Threading.Tasks.Task FaxListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Lists Faxes + /// + /// + /// Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxListResponse) + System.Threading.Tasks.Task> FaxListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + System.Threading.Tasks.Task FaxSendAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Send Fax + /// + /// + /// Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + System.Threading.Tasks.Task> FaxSendWithHttpInfoAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFaxApi : IFaxApiSync, IFaxApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FaxApi : IFaxApi + { + private Dropbox.Sign.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FaxApi(string basePath) + { + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + new Dropbox.Sign.Client.Configuration { BasePath = basePath } + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FaxApi(Dropbox.Sign.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Dropbox.Sign.Client.Configuration.MergeConfigurations( + Dropbox.Sign.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Dropbox.Sign.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FaxApi(Dropbox.Sign.Client.ISynchronousClient client, Dropbox.Sign.Client.IAsynchronousClient asyncClient, Dropbox.Sign.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Dropbox.Sign.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Dropbox.Sign.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Dropbox.Sign.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Dropbox.Sign.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// + public void FaxDelete(string faxId, int operationIndex = 0) + { + FaxDeleteWithHttpInfo(faxId); + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Dropbox.Sign.Client.ApiResponse FaxDeleteWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxDelete"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxDelete"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/fax/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task FaxDeleteAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + await FaxDeleteWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete Fax Deletes the specified Fax from the system. + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> FaxDeleteWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxDelete"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxDelete"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fax/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxDelete", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// System.IO.Stream + public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxFilesWithHttpInfo(faxId); + return localVarResponse.Data; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of System.IO.Stream + public Dropbox.Sign.Client.ApiResponse FaxFilesWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxFiles"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/pdf", + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxFiles"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/files/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxFiles", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + public async System.Threading.Tasks.Task FaxFilesAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxFilesWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Fax Files Returns list of fax files + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + public async System.Threading.Tasks.Task> FaxFilesWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxFiles"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/pdf", + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxFiles"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/files/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxFiles", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// FaxGetResponse + public FaxGetResponse FaxGet(string faxId, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxGetWithHttpInfo(faxId); + return localVarResponse.Data; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string faxId, int operationIndex = 0) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxGet"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/{fax_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + public async System.Threading.Tasks.Task FaxGetAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxGetWithHttpInfoAsync(faxId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Fax Returns information about fax + /// + /// Thrown when fails to make API call + /// Fax ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + public async System.Threading.Tasks.Task> FaxGetWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxId' is set + if (faxId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxId' when calling FaxApi->FaxGet"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("fax_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(faxId)); // path parameter + + localVarRequestOptions.Operation = "FaxApi.FaxGet"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/{fax_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxGet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Lists Faxes Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// FaxListResponse + public FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxListWithHttpInfo(page, pageSize); + return localVarResponse.Data; + } + + /// + /// Lists Faxes Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// ApiResponse of FaxListResponse + public Dropbox.Sign.Client.ApiResponse FaxListWithHttpInfo(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0) + { + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + localVarRequestOptions.Operation = "FaxApi.FaxList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/fax/list", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Lists Faxes Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxListResponse + public async System.Threading.Tasks.Task FaxListAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxListWithHttpInfoAsync(page, pageSize, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Lists Faxes Returns properties of multiple faxes + /// + /// Thrown when fails to make API call + /// Page (optional, default to 1) + /// Page size (optional, default to 20) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxListResponse) + public async System.Threading.Tasks.Task> FaxListWithHttpInfoAsync(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + var localVarContentType = Dropbox.Sign.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (page != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page", page)); + } + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Dropbox.Sign.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + + localVarRequestOptions.Operation = "FaxApi.FaxList"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/fax/list", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxList", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// FaxGetResponse + public FaxGetResponse FaxSend(FaxSendRequest faxSendRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = FaxSendWithHttpInfo(faxSendRequest); + return localVarResponse.Data; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of FaxGetResponse + public Dropbox.Sign.Client.ApiResponse FaxSendWithHttpInfo(FaxSendRequest faxSendRequest, int operationIndex = 0) + { + // verify the required parameter 'faxSendRequest' is set + if (faxSendRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxSendRequest' when calling FaxApi->FaxSend"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxSendRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxSendRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "FaxApi.FaxSend"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/fax/send", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxSend", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of FaxGetResponse + public async System.Threading.Tasks.Task FaxSendAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await FaxSendWithHttpInfoAsync(faxSendRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Send Fax Action to prepare and send a fax + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FaxGetResponse) + public async System.Threading.Tasks.Task> FaxSendWithHttpInfoAsync(FaxSendRequest faxSendRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'faxSendRequest' is set + if (faxSendRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'faxSendRequest' when calling FaxApi->FaxSend"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = faxSendRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = faxSendRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "FaxApi.FaxSend"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/fax/send", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FaxSend", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Dropbox.Sign/Api/SignatureRequestApi.cs b/src/Dropbox.Sign/Api/SignatureRequestApi.cs index 0669f91..7671b57 100644 --- a/src/Dropbox.Sign/Api/SignatureRequestApi.cs +++ b/src/Dropbox.Sign/Api/SignatureRequestApi.cs @@ -77,7 +77,7 @@ public interface ISignatureRequestApiSync : IApiAccessor /// Cancel Incomplete Signature Request /// /// - /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -89,7 +89,7 @@ public interface ISignatureRequestApiSync : IApiAccessor /// Cancel Incomplete Signature Request /// /// - /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -472,7 +472,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Cancel Incomplete Signature Request /// /// - /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -485,7 +485,7 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Cancel Incomplete Signature Request /// /// - /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1309,7 +1309,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequest } /// - /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1321,7 +1321,7 @@ public void SignatureRequestCancel(string signatureRequestId, int operationIndex } /// - /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1390,7 +1390,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } /// - /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. @@ -1403,7 +1403,7 @@ public Dropbox.Sign.Client.ApiResponse SignatureRequestCancelWithHttpInf } /// - /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + /// Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. /// /// Thrown when fails to make API call /// The id of the incomplete SignatureRequest to cancel. diff --git a/src/Dropbox.Sign/Api/TemplateApi.cs b/src/Dropbox.Sign/Api/TemplateApi.cs index 01bb322..f98f067 100644 --- a/src/Dropbox.Sign/Api/TemplateApi.cs +++ b/src/Dropbox.Sign/Api/TemplateApi.cs @@ -53,7 +53,7 @@ public interface ITemplateApiSync : IApiAccessor /// ApiResponse of TemplateGetResponse ApiResponse TemplateAddUserWithHttpInfo(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -65,7 +65,7 @@ public interface ITemplateApiSync : IApiAccessor TemplateCreateResponse TemplateCreate(TemplateCreateRequest templateCreateRequest, int operationIndex = 0); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -333,7 +333,7 @@ public interface ITemplateApiAsync : IApiAccessor /// Task of ApiResponse (TemplateGetResponse) System.Threading.Tasks.Task> TemplateAddUserWithHttpInfoAsync(string templateId, TemplateAddUserRequest templateAddUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -346,7 +346,7 @@ public interface ITemplateApiAsync : IApiAccessor System.Threading.Tasks.Task TemplateCreateAsync(TemplateCreateRequest templateCreateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Create Template + /// Create Template /// /// /// Creates a template that can then be used. @@ -919,7 +919,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateAddUserWithH } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// @@ -932,7 +932,7 @@ public TemplateCreateResponse TemplateCreate(TemplateCreateRequest templateCreat } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// @@ -1009,7 +1009,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// @@ -1023,7 +1023,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateCreateWit } /// - /// Create Template Creates a template that can then be used. + /// Create Template Creates a template that can then be used. /// /// Thrown when fails to make API call /// diff --git a/src/Dropbox.Sign/Client/Configuration.cs b/src/Dropbox.Sign/Client/Configuration.cs index fdb5984..1efe46e 100644 --- a/src/Dropbox.Sign/Client/Configuration.cs +++ b/src/Dropbox.Sign/Client/Configuration.cs @@ -36,7 +36,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.6.1"; + public const string Version = "1.7.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -120,7 +120,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.6.1/csharp"); + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.7.0/csharp"); BasePath = "https://api.hellosign.com/v3"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -567,7 +567,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 3.0.0\n"; - report += " SDK Package Version: 1.6.1\n"; + report += " SDK Package Version: 1.7.0\n"; return report; } diff --git a/src/Dropbox.Sign/Dropbox.Sign.csproj b/src/Dropbox.Sign/Dropbox.Sign.csproj index 469e93b..ac874fa 100644 --- a/src/Dropbox.Sign/Dropbox.Sign.csproj +++ b/src/Dropbox.Sign/Dropbox.Sign.csproj @@ -12,7 +12,7 @@ Client library for using the Dropbox Sign API Dropbox 2024 Dropbox.Sign - 1.6.1 + 1.7.0 bin\$(Configuration)\$(TargetFramework)\Dropbox.Sign.xml https://github.com/hellosign/dropbox-sign-dotnet.git git diff --git a/src/Dropbox.Sign/Model/AccountResponseQuotas.cs b/src/Dropbox.Sign/Model/AccountResponseQuotas.cs index f72e272..b97d73c 100644 --- a/src/Dropbox.Sign/Model/AccountResponseQuotas.cs +++ b/src/Dropbox.Sign/Model/AccountResponseQuotas.cs @@ -45,7 +45,7 @@ protected AccountResponseQuotas() { } /// Signature requests remaining.. /// Total API templates allowed.. /// API templates remaining.. - /// SMS verifications remaining.. + /// SMS verifications remaining.. /// Number of fax pages left. public AccountResponseQuotas(int? apiSignatureRequestsLeft = default(int?), int? documentsLeft = default(int?), int? templatesTotal = default(int?), int? templatesLeft = default(int?), int? smsVerificationsLeft = default(int?), int? numFaxPagesLeft = default(int?)) { @@ -103,9 +103,9 @@ public static AccountResponseQuotas Init(string jsonData) public int? TemplatesLeft { get; set; } /// - /// SMS verifications remaining. + /// SMS verifications remaining. /// - /// SMS verifications remaining. + /// SMS verifications remaining. [DataMember(Name = "sms_verifications_left", EmitDefaultValue = true)] public int? SmsVerificationsLeft { get; set; } diff --git a/src/Dropbox.Sign/Model/FaxGetResponse.cs b/src/Dropbox.Sign/Model/FaxGetResponse.cs new file mode 100644 index 0000000..59214ef --- /dev/null +++ b/src/Dropbox.Sign/Model/FaxGetResponse.cs @@ -0,0 +1,197 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxGetResponse + /// + [DataContract(Name = "FaxGetResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxGetResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxGetResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// fax (required). + /// A list of warnings.. + public FaxGetResponse(FaxResponse fax = default(FaxResponse), List warnings = default(List)) + { + + // to ensure "fax" is required (not null) + if (fax == null) + { + throw new ArgumentNullException("fax is a required property for FaxGetResponse and cannot be null"); + } + this.Fax = fax; + this.Warnings = warnings; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxGetResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxGetResponse"); + } + + return obj; + } + + /// + /// Gets or Sets Fax + /// + [DataMember(Name = "fax", IsRequired = true, EmitDefaultValue = true)] + public FaxResponse Fax { get; set; } + + /// + /// A list of warnings. + /// + /// A list of warnings. + [DataMember(Name = "warnings", EmitDefaultValue = true)] + public List Warnings { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxGetResponse {\n"); + sb.Append(" Fax: ").Append(Fax).Append("\n"); + sb.Append(" Warnings: ").Append(Warnings).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxGetResponse); + } + + /// + /// Returns true if FaxGetResponse instances are equal + /// + /// Instance of FaxGetResponse to be compared + /// Boolean + public bool Equals(FaxGetResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Fax == input.Fax || + (this.Fax != null && + this.Fax.Equals(input.Fax)) + ) && + ( + this.Warnings == input.Warnings || + this.Warnings != null && + input.Warnings != null && + this.Warnings.SequenceEqual(input.Warnings) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Fax != null) + { + hashCode = (hashCode * 59) + this.Fax.GetHashCode(); + } + if (this.Warnings != null) + { + hashCode = (hashCode * 59) + this.Warnings.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "fax", + Property = "Fax", + Type = "FaxResponse", + Value = Fax, + }); + types.Add(new OpenApiType() + { + Name = "warnings", + Property = "Warnings", + Type = "List", + Value = Warnings, + }); + + return types; + } + } + +} diff --git a/src/Dropbox.Sign/Model/FaxLine.cs b/src/Dropbox.Sign/Model/FaxLine.cs deleted file mode 100644 index bea9248..0000000 --- a/src/Dropbox.Sign/Model/FaxLine.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// FaxLine - /// - [DataContract(Name = "FaxLine")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class FaxLine : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FaxLine() { } - /// - /// Initializes a new instance of the class. - /// - /// Number. - /// Created at. - /// Updated at. - /// accounts. - public FaxLine(string number = default(string), string createdAt = default(string), string updatedAt = default(string), List accounts = default(List)) - { - - this.Number = number; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.Accounts = accounts; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static FaxLine Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of FaxLine"); - } - - return obj; - } - - /// - /// Number - /// - /// Number - [DataMember(Name = "number", EmitDefaultValue = true)] - public string Number { get; set; } - - /// - /// Created at - /// - /// Created at - [DataMember(Name = "created_at", EmitDefaultValue = true)] - public string CreatedAt { get; set; } - - /// - /// Updated at - /// - /// Updated at - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public string UpdatedAt { get; set; } - - /// - /// Gets or Sets Accounts - /// - [DataMember(Name = "accounts", EmitDefaultValue = true)] - public List Accounts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FaxLine {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" Accounts: ").Append(Accounts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FaxLine); - } - - /// - /// Returns true if FaxLine instances are equal - /// - /// Instance of FaxLine to be compared - /// Boolean - public bool Equals(FaxLine input) - { - if (input == null) - { - return false; - } - return - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Accounts == input.Accounts || - this.Accounts != null && - input.Accounts != null && - this.Accounts.SequenceEqual(input.Accounts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Accounts != null) - { - hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "number", - Property = "Number", - Type = "string", - Value = Number, - }); - types.Add(new OpenApiType() - { - Name = "created_at", - Property = "CreatedAt", - Type = "string", - Value = CreatedAt, - }); - types.Add(new OpenApiType() - { - Name = "updated_at", - Property = "UpdatedAt", - Type = "string", - Value = UpdatedAt, - }); - types.Add(new OpenApiType() - { - Name = "accounts", - Property = "Accounts", - Type = "List", - Value = Accounts, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/FaxListResponse.cs b/src/Dropbox.Sign/Model/FaxListResponse.cs new file mode 100644 index 0000000..d5c6299 --- /dev/null +++ b/src/Dropbox.Sign/Model/FaxListResponse.cs @@ -0,0 +1,201 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxListResponse + /// + [DataContract(Name = "FaxListResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxListResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxListResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// faxes (required). + /// listInfo (required). + public FaxListResponse(List faxes = default(List), ListInfoResponse listInfo = default(ListInfoResponse)) + { + + // to ensure "faxes" is required (not null) + if (faxes == null) + { + throw new ArgumentNullException("faxes is a required property for FaxListResponse and cannot be null"); + } + this.Faxes = faxes; + // to ensure "listInfo" is required (not null) + if (listInfo == null) + { + throw new ArgumentNullException("listInfo is a required property for FaxListResponse and cannot be null"); + } + this.ListInfo = listInfo; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxListResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxListResponse"); + } + + return obj; + } + + /// + /// Gets or Sets Faxes + /// + [DataMember(Name = "faxes", IsRequired = true, EmitDefaultValue = true)] + public List Faxes { get; set; } + + /// + /// Gets or Sets ListInfo + /// + [DataMember(Name = "list_info", IsRequired = true, EmitDefaultValue = true)] + public ListInfoResponse ListInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxListResponse {\n"); + sb.Append(" Faxes: ").Append(Faxes).Append("\n"); + sb.Append(" ListInfo: ").Append(ListInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxListResponse); + } + + /// + /// Returns true if FaxListResponse instances are equal + /// + /// Instance of FaxListResponse to be compared + /// Boolean + public bool Equals(FaxListResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Faxes == input.Faxes || + this.Faxes != null && + input.Faxes != null && + this.Faxes.SequenceEqual(input.Faxes) + ) && + ( + this.ListInfo == input.ListInfo || + (this.ListInfo != null && + this.ListInfo.Equals(input.ListInfo)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Faxes != null) + { + hashCode = (hashCode * 59) + this.Faxes.GetHashCode(); + } + if (this.ListInfo != null) + { + hashCode = (hashCode * 59) + this.ListInfo.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "faxes", + Property = "Faxes", + Type = "List", + Value = Faxes, + }); + types.Add(new OpenApiType() + { + Name = "list_info", + Property = "ListInfo", + Type = "ListInfoResponse", + Value = ListInfo, + }); + + return types; + } + } + +} diff --git a/src/Dropbox.Sign/Model/FaxResponse.cs b/src/Dropbox.Sign/Model/FaxResponse.cs new file mode 100644 index 0000000..60125d8 --- /dev/null +++ b/src/Dropbox.Sign/Model/FaxResponse.cs @@ -0,0 +1,443 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxResponse + /// + [DataContract(Name = "FaxResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax ID (required). + /// Fax Title (required). + /// Fax Original Title (required). + /// Fax Subject (required). + /// Fax Message (required). + /// Fax Metadata (required). + /// Fax Created At Timestamp (required). + /// Fax Sender Email (required). + /// Fax Transmissions List (required). + /// Fax Files URL (required). + public FaxResponse(string faxId = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Dictionary metadata = default(Dictionary), int createdAt = default(int), string sender = default(string), List transmissions = default(List), string filesUrl = default(string)) + { + + // to ensure "faxId" is required (not null) + if (faxId == null) + { + throw new ArgumentNullException("faxId is a required property for FaxResponse and cannot be null"); + } + this.FaxId = faxId; + // to ensure "title" is required (not null) + if (title == null) + { + throw new ArgumentNullException("title is a required property for FaxResponse and cannot be null"); + } + this.Title = title; + // to ensure "originalTitle" is required (not null) + if (originalTitle == null) + { + throw new ArgumentNullException("originalTitle is a required property for FaxResponse and cannot be null"); + } + this.OriginalTitle = originalTitle; + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new ArgumentNullException("subject is a required property for FaxResponse and cannot be null"); + } + this.Subject = subject; + // to ensure "message" is required (not null) + if (message == null) + { + throw new ArgumentNullException("message is a required property for FaxResponse and cannot be null"); + } + this.Message = message; + // to ensure "metadata" is required (not null) + if (metadata == null) + { + throw new ArgumentNullException("metadata is a required property for FaxResponse and cannot be null"); + } + this.Metadata = metadata; + this.CreatedAt = createdAt; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for FaxResponse and cannot be null"); + } + this.Sender = sender; + // to ensure "transmissions" is required (not null) + if (transmissions == null) + { + throw new ArgumentNullException("transmissions is a required property for FaxResponse and cannot be null"); + } + this.Transmissions = transmissions; + // to ensure "filesUrl" is required (not null) + if (filesUrl == null) + { + throw new ArgumentNullException("filesUrl is a required property for FaxResponse and cannot be null"); + } + this.FilesUrl = filesUrl; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxResponse"); + } + + return obj; + } + + /// + /// Fax ID + /// + /// Fax ID + [DataMember(Name = "fax_id", IsRequired = true, EmitDefaultValue = true)] + public string FaxId { get; set; } + + /// + /// Fax Title + /// + /// Fax Title + [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Fax Original Title + /// + /// Fax Original Title + [DataMember(Name = "original_title", IsRequired = true, EmitDefaultValue = true)] + public string OriginalTitle { get; set; } + + /// + /// Fax Subject + /// + /// Fax Subject + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Fax Message + /// + /// Fax Message + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Fax Metadata + /// + /// Fax Metadata + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Fax Created At Timestamp + /// + /// Fax Created At Timestamp + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + public int CreatedAt { get; set; } + + /// + /// Fax Sender Email + /// + /// Fax Sender Email + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax Transmissions List + /// + /// Fax Transmissions List + [DataMember(Name = "transmissions", IsRequired = true, EmitDefaultValue = true)] + public List Transmissions { get; set; } + + /// + /// Fax Files URL + /// + /// Fax Files URL + [DataMember(Name = "files_url", IsRequired = true, EmitDefaultValue = true)] + public string FilesUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxResponse {\n"); + sb.Append(" FaxId: ").Append(FaxId).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" OriginalTitle: ").Append(OriginalTitle).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Transmissions: ").Append(Transmissions).Append("\n"); + sb.Append(" FilesUrl: ").Append(FilesUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxResponse); + } + + /// + /// Returns true if FaxResponse instances are equal + /// + /// Instance of FaxResponse to be compared + /// Boolean + public bool Equals(FaxResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.FaxId == input.FaxId || + (this.FaxId != null && + this.FaxId.Equals(input.FaxId)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.OriginalTitle == input.OriginalTitle || + (this.OriginalTitle != null && + this.OriginalTitle.Equals(input.OriginalTitle)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.CreatedAt == input.CreatedAt || + this.CreatedAt.Equals(input.CreatedAt) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Transmissions == input.Transmissions || + this.Transmissions != null && + input.Transmissions != null && + this.Transmissions.SequenceEqual(input.Transmissions) + ) && + ( + this.FilesUrl == input.FilesUrl || + (this.FilesUrl != null && + this.FilesUrl.Equals(input.FilesUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FaxId != null) + { + hashCode = (hashCode * 59) + this.FaxId.GetHashCode(); + } + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + if (this.OriginalTitle != null) + { + hashCode = (hashCode * 59) + this.OriginalTitle.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.Transmissions != null) + { + hashCode = (hashCode * 59) + this.Transmissions.GetHashCode(); + } + if (this.FilesUrl != null) + { + hashCode = (hashCode * 59) + this.FilesUrl.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "fax_id", + Property = "FaxId", + Type = "string", + Value = FaxId, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + types.Add(new OpenApiType() + { + Name = "original_title", + Property = "OriginalTitle", + Type = "string", + Value = OriginalTitle, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + types.Add(new OpenApiType() + { + Name = "message", + Property = "Message", + Type = "string", + Value = Message, + }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); + types.Add(new OpenApiType() + { + Name = "created_at", + Property = "CreatedAt", + Type = "int", + Value = CreatedAt, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + types.Add(new OpenApiType() + { + Name = "transmissions", + Property = "Transmissions", + Type = "List", + Value = Transmissions, + }); + types.Add(new OpenApiType() + { + Name = "files_url", + Property = "FilesUrl", + Type = "string", + Value = FilesUrl, + }); + + return types; + } + } + +} diff --git a/src/Dropbox.Sign/Model/FaxResponseTransmission.cs b/src/Dropbox.Sign/Model/FaxResponseTransmission.cs new file mode 100644 index 0000000..0e37071 --- /dev/null +++ b/src/Dropbox.Sign/Model/FaxResponseTransmission.cs @@ -0,0 +1,302 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxResponseTransmission + /// + [DataContract(Name = "FaxResponseTransmission")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxResponseTransmission : IEquatable, IValidatableObject + { + /// + /// Fax Transmission Status Code + /// + /// Fax Transmission Status Code + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusCodeEnum + { + /// + /// Enum Success for value: success + /// + [EnumMember(Value = "success")] + Success = 1, + + /// + /// Enum Transmitting for value: transmitting + /// + [EnumMember(Value = "transmitting")] + Transmitting = 2, + + /// + /// Enum ErrorCouldNotFax for value: error_could_not_fax + /// + [EnumMember(Value = "error_could_not_fax")] + ErrorCouldNotFax = 3, + + /// + /// Enum ErrorUnknown for value: error_unknown + /// + [EnumMember(Value = "error_unknown")] + ErrorUnknown = 4, + + /// + /// Enum ErrorBusy for value: error_busy + /// + [EnumMember(Value = "error_busy")] + ErrorBusy = 5, + + /// + /// Enum ErrorNoAnswer for value: error_no_answer + /// + [EnumMember(Value = "error_no_answer")] + ErrorNoAnswer = 6, + + /// + /// Enum ErrorDisconnected for value: error_disconnected + /// + [EnumMember(Value = "error_disconnected")] + ErrorDisconnected = 7, + + /// + /// Enum ErrorBadDestination for value: error_bad_destination + /// + [EnumMember(Value = "error_bad_destination")] + ErrorBadDestination = 8 + } + + + /// + /// Fax Transmission Status Code + /// + /// Fax Transmission Status Code + [DataMember(Name = "status_code", IsRequired = true, EmitDefaultValue = true)] + public StatusCodeEnum StatusCode { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxResponseTransmission() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax Transmission Recipient (required). + /// Fax Transmission Sender (required). + /// Fax Transmission Status Code (required). + /// Fax Transmission Sent Timestamp. + public FaxResponseTransmission(string recipient = default(string), string sender = default(string), StatusCodeEnum statusCode = default(StatusCodeEnum), int sentAt = default(int)) + { + + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for FaxResponseTransmission and cannot be null"); + } + this.Recipient = recipient; + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new ArgumentNullException("sender is a required property for FaxResponseTransmission and cannot be null"); + } + this.Sender = sender; + this.StatusCode = statusCode; + this.SentAt = sentAt; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxResponseTransmission Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxResponseTransmission"); + } + + return obj; + } + + /// + /// Fax Transmission Recipient + /// + /// Fax Transmission Recipient + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Fax Transmission Sender + /// + /// Fax Transmission Sender + [DataMember(Name = "sender", IsRequired = true, EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax Transmission Sent Timestamp + /// + /// Fax Transmission Sent Timestamp + [DataMember(Name = "sent_at", EmitDefaultValue = true)] + public int SentAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxResponseTransmission {\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append(" SentAt: ").Append(SentAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxResponseTransmission); + } + + /// + /// Returns true if FaxResponseTransmission instances are equal + /// + /// Instance of FaxResponseTransmission to be compared + /// Boolean + public bool Equals(FaxResponseTransmission input) + { + if (input == null) + { + return false; + } + return + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.StatusCode == input.StatusCode || + this.StatusCode.Equals(input.StatusCode) + ) && + ( + this.SentAt == input.SentAt || + this.SentAt.Equals(input.SentAt) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); + hashCode = (hashCode * 59) + this.SentAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "recipient", + Property = "Recipient", + Type = "string", + Value = Recipient, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + types.Add(new OpenApiType() + { + Name = "status_code", + Property = "StatusCode", + Type = "string", + Value = StatusCode, + }); + types.Add(new OpenApiType() + { + Name = "sent_at", + Property = "SentAt", + Type = "int", + Value = SentAt, + }); + + return types; + } + } + +} diff --git a/src/Dropbox.Sign/Model/FaxSendRequest.cs b/src/Dropbox.Sign/Model/FaxSendRequest.cs new file mode 100644 index 0000000..e4d42e6 --- /dev/null +++ b/src/Dropbox.Sign/Model/FaxSendRequest.cs @@ -0,0 +1,383 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// FaxSendRequest + /// + [DataContract(Name = "FaxSendRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class FaxSendRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaxSendRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Fax Send To Recipient (required). + /// Fax Send From Sender (used only with fax number). + /// Fax File to Send. + /// Fax File URL to Send. + /// API Test Mode Setting (default to false). + /// Fax Cover Page for Recipient. + /// Fax Cover Page for Sender. + /// Fax Cover Page Message. + /// Fax Title. + public FaxSendRequest(string recipient = default(string), string sender = default(string), List files = default(List), List fileUrls = default(List), bool testMode = false, string coverPageTo = default(string), string coverPageFrom = default(string), string coverPageMessage = default(string), string title = default(string)) + { + + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new ArgumentNullException("recipient is a required property for FaxSendRequest and cannot be null"); + } + this.Recipient = recipient; + this.Sender = sender; + this.Files = files; + this.FileUrls = fileUrls; + this.TestMode = testMode; + this.CoverPageTo = coverPageTo; + this.CoverPageFrom = coverPageFrom; + this.CoverPageMessage = coverPageMessage; + this.Title = title; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static FaxSendRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of FaxSendRequest"); + } + + return obj; + } + + /// + /// Fax Send To Recipient + /// + /// Fax Send To Recipient + /// recipient@example.com + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] + public string Recipient { get; set; } + + /// + /// Fax Send From Sender (used only with fax number) + /// + /// Fax Send From Sender (used only with fax number) + /// sender@example.com + [DataMember(Name = "sender", EmitDefaultValue = true)] + public string Sender { get; set; } + + /// + /// Fax File to Send + /// + /// Fax File to Send + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Fax File URL to Send + /// + /// Fax File URL to Send + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// API Test Mode Setting + /// + /// API Test Mode Setting + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// Fax Cover Page for Recipient + /// + /// Fax Cover Page for Recipient + /// Recipient Name + [DataMember(Name = "cover_page_to", EmitDefaultValue = true)] + public string CoverPageTo { get; set; } + + /// + /// Fax Cover Page for Sender + /// + /// Fax Cover Page for Sender + /// Sender Name + [DataMember(Name = "cover_page_from", EmitDefaultValue = true)] + public string CoverPageFrom { get; set; } + + /// + /// Fax Cover Page Message + /// + /// Fax Cover Page Message + /// Please find the attached documents. + [DataMember(Name = "cover_page_message", EmitDefaultValue = true)] + public string CoverPageMessage { get; set; } + + /// + /// Fax Title + /// + /// Fax Title + /// Fax Title + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaxSendRequest {\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" CoverPageTo: ").Append(CoverPageTo).Append("\n"); + sb.Append(" CoverPageFrom: ").Append(CoverPageFrom).Append("\n"); + sb.Append(" CoverPageMessage: ").Append(CoverPageMessage).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FaxSendRequest); + } + + /// + /// Returns true if FaxSendRequest instances are equal + /// + /// Instance of FaxSendRequest to be compared + /// Boolean + public bool Equals(FaxSendRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Files == input.Files || + this.Files != null && + input.Files != null && + this.Files.SequenceEqual(input.Files) + ) && + ( + this.FileUrls == input.FileUrls || + this.FileUrls != null && + input.FileUrls != null && + this.FileUrls.SequenceEqual(input.FileUrls) + ) && + ( + this.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.CoverPageTo == input.CoverPageTo || + (this.CoverPageTo != null && + this.CoverPageTo.Equals(input.CoverPageTo)) + ) && + ( + this.CoverPageFrom == input.CoverPageFrom || + (this.CoverPageFrom != null && + this.CoverPageFrom.Equals(input.CoverPageFrom)) + ) && + ( + this.CoverPageMessage == input.CoverPageMessage || + (this.CoverPageMessage != null && + this.CoverPageMessage.Equals(input.CoverPageMessage)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Recipient != null) + { + hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); + } + if (this.Sender != null) + { + hashCode = (hashCode * 59) + this.Sender.GetHashCode(); + } + if (this.Files != null) + { + hashCode = (hashCode * 59) + this.Files.GetHashCode(); + } + if (this.FileUrls != null) + { + hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); + if (this.CoverPageTo != null) + { + hashCode = (hashCode * 59) + this.CoverPageTo.GetHashCode(); + } + if (this.CoverPageFrom != null) + { + hashCode = (hashCode * 59) + this.CoverPageFrom.GetHashCode(); + } + if (this.CoverPageMessage != null) + { + hashCode = (hashCode * 59) + this.CoverPageMessage.GetHashCode(); + } + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "recipient", + Property = "Recipient", + Type = "string", + Value = Recipient, + }); + types.Add(new OpenApiType() + { + Name = "sender", + Property = "Sender", + Type = "string", + Value = Sender, + }); + types.Add(new OpenApiType() + { + Name = "files", + Property = "Files", + Type = "List", + Value = Files, + }); + types.Add(new OpenApiType() + { + Name = "file_urls", + Property = "FileUrls", + Type = "List", + Value = FileUrls, + }); + types.Add(new OpenApiType() + { + Name = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_to", + Property = "CoverPageTo", + Type = "string", + Value = CoverPageTo, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_from", + Property = "CoverPageFrom", + Type = "string", + Value = CoverPageFrom, + }); + types.Add(new OpenApiType() + { + Name = "cover_page_message", + Property = "CoverPageMessage", + Type = "string", + Value = CoverPageMessage, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + + return types; + } + } + +} diff --git a/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs b/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs index dbfb22b..934de0d 100644 --- a/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs +++ b/src/Dropbox.Sign/Model/OAuthTokenRefreshRequest.cs @@ -43,7 +43,9 @@ protected OAuthTokenRefreshRequest() { } /// /// When refreshing an existing token use `refresh_token`. (required) (default to "refresh_token"). /// The token provided when you got the expired access token. (required). - public OAuthTokenRefreshRequest(string grantType = @"refresh_token", string refreshToken = default(string)) + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled.. + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled.. + public OAuthTokenRefreshRequest(string grantType = @"refresh_token", string refreshToken = default(string), string clientId = default(string), string clientSecret = default(string)) { // to ensure "grantType" is required (not null) @@ -58,6 +60,8 @@ protected OAuthTokenRefreshRequest() { } throw new ArgumentNullException("refreshToken is a required property for OAuthTokenRefreshRequest and cannot be null"); } this.RefreshToken = refreshToken; + this.ClientId = clientId; + this.ClientSecret = clientSecret; } /// @@ -90,6 +94,20 @@ public static OAuthTokenRefreshRequest Init(string jsonData) [DataMember(Name = "refresh_token", IsRequired = true, EmitDefaultValue = true)] public string RefreshToken { get; set; } + /// + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + /// + /// The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + [DataMember(Name = "client_id", EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + /// + /// The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + [DataMember(Name = "client_secret", EmitDefaultValue = true)] + public string ClientSecret { get; set; } + /// /// Returns the string presentation of the object /// @@ -100,6 +118,8 @@ public override string ToString() sb.Append("class OAuthTokenRefreshRequest {\n"); sb.Append(" GrantType: ").Append(GrantType).Append("\n"); sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -144,6 +164,16 @@ public bool Equals(OAuthTokenRefreshRequest input) this.RefreshToken == input.RefreshToken || (this.RefreshToken != null && this.RefreshToken.Equals(input.RefreshToken)) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.ClientSecret == input.ClientSecret || + (this.ClientSecret != null && + this.ClientSecret.Equals(input.ClientSecret)) ); } @@ -164,6 +194,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); } + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.ClientSecret != null) + { + hashCode = (hashCode * 59) + this.ClientSecret.GetHashCode(); + } return hashCode; } } @@ -194,6 +232,20 @@ public List GetOpenApiTypes() Type = "string", Value = RefreshToken, }); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "client_secret", + Property = "ClientSecret", + Type = "string", + Value = ClientSecret, + }); return types; } diff --git a/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs deleted file mode 100644 index ce07844..0000000 --- a/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// SignatureRequestEditEmbeddedRequest - /// - [DataContract(Name = "SignatureRequestEditEmbeddedRequest")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestEditEmbeddedRequest : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SignatureRequestEditEmbeddedRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. (default to false). - /// A list describing the attachments. - /// The email addresses that should be CCed.. - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. (required). - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.. - /// fieldOptions. - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.. - /// Conditional Logic rules for fields defined in `form_fields_per_document`.. - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`. - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. (default to false). - /// The custom message in the email that will be sent to the signers.. - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. - /// signingOptions. - /// The subject in the email that will be sent to the signers.. - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). - /// The title you want to assign to the SignatureRequest.. - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. (default to false). - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. (default to false). - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.. - public SignatureRequestEditEmbeddedRequest(List files = default(List), List fileUrls = default(List), List signers = default(List), List groupedSigners = default(List), bool allowDecline = false, bool allowReassign = false, List attachments = default(List), List ccEmailAddresses = default(List), string clientId = default(string), List customFields = default(List), SubFieldOptions fieldOptions = default(SubFieldOptions), List formFieldGroups = default(List), List formFieldRules = default(List), List formFieldsPerDocument = default(List), bool hideTextTags = false, string message = default(string), Dictionary metadata = default(Dictionary), SubSigningOptions signingOptions = default(SubSigningOptions), string subject = default(string), bool testMode = false, string title = default(string), bool useTextTags = false, bool populateAutoFillFields = false, int? expiresAt = default(int?)) - { - - // to ensure "clientId" is required (not null) - if (clientId == null) - { - throw new ArgumentNullException("clientId is a required property for SignatureRequestEditEmbeddedRequest and cannot be null"); - } - this.ClientId = clientId; - this.Files = files; - this.FileUrls = fileUrls; - this.Signers = signers; - this.GroupedSigners = groupedSigners; - this.AllowDecline = allowDecline; - this.AllowReassign = allowReassign; - this.Attachments = attachments; - this.CcEmailAddresses = ccEmailAddresses; - this.CustomFields = customFields; - this.FieldOptions = fieldOptions; - this.FormFieldGroups = formFieldGroups; - this.FormFieldRules = formFieldRules; - this.FormFieldsPerDocument = formFieldsPerDocument; - this.HideTextTags = hideTextTags; - this.Message = message; - this.Metadata = metadata; - this.SigningOptions = signingOptions; - this.Subject = subject; - this.TestMode = testMode; - this.Title = title; - this.UseTextTags = useTextTags; - this.PopulateAutoFillFields = populateAutoFillFields; - this.ExpiresAt = expiresAt; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static SignatureRequestEditEmbeddedRequest Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditEmbeddedRequest"); - } - - return obj; - } - - /// - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. - /// - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. - [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "files", EmitDefaultValue = true)] - public List Files { get; set; } - - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "file_urls", EmitDefaultValue = true)] - public List FileUrls { get; set; } - - /// - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - /// - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - [DataMember(Name = "signers", EmitDefaultValue = true)] - public List Signers { get; set; } - - /// - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - /// - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] - public List GroupedSigners { get; set; } - - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - [DataMember(Name = "allow_decline", EmitDefaultValue = true)] - public bool AllowDecline { get; set; } - - /// - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. - /// - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. - [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] - public bool AllowReassign { get; set; } - - /// - /// A list describing the attachments - /// - /// A list describing the attachments - [DataMember(Name = "attachments", EmitDefaultValue = true)] - public List Attachments { get; set; } - - /// - /// The email addresses that should be CCed. - /// - /// The email addresses that should be CCed. - [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] - public List CcEmailAddresses { get; set; } - - /// - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - /// - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - [DataMember(Name = "custom_fields", EmitDefaultValue = true)] - public List CustomFields { get; set; } - - /// - /// Gets or Sets FieldOptions - /// - [DataMember(Name = "field_options", EmitDefaultValue = true)] - public SubFieldOptions FieldOptions { get; set; } - - /// - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. - /// - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. - [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] - public List FormFieldGroups { get; set; } - - /// - /// Conditional Logic rules for fields defined in `form_fields_per_document`. - /// - /// Conditional Logic rules for fields defined in `form_fields_per_document`. - [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] - public List FormFieldRules { get; set; } - - /// - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - /// - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] - public List FormFieldsPerDocument { get; set; } - - /// - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. - /// - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. - [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] - public bool HideTextTags { get; set; } - - /// - /// The custom message in the email that will be sent to the signers. - /// - /// The custom message in the email that will be sent to the signers. - [DataMember(Name = "message", EmitDefaultValue = true)] - public string Message { get; set; } - - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - [DataMember(Name = "metadata", EmitDefaultValue = true)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets SigningOptions - /// - [DataMember(Name = "signing_options", EmitDefaultValue = true)] - public SubSigningOptions SigningOptions { get; set; } - - /// - /// The subject in the email that will be sent to the signers. - /// - /// The subject in the email that will be sent to the signers. - [DataMember(Name = "subject", EmitDefaultValue = true)] - public string Subject { get; set; } - - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - [DataMember(Name = "test_mode", EmitDefaultValue = true)] - public bool TestMode { get; set; } - - /// - /// The title you want to assign to the SignatureRequest. - /// - /// The title you want to assign to the SignatureRequest. - [DataMember(Name = "title", EmitDefaultValue = true)] - public string Title { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. - /// - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. - [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] - public bool UseTextTags { get; set; } - - /// - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. - /// - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. - [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] - public bool PopulateAutoFillFields { get; set; } - - /// - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - /// - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - [DataMember(Name = "expires_at", EmitDefaultValue = true)] - public int? ExpiresAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatureRequestEditEmbeddedRequest {\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); - sb.Append(" Signers: ").Append(Signers).Append("\n"); - sb.Append(" GroupedSigners: ").Append(GroupedSigners).Append("\n"); - sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); - sb.Append(" AllowReassign: ").Append(AllowReassign).Append("\n"); - sb.Append(" Attachments: ").Append(Attachments).Append("\n"); - sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); - sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); - sb.Append(" FieldOptions: ").Append(FieldOptions).Append("\n"); - sb.Append(" FormFieldGroups: ").Append(FormFieldGroups).Append("\n"); - sb.Append(" FormFieldRules: ").Append(FormFieldRules).Append("\n"); - sb.Append(" FormFieldsPerDocument: ").Append(FormFieldsPerDocument).Append("\n"); - sb.Append(" HideTextTags: ").Append(HideTextTags).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); - sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" TestMode: ").Append(TestMode).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" UseTextTags: ").Append(UseTextTags).Append("\n"); - sb.Append(" PopulateAutoFillFields: ").Append(PopulateAutoFillFields).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatureRequestEditEmbeddedRequest); - } - - /// - /// Returns true if SignatureRequestEditEmbeddedRequest instances are equal - /// - /// Instance of SignatureRequestEditEmbeddedRequest to be compared - /// Boolean - public bool Equals(SignatureRequestEditEmbeddedRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ) && - ( - this.FileUrls == input.FileUrls || - this.FileUrls != null && - input.FileUrls != null && - this.FileUrls.SequenceEqual(input.FileUrls) - ) && - ( - this.Signers == input.Signers || - this.Signers != null && - input.Signers != null && - this.Signers.SequenceEqual(input.Signers) - ) && - ( - this.GroupedSigners == input.GroupedSigners || - this.GroupedSigners != null && - input.GroupedSigners != null && - this.GroupedSigners.SequenceEqual(input.GroupedSigners) - ) && - ( - this.AllowDecline == input.AllowDecline || - this.AllowDecline.Equals(input.AllowDecline) - ) && - ( - this.AllowReassign == input.AllowReassign || - this.AllowReassign.Equals(input.AllowReassign) - ) && - ( - this.Attachments == input.Attachments || - this.Attachments != null && - input.Attachments != null && - this.Attachments.SequenceEqual(input.Attachments) - ) && - ( - this.CcEmailAddresses == input.CcEmailAddresses || - this.CcEmailAddresses != null && - input.CcEmailAddresses != null && - this.CcEmailAddresses.SequenceEqual(input.CcEmailAddresses) - ) && - ( - this.CustomFields == input.CustomFields || - this.CustomFields != null && - input.CustomFields != null && - this.CustomFields.SequenceEqual(input.CustomFields) - ) && - ( - this.FieldOptions == input.FieldOptions || - (this.FieldOptions != null && - this.FieldOptions.Equals(input.FieldOptions)) - ) && - ( - this.FormFieldGroups == input.FormFieldGroups || - this.FormFieldGroups != null && - input.FormFieldGroups != null && - this.FormFieldGroups.SequenceEqual(input.FormFieldGroups) - ) && - ( - this.FormFieldRules == input.FormFieldRules || - this.FormFieldRules != null && - input.FormFieldRules != null && - this.FormFieldRules.SequenceEqual(input.FormFieldRules) - ) && - ( - this.FormFieldsPerDocument == input.FormFieldsPerDocument || - this.FormFieldsPerDocument != null && - input.FormFieldsPerDocument != null && - this.FormFieldsPerDocument.SequenceEqual(input.FormFieldsPerDocument) - ) && - ( - this.HideTextTags == input.HideTextTags || - this.HideTextTags.Equals(input.HideTextTags) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.SigningOptions == input.SigningOptions || - (this.SigningOptions != null && - this.SigningOptions.Equals(input.SigningOptions)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) && - ( - this.TestMode == input.TestMode || - this.TestMode.Equals(input.TestMode) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.UseTextTags == input.UseTextTags || - this.UseTextTags.Equals(input.UseTextTags) - ) && - ( - this.PopulateAutoFillFields == input.PopulateAutoFillFields || - this.PopulateAutoFillFields.Equals(input.PopulateAutoFillFields) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.FileUrls != null) - { - hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); - } - if (this.Signers != null) - { - hashCode = (hashCode * 59) + this.Signers.GetHashCode(); - } - if (this.GroupedSigners != null) - { - hashCode = (hashCode * 59) + this.GroupedSigners.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowReassign.GetHashCode(); - if (this.Attachments != null) - { - hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); - } - if (this.CcEmailAddresses != null) - { - hashCode = (hashCode * 59) + this.CcEmailAddresses.GetHashCode(); - } - if (this.CustomFields != null) - { - hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); - } - if (this.FieldOptions != null) - { - hashCode = (hashCode * 59) + this.FieldOptions.GetHashCode(); - } - if (this.FormFieldGroups != null) - { - hashCode = (hashCode * 59) + this.FormFieldGroups.GetHashCode(); - } - if (this.FormFieldRules != null) - { - hashCode = (hashCode * 59) + this.FormFieldRules.GetHashCode(); - } - if (this.FormFieldsPerDocument != null) - { - hashCode = (hashCode * 59) + this.FormFieldsPerDocument.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HideTextTags.GetHashCode(); - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.SigningOptions != null) - { - hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UseTextTags.GetHashCode(); - hashCode = (hashCode * 59) + this.PopulateAutoFillFields.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "client_id", - Property = "ClientId", - Type = "string", - Value = ClientId, - }); - types.Add(new OpenApiType() - { - Name = "files", - Property = "Files", - Type = "List", - Value = Files, - }); - types.Add(new OpenApiType() - { - Name = "file_urls", - Property = "FileUrls", - Type = "List", - Value = FileUrls, - }); - types.Add(new OpenApiType() - { - Name = "signers", - Property = "Signers", - Type = "List", - Value = Signers, - }); - types.Add(new OpenApiType() - { - Name = "grouped_signers", - Property = "GroupedSigners", - Type = "List", - Value = GroupedSigners, - }); - types.Add(new OpenApiType() - { - Name = "allow_decline", - Property = "AllowDecline", - Type = "bool", - Value = AllowDecline, - }); - types.Add(new OpenApiType() - { - Name = "allow_reassign", - Property = "AllowReassign", - Type = "bool", - Value = AllowReassign, - }); - types.Add(new OpenApiType() - { - Name = "attachments", - Property = "Attachments", - Type = "List", - Value = Attachments, - }); - types.Add(new OpenApiType() - { - Name = "cc_email_addresses", - Property = "CcEmailAddresses", - Type = "List", - Value = CcEmailAddresses, - }); - types.Add(new OpenApiType() - { - Name = "custom_fields", - Property = "CustomFields", - Type = "List", - Value = CustomFields, - }); - types.Add(new OpenApiType() - { - Name = "field_options", - Property = "FieldOptions", - Type = "SubFieldOptions", - Value = FieldOptions, - }); - types.Add(new OpenApiType() - { - Name = "form_field_groups", - Property = "FormFieldGroups", - Type = "List", - Value = FormFieldGroups, - }); - types.Add(new OpenApiType() - { - Name = "form_field_rules", - Property = "FormFieldRules", - Type = "List", - Value = FormFieldRules, - }); - types.Add(new OpenApiType() - { - Name = "form_fields_per_document", - Property = "FormFieldsPerDocument", - Type = "List", - Value = FormFieldsPerDocument, - }); - types.Add(new OpenApiType() - { - Name = "hide_text_tags", - Property = "HideTextTags", - Type = "bool", - Value = HideTextTags, - }); - types.Add(new OpenApiType() - { - Name = "message", - Property = "Message", - Type = "string", - Value = Message, - }); - types.Add(new OpenApiType() - { - Name = "metadata", - Property = "Metadata", - Type = "Dictionary", - Value = Metadata, - }); - types.Add(new OpenApiType() - { - Name = "signing_options", - Property = "SigningOptions", - Type = "SubSigningOptions", - Value = SigningOptions, - }); - types.Add(new OpenApiType() - { - Name = "subject", - Property = "Subject", - Type = "string", - Value = Subject, - }); - types.Add(new OpenApiType() - { - Name = "test_mode", - Property = "TestMode", - Type = "bool", - Value = TestMode, - }); - types.Add(new OpenApiType() - { - Name = "title", - Property = "Title", - Type = "string", - Value = Title, - }); - types.Add(new OpenApiType() - { - Name = "use_text_tags", - Property = "UseTextTags", - Type = "bool", - Value = UseTextTags, - }); - types.Add(new OpenApiType() - { - Name = "populate_auto_fill_fields", - Property = "PopulateAutoFillFields", - Type = "bool", - Value = PopulateAutoFillFields, - }); - types.Add(new OpenApiType() - { - Name = "expires_at", - Property = "ExpiresAt", - Type = "int?", - Value = ExpiresAt, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs deleted file mode 100644 index 6d91c68..0000000 --- a/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// SignatureRequestEditEmbeddedWithTemplateRequest - /// - [DataContract(Name = "SignatureRequestEditEmbeddedWithTemplateRequest")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestEditEmbeddedWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SignatureRequestEditEmbeddedWithTemplateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. (required). - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). - /// Add CC email recipients. Required when a CC role exists for the Template.. - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. (required). - /// An array defining values and options for custom fields. Required when a custom field exists in the Template.. - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// The custom message in the email that will be sent to the signers.. - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. - /// Add Signers to your Templated-based Signature Request. (required). - /// signingOptions. - /// The subject in the email that will be sent to the signers.. - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). - /// The title you want to assign to the SignatureRequest.. - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. (default to false). - public SignatureRequestEditEmbeddedWithTemplateRequest(List templateIds = default(List), bool allowDecline = false, List ccs = default(List), string clientId = default(string), List customFields = default(List), List files = default(List), List fileUrls = default(List), string message = default(string), Dictionary metadata = default(Dictionary), List signers = default(List), SubSigningOptions signingOptions = default(SubSigningOptions), string subject = default(string), bool testMode = false, string title = default(string), bool populateAutoFillFields = false) - { - - // to ensure "templateIds" is required (not null) - if (templateIds == null) - { - throw new ArgumentNullException("templateIds is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); - } - this.TemplateIds = templateIds; - // to ensure "clientId" is required (not null) - if (clientId == null) - { - throw new ArgumentNullException("clientId is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); - } - this.ClientId = clientId; - // to ensure "signers" is required (not null) - if (signers == null) - { - throw new ArgumentNullException("signers is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); - } - this.Signers = signers; - this.AllowDecline = allowDecline; - this.Ccs = ccs; - this.CustomFields = customFields; - this.Files = files; - this.FileUrls = fileUrls; - this.Message = message; - this.Metadata = metadata; - this.SigningOptions = signingOptions; - this.Subject = subject; - this.TestMode = testMode; - this.Title = title; - this.PopulateAutoFillFields = populateAutoFillFields; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static SignatureRequestEditEmbeddedWithTemplateRequest Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditEmbeddedWithTemplateRequest"); - } - - return obj; - } - - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] - public List TemplateIds { get; set; } - - /// - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. - /// - /// Client id of the app you're using to create this embedded signature request. Used for security purposes. - [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// Add Signers to your Templated-based Signature Request. - /// - /// Add Signers to your Templated-based Signature Request. - [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] - public List Signers { get; set; } - - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - [DataMember(Name = "allow_decline", EmitDefaultValue = true)] - public bool AllowDecline { get; set; } - - /// - /// Add CC email recipients. Required when a CC role exists for the Template. - /// - /// Add CC email recipients. Required when a CC role exists for the Template. - [DataMember(Name = "ccs", EmitDefaultValue = true)] - public List Ccs { get; set; } - - /// - /// An array defining values and options for custom fields. Required when a custom field exists in the Template. - /// - /// An array defining values and options for custom fields. Required when a custom field exists in the Template. - [DataMember(Name = "custom_fields", EmitDefaultValue = true)] - public List CustomFields { get; set; } - - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "files", EmitDefaultValue = true)] - public List Files { get; set; } - - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "file_urls", EmitDefaultValue = true)] - public List FileUrls { get; set; } - - /// - /// The custom message in the email that will be sent to the signers. - /// - /// The custom message in the email that will be sent to the signers. - [DataMember(Name = "message", EmitDefaultValue = true)] - public string Message { get; set; } - - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - [DataMember(Name = "metadata", EmitDefaultValue = true)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets SigningOptions - /// - [DataMember(Name = "signing_options", EmitDefaultValue = true)] - public SubSigningOptions SigningOptions { get; set; } - - /// - /// The subject in the email that will be sent to the signers. - /// - /// The subject in the email that will be sent to the signers. - [DataMember(Name = "subject", EmitDefaultValue = true)] - public string Subject { get; set; } - - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - [DataMember(Name = "test_mode", EmitDefaultValue = true)] - public bool TestMode { get; set; } - - /// - /// The title you want to assign to the SignatureRequest. - /// - /// The title you want to assign to the SignatureRequest. - [DataMember(Name = "title", EmitDefaultValue = true)] - public string Title { get; set; } - - /// - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. - /// - /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. - [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] - public bool PopulateAutoFillFields { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatureRequestEditEmbeddedWithTemplateRequest {\n"); - sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" Signers: ").Append(Signers).Append("\n"); - sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); - sb.Append(" Ccs: ").Append(Ccs).Append("\n"); - sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); - sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" TestMode: ").Append(TestMode).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" PopulateAutoFillFields: ").Append(PopulateAutoFillFields).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatureRequestEditEmbeddedWithTemplateRequest); - } - - /// - /// Returns true if SignatureRequestEditEmbeddedWithTemplateRequest instances are equal - /// - /// Instance of SignatureRequestEditEmbeddedWithTemplateRequest to be compared - /// Boolean - public bool Equals(SignatureRequestEditEmbeddedWithTemplateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.TemplateIds == input.TemplateIds || - this.TemplateIds != null && - input.TemplateIds != null && - this.TemplateIds.SequenceEqual(input.TemplateIds) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.Signers == input.Signers || - this.Signers != null && - input.Signers != null && - this.Signers.SequenceEqual(input.Signers) - ) && - ( - this.AllowDecline == input.AllowDecline || - this.AllowDecline.Equals(input.AllowDecline) - ) && - ( - this.Ccs == input.Ccs || - this.Ccs != null && - input.Ccs != null && - this.Ccs.SequenceEqual(input.Ccs) - ) && - ( - this.CustomFields == input.CustomFields || - this.CustomFields != null && - input.CustomFields != null && - this.CustomFields.SequenceEqual(input.CustomFields) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ) && - ( - this.FileUrls == input.FileUrls || - this.FileUrls != null && - input.FileUrls != null && - this.FileUrls.SequenceEqual(input.FileUrls) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.SigningOptions == input.SigningOptions || - (this.SigningOptions != null && - this.SigningOptions.Equals(input.SigningOptions)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) && - ( - this.TestMode == input.TestMode || - this.TestMode.Equals(input.TestMode) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.PopulateAutoFillFields == input.PopulateAutoFillFields || - this.PopulateAutoFillFields.Equals(input.PopulateAutoFillFields) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TemplateIds != null) - { - hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.Signers != null) - { - hashCode = (hashCode * 59) + this.Signers.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); - if (this.Ccs != null) - { - hashCode = (hashCode * 59) + this.Ccs.GetHashCode(); - } - if (this.CustomFields != null) - { - hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.FileUrls != null) - { - hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.SigningOptions != null) - { - hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PopulateAutoFillFields.GetHashCode(); - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "template_ids", - Property = "TemplateIds", - Type = "List", - Value = TemplateIds, - }); - types.Add(new OpenApiType() - { - Name = "client_id", - Property = "ClientId", - Type = "string", - Value = ClientId, - }); - types.Add(new OpenApiType() - { - Name = "signers", - Property = "Signers", - Type = "List", - Value = Signers, - }); - types.Add(new OpenApiType() - { - Name = "allow_decline", - Property = "AllowDecline", - Type = "bool", - Value = AllowDecline, - }); - types.Add(new OpenApiType() - { - Name = "ccs", - Property = "Ccs", - Type = "List", - Value = Ccs, - }); - types.Add(new OpenApiType() - { - Name = "custom_fields", - Property = "CustomFields", - Type = "List", - Value = CustomFields, - }); - types.Add(new OpenApiType() - { - Name = "files", - Property = "Files", - Type = "List", - Value = Files, - }); - types.Add(new OpenApiType() - { - Name = "file_urls", - Property = "FileUrls", - Type = "List", - Value = FileUrls, - }); - types.Add(new OpenApiType() - { - Name = "message", - Property = "Message", - Type = "string", - Value = Message, - }); - types.Add(new OpenApiType() - { - Name = "metadata", - Property = "Metadata", - Type = "Dictionary", - Value = Metadata, - }); - types.Add(new OpenApiType() - { - Name = "signing_options", - Property = "SigningOptions", - Type = "SubSigningOptions", - Value = SigningOptions, - }); - types.Add(new OpenApiType() - { - Name = "subject", - Property = "Subject", - Type = "string", - Value = Subject, - }); - types.Add(new OpenApiType() - { - Name = "test_mode", - Property = "TestMode", - Type = "bool", - Value = TestMode, - }); - types.Add(new OpenApiType() - { - Name = "title", - Property = "Title", - Type = "string", - Value = Title, - }); - types.Add(new OpenApiType() - { - Name = "populate_auto_fill_fields", - Property = "PopulateAutoFillFields", - Type = "bool", - Value = PopulateAutoFillFields, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs deleted file mode 100644 index 02b19c2..0000000 --- a/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs +++ /dev/null @@ -1,817 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// SignatureRequestEditRequest - /// - [DataContract(Name = "SignatureRequestEditRequest")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestEditRequest : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SignatureRequestEditRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. (default to false). - /// A list describing the attachments. - /// The email addresses that should be CCed.. - /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.. - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.. - /// fieldOptions. - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.. - /// Conditional Logic rules for fields defined in `form_fields_per_document`.. - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`. - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. (default to false). - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). - /// The custom message in the email that will be sent to the signers.. - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. - /// signingOptions. - /// The URL you want signers redirected to after they successfully sign.. - /// The subject in the email that will be sent to the signers.. - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). - /// The title you want to assign to the SignatureRequest.. - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. (default to false). - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.. - public SignatureRequestEditRequest(List files = default(List), List fileUrls = default(List), List signers = default(List), List groupedSigners = default(List), bool allowDecline = false, bool allowReassign = false, List attachments = default(List), List ccEmailAddresses = default(List), string clientId = default(string), List customFields = default(List), SubFieldOptions fieldOptions = default(SubFieldOptions), List formFieldGroups = default(List), List formFieldRules = default(List), List formFieldsPerDocument = default(List), bool hideTextTags = false, bool isQualifiedSignature = false, bool isEid = false, string message = default(string), Dictionary metadata = default(Dictionary), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string), bool useTextTags = false, int? expiresAt = default(int?)) - { - - this.Files = files; - this.FileUrls = fileUrls; - this.Signers = signers; - this.GroupedSigners = groupedSigners; - this.AllowDecline = allowDecline; - this.AllowReassign = allowReassign; - this.Attachments = attachments; - this.CcEmailAddresses = ccEmailAddresses; - this.ClientId = clientId; - this.CustomFields = customFields; - this.FieldOptions = fieldOptions; - this.FormFieldGroups = formFieldGroups; - this.FormFieldRules = formFieldRules; - this.FormFieldsPerDocument = formFieldsPerDocument; - this.HideTextTags = hideTextTags; - this.IsQualifiedSignature = isQualifiedSignature; - this.IsEid = isEid; - this.Message = message; - this.Metadata = metadata; - this.SigningOptions = signingOptions; - this.SigningRedirectUrl = signingRedirectUrl; - this.Subject = subject; - this.TestMode = testMode; - this.Title = title; - this.UseTextTags = useTextTags; - this.ExpiresAt = expiresAt; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static SignatureRequestEditRequest Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditRequest"); - } - - return obj; - } - - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "files", EmitDefaultValue = true)] - public List Files { get; set; } - - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "file_urls", EmitDefaultValue = true)] - public List FileUrls { get; set; } - - /// - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - /// - /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - [DataMember(Name = "signers", EmitDefaultValue = true)] - public List Signers { get; set; } - - /// - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - /// - /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. - [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] - public List GroupedSigners { get; set; } - - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - [DataMember(Name = "allow_decline", EmitDefaultValue = true)] - public bool AllowDecline { get; set; } - - /// - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. - /// - /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. - [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] - public bool AllowReassign { get; set; } - - /// - /// A list describing the attachments - /// - /// A list describing the attachments - [DataMember(Name = "attachments", EmitDefaultValue = true)] - public List Attachments { get; set; } - - /// - /// The email addresses that should be CCed. - /// - /// The email addresses that should be CCed. - [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] - public List CcEmailAddresses { get; set; } - - /// - /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. - /// - /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. - [DataMember(Name = "client_id", EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - /// - /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - [DataMember(Name = "custom_fields", EmitDefaultValue = true)] - public List CustomFields { get; set; } - - /// - /// Gets or Sets FieldOptions - /// - [DataMember(Name = "field_options", EmitDefaultValue = true)] - public SubFieldOptions FieldOptions { get; set; } - - /// - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. - /// - /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. - [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] - public List FormFieldGroups { get; set; } - - /// - /// Conditional Logic rules for fields defined in `form_fields_per_document`. - /// - /// Conditional Logic rules for fields defined in `form_fields_per_document`. - [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] - public List FormFieldRules { get; set; } - - /// - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - /// - /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] - public List FormFieldsPerDocument { get; set; } - - /// - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. - /// - /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. - [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] - public bool HideTextTags { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. - /// - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. - [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] - [Obsolete] - public bool IsQualifiedSignature { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. - /// - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. - [DataMember(Name = "is_eid", EmitDefaultValue = true)] - public bool IsEid { get; set; } - - /// - /// The custom message in the email that will be sent to the signers. - /// - /// The custom message in the email that will be sent to the signers. - [DataMember(Name = "message", EmitDefaultValue = true)] - public string Message { get; set; } - - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - [DataMember(Name = "metadata", EmitDefaultValue = true)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets SigningOptions - /// - [DataMember(Name = "signing_options", EmitDefaultValue = true)] - public SubSigningOptions SigningOptions { get; set; } - - /// - /// The URL you want signers redirected to after they successfully sign. - /// - /// The URL you want signers redirected to after they successfully sign. - [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] - public string SigningRedirectUrl { get; set; } - - /// - /// The subject in the email that will be sent to the signers. - /// - /// The subject in the email that will be sent to the signers. - [DataMember(Name = "subject", EmitDefaultValue = true)] - public string Subject { get; set; } - - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - [DataMember(Name = "test_mode", EmitDefaultValue = true)] - public bool TestMode { get; set; } - - /// - /// The title you want to assign to the SignatureRequest. - /// - /// The title you want to assign to the SignatureRequest. - [DataMember(Name = "title", EmitDefaultValue = true)] - public string Title { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. - /// - /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. - [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] - public bool UseTextTags { get; set; } - - /// - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - /// - /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - [DataMember(Name = "expires_at", EmitDefaultValue = true)] - public int? ExpiresAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatureRequestEditRequest {\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); - sb.Append(" Signers: ").Append(Signers).Append("\n"); - sb.Append(" GroupedSigners: ").Append(GroupedSigners).Append("\n"); - sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); - sb.Append(" AllowReassign: ").Append(AllowReassign).Append("\n"); - sb.Append(" Attachments: ").Append(Attachments).Append("\n"); - sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); - sb.Append(" FieldOptions: ").Append(FieldOptions).Append("\n"); - sb.Append(" FormFieldGroups: ").Append(FormFieldGroups).Append("\n"); - sb.Append(" FormFieldRules: ").Append(FormFieldRules).Append("\n"); - sb.Append(" FormFieldsPerDocument: ").Append(FormFieldsPerDocument).Append("\n"); - sb.Append(" HideTextTags: ").Append(HideTextTags).Append("\n"); - sb.Append(" IsQualifiedSignature: ").Append(IsQualifiedSignature).Append("\n"); - sb.Append(" IsEid: ").Append(IsEid).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); - sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); - sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" TestMode: ").Append(TestMode).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" UseTextTags: ").Append(UseTextTags).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatureRequestEditRequest); - } - - /// - /// Returns true if SignatureRequestEditRequest instances are equal - /// - /// Instance of SignatureRequestEditRequest to be compared - /// Boolean - public bool Equals(SignatureRequestEditRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ) && - ( - this.FileUrls == input.FileUrls || - this.FileUrls != null && - input.FileUrls != null && - this.FileUrls.SequenceEqual(input.FileUrls) - ) && - ( - this.Signers == input.Signers || - this.Signers != null && - input.Signers != null && - this.Signers.SequenceEqual(input.Signers) - ) && - ( - this.GroupedSigners == input.GroupedSigners || - this.GroupedSigners != null && - input.GroupedSigners != null && - this.GroupedSigners.SequenceEqual(input.GroupedSigners) - ) && - ( - this.AllowDecline == input.AllowDecline || - this.AllowDecline.Equals(input.AllowDecline) - ) && - ( - this.AllowReassign == input.AllowReassign || - this.AllowReassign.Equals(input.AllowReassign) - ) && - ( - this.Attachments == input.Attachments || - this.Attachments != null && - input.Attachments != null && - this.Attachments.SequenceEqual(input.Attachments) - ) && - ( - this.CcEmailAddresses == input.CcEmailAddresses || - this.CcEmailAddresses != null && - input.CcEmailAddresses != null && - this.CcEmailAddresses.SequenceEqual(input.CcEmailAddresses) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.CustomFields == input.CustomFields || - this.CustomFields != null && - input.CustomFields != null && - this.CustomFields.SequenceEqual(input.CustomFields) - ) && - ( - this.FieldOptions == input.FieldOptions || - (this.FieldOptions != null && - this.FieldOptions.Equals(input.FieldOptions)) - ) && - ( - this.FormFieldGroups == input.FormFieldGroups || - this.FormFieldGroups != null && - input.FormFieldGroups != null && - this.FormFieldGroups.SequenceEqual(input.FormFieldGroups) - ) && - ( - this.FormFieldRules == input.FormFieldRules || - this.FormFieldRules != null && - input.FormFieldRules != null && - this.FormFieldRules.SequenceEqual(input.FormFieldRules) - ) && - ( - this.FormFieldsPerDocument == input.FormFieldsPerDocument || - this.FormFieldsPerDocument != null && - input.FormFieldsPerDocument != null && - this.FormFieldsPerDocument.SequenceEqual(input.FormFieldsPerDocument) - ) && - ( - this.HideTextTags == input.HideTextTags || - this.HideTextTags.Equals(input.HideTextTags) - ) && - ( - this.IsQualifiedSignature == input.IsQualifiedSignature || - this.IsQualifiedSignature.Equals(input.IsQualifiedSignature) - ) && - ( - this.IsEid == input.IsEid || - this.IsEid.Equals(input.IsEid) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.SigningOptions == input.SigningOptions || - (this.SigningOptions != null && - this.SigningOptions.Equals(input.SigningOptions)) - ) && - ( - this.SigningRedirectUrl == input.SigningRedirectUrl || - (this.SigningRedirectUrl != null && - this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) && - ( - this.TestMode == input.TestMode || - this.TestMode.Equals(input.TestMode) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.UseTextTags == input.UseTextTags || - this.UseTextTags.Equals(input.UseTextTags) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.FileUrls != null) - { - hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); - } - if (this.Signers != null) - { - hashCode = (hashCode * 59) + this.Signers.GetHashCode(); - } - if (this.GroupedSigners != null) - { - hashCode = (hashCode * 59) + this.GroupedSigners.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowReassign.GetHashCode(); - if (this.Attachments != null) - { - hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); - } - if (this.CcEmailAddresses != null) - { - hashCode = (hashCode * 59) + this.CcEmailAddresses.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.CustomFields != null) - { - hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); - } - if (this.FieldOptions != null) - { - hashCode = (hashCode * 59) + this.FieldOptions.GetHashCode(); - } - if (this.FormFieldGroups != null) - { - hashCode = (hashCode * 59) + this.FormFieldGroups.GetHashCode(); - } - if (this.FormFieldRules != null) - { - hashCode = (hashCode * 59) + this.FormFieldRules.GetHashCode(); - } - if (this.FormFieldsPerDocument != null) - { - hashCode = (hashCode * 59) + this.FormFieldsPerDocument.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HideTextTags.GetHashCode(); - hashCode = (hashCode * 59) + this.IsQualifiedSignature.GetHashCode(); - hashCode = (hashCode * 59) + this.IsEid.GetHashCode(); - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.SigningOptions != null) - { - hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); - } - if (this.SigningRedirectUrl != null) - { - hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UseTextTags.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "files", - Property = "Files", - Type = "List", - Value = Files, - }); - types.Add(new OpenApiType() - { - Name = "file_urls", - Property = "FileUrls", - Type = "List", - Value = FileUrls, - }); - types.Add(new OpenApiType() - { - Name = "signers", - Property = "Signers", - Type = "List", - Value = Signers, - }); - types.Add(new OpenApiType() - { - Name = "grouped_signers", - Property = "GroupedSigners", - Type = "List", - Value = GroupedSigners, - }); - types.Add(new OpenApiType() - { - Name = "allow_decline", - Property = "AllowDecline", - Type = "bool", - Value = AllowDecline, - }); - types.Add(new OpenApiType() - { - Name = "allow_reassign", - Property = "AllowReassign", - Type = "bool", - Value = AllowReassign, - }); - types.Add(new OpenApiType() - { - Name = "attachments", - Property = "Attachments", - Type = "List", - Value = Attachments, - }); - types.Add(new OpenApiType() - { - Name = "cc_email_addresses", - Property = "CcEmailAddresses", - Type = "List", - Value = CcEmailAddresses, - }); - types.Add(new OpenApiType() - { - Name = "client_id", - Property = "ClientId", - Type = "string", - Value = ClientId, - }); - types.Add(new OpenApiType() - { - Name = "custom_fields", - Property = "CustomFields", - Type = "List", - Value = CustomFields, - }); - types.Add(new OpenApiType() - { - Name = "field_options", - Property = "FieldOptions", - Type = "SubFieldOptions", - Value = FieldOptions, - }); - types.Add(new OpenApiType() - { - Name = "form_field_groups", - Property = "FormFieldGroups", - Type = "List", - Value = FormFieldGroups, - }); - types.Add(new OpenApiType() - { - Name = "form_field_rules", - Property = "FormFieldRules", - Type = "List", - Value = FormFieldRules, - }); - types.Add(new OpenApiType() - { - Name = "form_fields_per_document", - Property = "FormFieldsPerDocument", - Type = "List", - Value = FormFieldsPerDocument, - }); - types.Add(new OpenApiType() - { - Name = "hide_text_tags", - Property = "HideTextTags", - Type = "bool", - Value = HideTextTags, - }); - types.Add(new OpenApiType() - { - Name = "is_qualified_signature", - Property = "IsQualifiedSignature", - Type = "bool", - Value = IsQualifiedSignature, - }); - types.Add(new OpenApiType() - { - Name = "is_eid", - Property = "IsEid", - Type = "bool", - Value = IsEid, - }); - types.Add(new OpenApiType() - { - Name = "message", - Property = "Message", - Type = "string", - Value = Message, - }); - types.Add(new OpenApiType() - { - Name = "metadata", - Property = "Metadata", - Type = "Dictionary", - Value = Metadata, - }); - types.Add(new OpenApiType() - { - Name = "signing_options", - Property = "SigningOptions", - Type = "SubSigningOptions", - Value = SigningOptions, - }); - types.Add(new OpenApiType() - { - Name = "signing_redirect_url", - Property = "SigningRedirectUrl", - Type = "string", - Value = SigningRedirectUrl, - }); - types.Add(new OpenApiType() - { - Name = "subject", - Property = "Subject", - Type = "string", - Value = Subject, - }); - types.Add(new OpenApiType() - { - Name = "test_mode", - Property = "TestMode", - Type = "bool", - Value = TestMode, - }); - types.Add(new OpenApiType() - { - Name = "title", - Property = "Title", - Type = "string", - Value = Title, - }); - types.Add(new OpenApiType() - { - Name = "use_text_tags", - Property = "UseTextTags", - Type = "bool", - Value = UseTextTags, - }); - types.Add(new OpenApiType() - { - Name = "expires_at", - Property = "ExpiresAt", - Type = "int?", - Value = ExpiresAt, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs deleted file mode 100644 index 4370033..0000000 --- a/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs +++ /dev/null @@ -1,602 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// SignatureRequestEditWithTemplateRequest - /// - [DataContract(Name = "SignatureRequestEditWithTemplateRequest")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class SignatureRequestEditWithTemplateRequest : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SignatureRequestEditWithTemplateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. (required). - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). - /// Add CC email recipients. Required when a CC role exists for the Template.. - /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. - /// An array defining values and options for custom fields. Required when a custom field exists in the Template.. - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). - /// The custom message in the email that will be sent to the signers.. - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. - /// Add Signers to your Templated-based Signature Request. (required). - /// signingOptions. - /// The URL you want signers redirected to after they successfully sign.. - /// The subject in the email that will be sent to the signers.. - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). - /// The title you want to assign to the SignatureRequest.. - public SignatureRequestEditWithTemplateRequest(List templateIds = default(List), bool allowDecline = false, List ccs = default(List), string clientId = default(string), List customFields = default(List), List files = default(List), List fileUrls = default(List), bool isQualifiedSignature = false, bool isEid = false, string message = default(string), Dictionary metadata = default(Dictionary), List signers = default(List), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string)) - { - - // to ensure "templateIds" is required (not null) - if (templateIds == null) - { - throw new ArgumentNullException("templateIds is a required property for SignatureRequestEditWithTemplateRequest and cannot be null"); - } - this.TemplateIds = templateIds; - // to ensure "signers" is required (not null) - if (signers == null) - { - throw new ArgumentNullException("signers is a required property for SignatureRequestEditWithTemplateRequest and cannot be null"); - } - this.Signers = signers; - this.AllowDecline = allowDecline; - this.Ccs = ccs; - this.ClientId = clientId; - this.CustomFields = customFields; - this.Files = files; - this.FileUrls = fileUrls; - this.IsQualifiedSignature = isQualifiedSignature; - this.IsEid = isEid; - this.Message = message; - this.Metadata = metadata; - this.SigningOptions = signingOptions; - this.SigningRedirectUrl = signingRedirectUrl; - this.Subject = subject; - this.TestMode = testMode; - this.Title = title; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static SignatureRequestEditWithTemplateRequest Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditWithTemplateRequest"); - } - - return obj; - } - - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - /// - /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. - [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] - public List TemplateIds { get; set; } - - /// - /// Add Signers to your Templated-based Signature Request. - /// - /// Add Signers to your Templated-based Signature Request. - [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] - public List Signers { get; set; } - - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - /// - /// Allows signers to decline to sign a document if `true`. Defaults to `false`. - [DataMember(Name = "allow_decline", EmitDefaultValue = true)] - public bool AllowDecline { get; set; } - - /// - /// Add CC email recipients. Required when a CC role exists for the Template. - /// - /// Add CC email recipients. Required when a CC role exists for the Template. - [DataMember(Name = "ccs", EmitDefaultValue = true)] - public List Ccs { get; set; } - - /// - /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. - /// - /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. - [DataMember(Name = "client_id", EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// An array defining values and options for custom fields. Required when a custom field exists in the Template. - /// - /// An array defining values and options for custom fields. Required when a custom field exists in the Template. - [DataMember(Name = "custom_fields", EmitDefaultValue = true)] - public List CustomFields { get; set; } - - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "files", EmitDefaultValue = true)] - public List Files { get; set; } - - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - /// - /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. - [DataMember(Name = "file_urls", EmitDefaultValue = true)] - public List FileUrls { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. - /// - /// Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. - [DataMember(Name = "is_qualified_signature", EmitDefaultValue = true)] - [Obsolete] - public bool IsQualifiedSignature { get; set; } - - /// - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. - /// - /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. - [DataMember(Name = "is_eid", EmitDefaultValue = true)] - public bool IsEid { get; set; } - - /// - /// The custom message in the email that will be sent to the signers. - /// - /// The custom message in the email that will be sent to the signers. - [DataMember(Name = "message", EmitDefaultValue = true)] - public string Message { get; set; } - - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - /// - /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. - [DataMember(Name = "metadata", EmitDefaultValue = true)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets SigningOptions - /// - [DataMember(Name = "signing_options", EmitDefaultValue = true)] - public SubSigningOptions SigningOptions { get; set; } - - /// - /// The URL you want signers redirected to after they successfully sign. - /// - /// The URL you want signers redirected to after they successfully sign. - [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] - public string SigningRedirectUrl { get; set; } - - /// - /// The subject in the email that will be sent to the signers. - /// - /// The subject in the email that will be sent to the signers. - [DataMember(Name = "subject", EmitDefaultValue = true)] - public string Subject { get; set; } - - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - /// - /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. - [DataMember(Name = "test_mode", EmitDefaultValue = true)] - public bool TestMode { get; set; } - - /// - /// The title you want to assign to the SignatureRequest. - /// - /// The title you want to assign to the SignatureRequest. - [DataMember(Name = "title", EmitDefaultValue = true)] - public string Title { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatureRequestEditWithTemplateRequest {\n"); - sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); - sb.Append(" Signers: ").Append(Signers).Append("\n"); - sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); - sb.Append(" Ccs: ").Append(Ccs).Append("\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); - sb.Append(" IsQualifiedSignature: ").Append(IsQualifiedSignature).Append("\n"); - sb.Append(" IsEid: ").Append(IsEid).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); - sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); - sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" TestMode: ").Append(TestMode).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatureRequestEditWithTemplateRequest); - } - - /// - /// Returns true if SignatureRequestEditWithTemplateRequest instances are equal - /// - /// Instance of SignatureRequestEditWithTemplateRequest to be compared - /// Boolean - public bool Equals(SignatureRequestEditWithTemplateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.TemplateIds == input.TemplateIds || - this.TemplateIds != null && - input.TemplateIds != null && - this.TemplateIds.SequenceEqual(input.TemplateIds) - ) && - ( - this.Signers == input.Signers || - this.Signers != null && - input.Signers != null && - this.Signers.SequenceEqual(input.Signers) - ) && - ( - this.AllowDecline == input.AllowDecline || - this.AllowDecline.Equals(input.AllowDecline) - ) && - ( - this.Ccs == input.Ccs || - this.Ccs != null && - input.Ccs != null && - this.Ccs.SequenceEqual(input.Ccs) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.CustomFields == input.CustomFields || - this.CustomFields != null && - input.CustomFields != null && - this.CustomFields.SequenceEqual(input.CustomFields) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ) && - ( - this.FileUrls == input.FileUrls || - this.FileUrls != null && - input.FileUrls != null && - this.FileUrls.SequenceEqual(input.FileUrls) - ) && - ( - this.IsQualifiedSignature == input.IsQualifiedSignature || - this.IsQualifiedSignature.Equals(input.IsQualifiedSignature) - ) && - ( - this.IsEid == input.IsEid || - this.IsEid.Equals(input.IsEid) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.SigningOptions == input.SigningOptions || - (this.SigningOptions != null && - this.SigningOptions.Equals(input.SigningOptions)) - ) && - ( - this.SigningRedirectUrl == input.SigningRedirectUrl || - (this.SigningRedirectUrl != null && - this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) && - ( - this.TestMode == input.TestMode || - this.TestMode.Equals(input.TestMode) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TemplateIds != null) - { - hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); - } - if (this.Signers != null) - { - hashCode = (hashCode * 59) + this.Signers.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); - if (this.Ccs != null) - { - hashCode = (hashCode * 59) + this.Ccs.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.CustomFields != null) - { - hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.FileUrls != null) - { - hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsQualifiedSignature.GetHashCode(); - hashCode = (hashCode * 59) + this.IsEid.GetHashCode(); - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.SigningOptions != null) - { - hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); - } - if (this.SigningRedirectUrl != null) - { - hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "template_ids", - Property = "TemplateIds", - Type = "List", - Value = TemplateIds, - }); - types.Add(new OpenApiType() - { - Name = "signers", - Property = "Signers", - Type = "List", - Value = Signers, - }); - types.Add(new OpenApiType() - { - Name = "allow_decline", - Property = "AllowDecline", - Type = "bool", - Value = AllowDecline, - }); - types.Add(new OpenApiType() - { - Name = "ccs", - Property = "Ccs", - Type = "List", - Value = Ccs, - }); - types.Add(new OpenApiType() - { - Name = "client_id", - Property = "ClientId", - Type = "string", - Value = ClientId, - }); - types.Add(new OpenApiType() - { - Name = "custom_fields", - Property = "CustomFields", - Type = "List", - Value = CustomFields, - }); - types.Add(new OpenApiType() - { - Name = "files", - Property = "Files", - Type = "List", - Value = Files, - }); - types.Add(new OpenApiType() - { - Name = "file_urls", - Property = "FileUrls", - Type = "List", - Value = FileUrls, - }); - types.Add(new OpenApiType() - { - Name = "is_qualified_signature", - Property = "IsQualifiedSignature", - Type = "bool", - Value = IsQualifiedSignature, - }); - types.Add(new OpenApiType() - { - Name = "is_eid", - Property = "IsEid", - Type = "bool", - Value = IsEid, - }); - types.Add(new OpenApiType() - { - Name = "message", - Property = "Message", - Type = "string", - Value = Message, - }); - types.Add(new OpenApiType() - { - Name = "metadata", - Property = "Metadata", - Type = "Dictionary", - Value = Metadata, - }); - types.Add(new OpenApiType() - { - Name = "signing_options", - Property = "SigningOptions", - Type = "SubSigningOptions", - Value = SigningOptions, - }); - types.Add(new OpenApiType() - { - Name = "signing_redirect_url", - Property = "SigningRedirectUrl", - Type = "string", - Value = SigningRedirectUrl, - }); - types.Add(new OpenApiType() - { - Name = "subject", - Property = "Subject", - Type = "string", - Value = Subject, - }); - types.Add(new OpenApiType() - { - Name = "test_mode", - Property = "TestMode", - Type = "bool", - Value = TestMode, - }); - types.Add(new OpenApiType() - { - Name = "title", - Property = "Title", - Type = "string", - Value = Title, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Message (string) maxLength - if (this.Message != null && this.Message.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); - } - - // Subject (string) maxLength - if (this.Subject != null && this.Subject.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); - } - - // Title (string) maxLength - if (this.Title != null && this.Title.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); - } - - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs b/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs index a38eaa0..72d4ebb 100644 --- a/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs +++ b/src/Dropbox.Sign/Model/SubWhiteLabelingOptions.cs @@ -66,51 +66,51 @@ protected SubWhiteLabelingOptions() { } /// /// Initializes a new instance of the class. /// - /// headerBackgroundColor (default to "#1A1A1A"). + /// headerBackgroundColor (default to "#1a1a1a"). /// legalVersion (default to LegalVersionEnum.Terms1). - /// linkColor (default to "#00B3E6"). - /// pageBackgroundColor (default to "#F7F8F9"). - /// primaryButtonColor (default to "#00B3E6"). - /// primaryButtonColorHover (default to "#00B3E6"). - /// primaryButtonTextColor (default to "#FFFFFF"). - /// primaryButtonTextColorHover (default to "#FFFFFF"). - /// secondaryButtonColor (default to "#FFFFFF"). - /// secondaryButtonColorHover (default to "#FFFFFF"). - /// secondaryButtonTextColor (default to "#00B3E6"). - /// secondaryButtonTextColorHover (default to "#00B3E6"). + /// linkColor (default to "#0061FE"). + /// pageBackgroundColor (default to "#f7f8f9"). + /// primaryButtonColor (default to "#0061FE"). + /// primaryButtonColorHover (default to "#0061FE"). + /// primaryButtonTextColor (default to "#ffffff"). + /// primaryButtonTextColorHover (default to "#ffffff"). + /// secondaryButtonColor (default to "#ffffff"). + /// secondaryButtonColorHover (default to "#ffffff"). + /// secondaryButtonTextColor (default to "#0061FE"). + /// secondaryButtonTextColorHover (default to "#0061FE"). /// textColor1 (default to "#808080"). - /// textColor2 (default to "#FFFFFF"). + /// textColor2 (default to "#ffffff"). /// Resets white labeling options to defaults. Only useful when updating an API App.. - public SubWhiteLabelingOptions(string headerBackgroundColor = @"#1A1A1A", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = @"#00B3E6", string pageBackgroundColor = @"#F7F8F9", string primaryButtonColor = @"#00B3E6", string primaryButtonColorHover = @"#00B3E6", string primaryButtonTextColor = @"#FFFFFF", string primaryButtonTextColorHover = @"#FFFFFF", string secondaryButtonColor = @"#FFFFFF", string secondaryButtonColorHover = @"#FFFFFF", string secondaryButtonTextColor = @"#00B3E6", string secondaryButtonTextColorHover = @"#00B3E6", string textColor1 = @"#808080", string textColor2 = @"#FFFFFF", bool resetToDefault = default(bool)) + public SubWhiteLabelingOptions(string headerBackgroundColor = @"#1a1a1a", LegalVersionEnum? legalVersion = LegalVersionEnum.Terms1, string linkColor = @"#0061FE", string pageBackgroundColor = @"#f7f8f9", string primaryButtonColor = @"#0061FE", string primaryButtonColorHover = @"#0061FE", string primaryButtonTextColor = @"#ffffff", string primaryButtonTextColorHover = @"#ffffff", string secondaryButtonColor = @"#ffffff", string secondaryButtonColorHover = @"#ffffff", string secondaryButtonTextColor = @"#0061FE", string secondaryButtonTextColorHover = @"#0061FE", string textColor1 = @"#808080", string textColor2 = @"#ffffff", bool resetToDefault = default(bool)) { // use default value if no "headerBackgroundColor" provided - this.HeaderBackgroundColor = headerBackgroundColor ?? "#1A1A1A"; + this.HeaderBackgroundColor = headerBackgroundColor ?? "#1a1a1a"; this.LegalVersion = legalVersion; // use default value if no "linkColor" provided - this.LinkColor = linkColor ?? "#00B3E6"; + this.LinkColor = linkColor ?? "#0061FE"; // use default value if no "pageBackgroundColor" provided - this.PageBackgroundColor = pageBackgroundColor ?? "#F7F8F9"; + this.PageBackgroundColor = pageBackgroundColor ?? "#f7f8f9"; // use default value if no "primaryButtonColor" provided - this.PrimaryButtonColor = primaryButtonColor ?? "#00B3E6"; + this.PrimaryButtonColor = primaryButtonColor ?? "#0061FE"; // use default value if no "primaryButtonColorHover" provided - this.PrimaryButtonColorHover = primaryButtonColorHover ?? "#00B3E6"; + this.PrimaryButtonColorHover = primaryButtonColorHover ?? "#0061FE"; // use default value if no "primaryButtonTextColor" provided - this.PrimaryButtonTextColor = primaryButtonTextColor ?? "#FFFFFF"; + this.PrimaryButtonTextColor = primaryButtonTextColor ?? "#ffffff"; // use default value if no "primaryButtonTextColorHover" provided - this.PrimaryButtonTextColorHover = primaryButtonTextColorHover ?? "#FFFFFF"; + this.PrimaryButtonTextColorHover = primaryButtonTextColorHover ?? "#ffffff"; // use default value if no "secondaryButtonColor" provided - this.SecondaryButtonColor = secondaryButtonColor ?? "#FFFFFF"; + this.SecondaryButtonColor = secondaryButtonColor ?? "#ffffff"; // use default value if no "secondaryButtonColorHover" provided - this.SecondaryButtonColorHover = secondaryButtonColorHover ?? "#FFFFFF"; + this.SecondaryButtonColorHover = secondaryButtonColorHover ?? "#ffffff"; // use default value if no "secondaryButtonTextColor" provided - this.SecondaryButtonTextColor = secondaryButtonTextColor ?? "#00B3E6"; + this.SecondaryButtonTextColor = secondaryButtonTextColor ?? "#0061FE"; // use default value if no "secondaryButtonTextColorHover" provided - this.SecondaryButtonTextColorHover = secondaryButtonTextColorHover ?? "#00B3E6"; + this.SecondaryButtonTextColorHover = secondaryButtonTextColorHover ?? "#0061FE"; // use default value if no "textColor1" provided this.TextColor1 = textColor1 ?? "#808080"; // use default value if no "textColor2" provided - this.TextColor2 = textColor2 ?? "#FFFFFF"; + this.TextColor2 = textColor2 ?? "#ffffff"; this.ResetToDefault = resetToDefault; } diff --git a/src/Dropbox.Sign/Model/TemplateResponse.cs b/src/Dropbox.Sign/Model/TemplateResponse.cs index 6ec3587..f0124cc 100644 --- a/src/Dropbox.Sign/Model/TemplateResponse.cs +++ b/src/Dropbox.Sign/Model/TemplateResponse.cs @@ -45,7 +45,7 @@ protected TemplateResponse() { } /// The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.. /// The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.. /// Time the template was last updated.. - /// `true` if this template was created using an embedded flow, `false` if it was created on our website.. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.. /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member.. /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).. /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests.. @@ -56,7 +56,8 @@ protected TemplateResponse() { } /// Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. /// An array of the Accounts that can use this Template.. - public TemplateResponse(string templateId = default(string), string title = default(string), string message = default(string), int updatedAt = default(int), bool? isEmbedded = default(bool?), bool? isCreator = default(bool?), bool? canEdit = default(bool?), bool? isLocked = default(bool?), Object metadata = default(Object), List signerRoles = default(List), List ccRoles = default(List), List documents = default(List), List customFields = default(List), List namedFormFields = default(List), List accounts = default(List)) + /// Signer attachments.. + public TemplateResponse(string templateId = default(string), string title = default(string), string message = default(string), int updatedAt = default(int), bool? isEmbedded = default(bool?), bool isCreator = default(bool), bool canEdit = default(bool), bool isLocked = default(bool), Object metadata = default(Object), List signerRoles = default(List), List ccRoles = default(List), List documents = default(List), List customFields = default(List), List namedFormFields = default(List), List accounts = default(List), List attachments = default(List)) { this.TemplateId = templateId; @@ -74,6 +75,7 @@ protected TemplateResponse() { } this.CustomFields = customFields; this.NamedFormFields = namedFormFields; this.Accounts = accounts; + this.Attachments = attachments; } /// @@ -121,9 +123,9 @@ public static TemplateResponse Init(string jsonData) public int UpdatedAt { get; set; } /// - /// `true` if this template was created using an embedded flow, `false` if it was created on our website. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. /// - /// `true` if this template was created using an embedded flow, `false` if it was created on our website. + /// `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. [DataMember(Name = "is_embedded", EmitDefaultValue = true)] public bool? IsEmbedded { get; set; } @@ -132,21 +134,21 @@ public static TemplateResponse Init(string jsonData) /// /// `true` if you are the owner of this template, `false` if it's been shared with you by a team member. [DataMember(Name = "is_creator", EmitDefaultValue = true)] - public bool? IsCreator { get; set; } + public bool IsCreator { get; set; } /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). /// /// Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). [DataMember(Name = "can_edit", EmitDefaultValue = true)] - public bool? CanEdit { get; set; } + public bool CanEdit { get; set; } /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. /// /// Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. [DataMember(Name = "is_locked", EmitDefaultValue = true)] - public bool? IsLocked { get; set; } + public bool IsLocked { get; set; } /// /// The metadata attached to the template. @@ -199,6 +201,13 @@ public static TemplateResponse Init(string jsonData) [DataMember(Name = "accounts", EmitDefaultValue = true)] public List Accounts { get; set; } + /// + /// Signer attachments. + /// + /// Signer attachments. + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + /// /// Returns the string presentation of the object /// @@ -222,6 +231,7 @@ public override string ToString() sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); sb.Append(" NamedFormFields: ").Append(NamedFormFields).Append("\n"); sb.Append(" Accounts: ").Append(Accounts).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -283,18 +293,15 @@ public bool Equals(TemplateResponse input) ) && ( this.IsCreator == input.IsCreator || - (this.IsCreator != null && - this.IsCreator.Equals(input.IsCreator)) + this.IsCreator.Equals(input.IsCreator) ) && ( this.CanEdit == input.CanEdit || - (this.CanEdit != null && - this.CanEdit.Equals(input.CanEdit)) + this.CanEdit.Equals(input.CanEdit) ) && ( this.IsLocked == input.IsLocked || - (this.IsLocked != null && - this.IsLocked.Equals(input.IsLocked)) + this.IsLocked.Equals(input.IsLocked) ) && ( this.Metadata == input.Metadata || @@ -336,6 +343,12 @@ public bool Equals(TemplateResponse input) this.Accounts != null && input.Accounts != null && this.Accounts.SequenceEqual(input.Accounts) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) ); } @@ -365,18 +378,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.IsEmbedded.GetHashCode(); } - if (this.IsCreator != null) - { - hashCode = (hashCode * 59) + this.IsCreator.GetHashCode(); - } - if (this.CanEdit != null) - { - hashCode = (hashCode * 59) + this.CanEdit.GetHashCode(); - } - if (this.IsLocked != null) - { - hashCode = (hashCode * 59) + this.IsLocked.GetHashCode(); - } + hashCode = (hashCode * 59) + this.IsCreator.GetHashCode(); + hashCode = (hashCode * 59) + this.CanEdit.GetHashCode(); + hashCode = (hashCode * 59) + this.IsLocked.GetHashCode(); if (this.Metadata != null) { hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); @@ -405,6 +409,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); } + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } return hashCode; } } @@ -460,21 +468,21 @@ public List GetOpenApiTypes() { Name = "is_creator", Property = "IsCreator", - Type = "bool?", + Type = "bool", Value = IsCreator, }); types.Add(new OpenApiType() { Name = "can_edit", Property = "CanEdit", - Type = "bool?", + Type = "bool", Value = CanEdit, }); types.Add(new OpenApiType() { Name = "is_locked", Property = "IsLocked", - Type = "bool?", + Type = "bool", Value = IsLocked, }); types.Add(new OpenApiType() @@ -526,6 +534,13 @@ public List GetOpenApiTypes() Type = "List", Value = Accounts, }); + types.Add(new OpenApiType() + { + Name = "attachments", + Property = "Attachments", + Type = "List", + Value = Attachments, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs b/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs deleted file mode 100644 index 39e50fb..0000000 --- a/src/Dropbox.Sign/Model/TemplateResponseCustomField.cs +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// TemplateResponseCustomField - /// - [DataContract(Name = "TemplateResponseCustomField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseCustomField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 1, - - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 2 - - } - - - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseCustomField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Custom Field.. - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseCustomField(string name = default(string), TypeEnum? type = default(TypeEnum?), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.Name = name; - this.Type = type; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseCustomField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseCustomField"); - } - - return obj; - } - - /// - /// The name of the Custom Field. - /// - /// The name of the Custom Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateResponseCustomField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateResponseCustomField); - } - - /// - /// Returns true if TemplateResponseCustomField instances are equal - /// - /// Instance of TemplateResponseCustomField to be compared - /// Boolean - public bool Equals(TemplateResponseCustomField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs deleted file mode 100644 index 958f759..0000000 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentCustomField.cs +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// TemplateResponseDocumentCustomField - /// - [DataContract(Name = "TemplateResponseDocumentCustomField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentCustomField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 1, - - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 2 - - } - - - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentCustomField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Custom Field.. - /// The type of this Custom Field. Only `text` and `checkbox` are currently supported.. - /// The signer of the Custom Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.. - /// reusableFormId. - public TemplateResponseDocumentCustomField(string name = default(string), TypeEnum? type = default(TypeEnum?), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string), Object namedFormFields = default(Object), string reusableFormId = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - this.NamedFormFields = namedFormFields; - this.ReusableFormId = reusableFormId; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentCustomField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentCustomField"); - } - - return obj; - } - - /// - /// The name of the Custom Field. - /// - /// The name of the Custom Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The signer of the Custom Field. - /// - /// The signer of the Custom Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { get; set; } - - /// - /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. - /// - /// Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. - [DataMember(Name = "named_form_fields", EmitDefaultValue = true)] - [Obsolete] - public Object NamedFormFields { get; set; } - - /// - /// Gets or Sets ReusableFormId - /// - [DataMember(Name = "reusable_form_id", EmitDefaultValue = true)] - [Obsolete] - public string ReusableFormId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateResponseDocumentCustomField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); - sb.Append(" NamedFormFields: ").Append(NamedFormFields).Append("\n"); - sb.Append(" ReusableFormId: ").Append(ReusableFormId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateResponseDocumentCustomField); - } - - /// - /// Returns true if TemplateResponseDocumentCustomField instances are equal - /// - /// Instance of TemplateResponseDocumentCustomField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentCustomField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ) && - ( - this.NamedFormFields == input.NamedFormFields || - (this.NamedFormFields != null && - this.NamedFormFields.Equals(input.NamedFormFields)) - ) && - ( - this.ReusableFormId == input.ReusableFormId || - (this.ReusableFormId != null && - this.ReusableFormId.Equals(input.ReusableFormId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - if (this.NamedFormFields != null) - { - hashCode = (hashCode * 59) + this.NamedFormFields.GetHashCode(); - } - if (this.ReusableFormId != null) - { - hashCode = (hashCode * 59) + this.ReusableFormId.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - types.Add(new OpenApiType() - { - Name = "named_form_fields", - Property = "NamedFormFields", - Type = "Object", - Value = NamedFormFields, - }); - types.Add(new OpenApiType() - { - Name = "reusable_form_id", - Property = "ReusableFormId", - Type = "string", - Value = ReusableFormId, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs deleted file mode 100644 index 9a84275..0000000 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormField.cs +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// TemplateResponseDocumentFormField - /// - [DataContract(Name = "TemplateResponseDocumentFormField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentFormField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Checkbox for value: checkbox - /// - [EnumMember(Value = "checkbox")] - Checkbox = 1, - - /// - /// Enum CheckboxMerge for value: checkbox-merge - /// - [EnumMember(Value = "checkbox-merge")] - CheckboxMerge = 2, - - /// - /// Enum DateSigned for value: date_signed - /// - [EnumMember(Value = "date_signed")] - DateSigned = 3, - - /// - /// Enum Dropdown for value: dropdown - /// - [EnumMember(Value = "dropdown")] - Dropdown = 4, - - /// - /// Enum Hyperlink for value: hyperlink - /// - [EnumMember(Value = "hyperlink")] - Hyperlink = 5, - - /// - /// Enum Initials for value: initials - /// - [EnumMember(Value = "initials")] - Initials = 6, - - /// - /// Enum Signature for value: signature - /// - [EnumMember(Value = "signature")] - Signature = 7, - - /// - /// Enum Radio for value: radio - /// - [EnumMember(Value = "radio")] - Radio = 8, - - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 9, - - /// - /// Enum TextMerge for value: text-merge - /// - [EnumMember(Value = "text-merge")] - TextMerge = 10 - - } - - - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this form field. See [field types](/api/reference/constants/#field-types). - [DataMember(Name = "type", EmitDefaultValue = true)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentFormField() { } - /// - /// Initializes a new instance of the class. - /// - /// A unique id for the form field.. - /// The name of the form field.. - /// The type of this form field. See [field types](/api/reference/constants/#field-types).. - /// The signer of the Form Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseDocumentFormField(string apiId = default(string), string name = default(string), TypeEnum? type = default(TypeEnum?), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.ApiId = apiId; - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentFormField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentFormField"); - } - - return obj; - } - - /// - /// A unique id for the form field. - /// - /// A unique id for the form field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the form field. - /// - /// The name of the form field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The signer of the Form Field. - /// - /// The signer of the Form Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateResponseDocumentFormField {\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateResponseDocumentFormField); - } - - /// - /// Returns true if TemplateResponseDocumentFormField instances are equal - /// - /// Instance of TemplateResponseDocumentFormField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentFormField input) - { - if (input == null) - { - return false; - } - return - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs index 45f1eef..4169013 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldBase.cs @@ -60,8 +60,7 @@ protected TemplateResponseDocumentFormFieldBase() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldBase(string apiId = default(string), string name = default(string), string type = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldBase(string apiId = default(string), string name = default(string), string type = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { // to ensure "type" is required (not null) @@ -78,7 +77,6 @@ protected TemplateResponseDocumentFormFieldBase() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; } /// @@ -164,13 +162,6 @@ public object Signer [DataMember(Name = "required", EmitDefaultValue = true)] public bool Required { get; set; } - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - /// /// Returns the string presentation of the object /// @@ -188,7 +179,6 @@ public override string ToString() sb.Append(" Width: ").Append(Width).Append("\n"); sb.Append(" Height: ").Append(Height).Append("\n"); sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -263,11 +253,6 @@ public bool Equals(TemplateResponseDocumentFormFieldBase input) ( this.Required == input.Required || this.Required.Equals(input.Required) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) ); } @@ -301,10 +286,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Width.GetHashCode(); hashCode = (hashCode * 59) + this.Height.GetHashCode(); hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } return hashCode; } } @@ -394,13 +375,6 @@ public List GetOpenApiTypes() Type = "bool", Value = Required, }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs index 81107ed..47f9caf 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldCheckbox.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "checkbox"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldCheckbox(string type = @"checkbox", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldCheckbox(string type = @"checkbox", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldCheckbox() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldCheckbox and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldCheckbox Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldCheckbox {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldCheckbox input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs index 6178867..d40024e 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDateSigned.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "date_signed"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDateSigned(string type = @"date_signed", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDateSigned(string type = @"date_signed", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldDateSigned() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldDateSigned and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldDateSigned Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldDateSigned {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldDateSigned input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs index e402f7f..b167023 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldDropdown.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "dropdown"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldDropdown(string type = @"dropdown", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldDropdown(string type = @"dropdown", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldDropdown() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldDropdown() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldDropdown and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldDropdown Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldDropdown {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldDropdown input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs index 5f874e6..49bee36 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldHyperlink.cs @@ -46,6 +46,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } /// Whether this form field is multiline text.. /// Original font size used in this form field's text.. /// Font family used in this form field's text.. + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -54,8 +55,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldHyperlink(string type = @"hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldHyperlink(string type = @"hyperlink", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -65,7 +65,6 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -77,6 +76,7 @@ protected TemplateResponseDocumentFormFieldHyperlink() { } this.IsMultiline = isMultiline; this.OriginalFontSize = originalFontSize; this.FontFamily = fontFamily; + this.Group = group; } /// @@ -129,6 +129,13 @@ public static TemplateResponseDocumentFormFieldHyperlink Init(string jsonData) [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -143,6 +150,7 @@ public override string ToString() sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -200,6 +208,11 @@ public bool Equals(TemplateResponseDocumentFormFieldHyperlink input) this.FontFamily == input.FontFamily || (this.FontFamily != null && this.FontFamily.Equals(input.FontFamily)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -226,6 +239,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -291,6 +308,13 @@ public List GetOpenApiTypes() Type = "string", Value = FontFamily, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs index 3eb9296..8e84563 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldInitials.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "initials"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldInitials(string type = @"initials", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldInitials(string type = @"initials", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldInitials() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldInitials() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldInitials and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldInitials Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldInitials {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldInitials input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs index 2bf695e..cbb5d59 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldRadio.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldRadio() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "radio"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. (required). /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldRadio() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. (required). - public TemplateResponseDocumentFormFieldRadio(string type = @"radio", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldRadio(string type = @"radio", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldRadio() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,12 @@ protected TemplateResponseDocumentFormFieldRadio() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldRadio and cannot be null"); } this.Type = type; + // to ensure "group" is required (not null) + if (group == null) + { + throw new ArgumentNullException("group is a required property for TemplateResponseDocumentFormFieldRadio and cannot be null"); + } + this.Group = group; } /// @@ -94,6 +99,13 @@ public static TemplateResponseDocumentFormFieldRadio Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +116,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldRadio {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +156,11 @@ public bool Equals(TemplateResponseDocumentFormFieldRadio input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +177,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +218,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs index 79119e4..b42f09d 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldSignature.cs @@ -42,6 +42,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } /// Initializes a new instance of the class. /// /// The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` (required) (default to "signature"). + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -50,8 +51,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldSignature(string type = @"signature", string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldSignature(string type = @"signature", string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -61,7 +61,6 @@ protected TemplateResponseDocumentFormFieldSignature() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -69,6 +68,7 @@ protected TemplateResponseDocumentFormFieldSignature() { } throw new ArgumentNullException("type is a required property for TemplateResponseDocumentFormFieldSignature and cannot be null"); } this.Type = type; + this.Group = group; } /// @@ -94,6 +94,13 @@ public static TemplateResponseDocumentFormFieldSignature Init(string jsonData) [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -104,6 +111,7 @@ public override string ToString() sb.Append("class TemplateResponseDocumentFormFieldSignature {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -143,6 +151,11 @@ public bool Equals(TemplateResponseDocumentFormFieldSignature input) this.Type == input.Type || (this.Type != null && this.Type.Equals(input.Type)) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -159,6 +172,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Type.GetHashCode(); } + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -196,6 +213,13 @@ public List GetOpenApiTypes() Type = "string", Value = Type, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs index ee0686b..70797b6 100644 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs +++ b/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs @@ -122,6 +122,7 @@ protected TemplateResponseDocumentFormFieldText() { } /// Original font size used in this form field's text.. /// Font family used in this form field's text.. /// Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.. + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. /// A unique id for the form field.. /// The name of the form field.. /// The signer of the Form Field.. @@ -130,8 +131,7 @@ protected TemplateResponseDocumentFormFieldText() { } /// The width in pixels of this form field.. /// The height in pixels of this form field.. /// Boolean showing whether or not this field is required.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.. - public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string group = default(string)) + public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool)) { this.ApiId = apiId; this.Name = name; @@ -141,7 +141,6 @@ protected TemplateResponseDocumentFormFieldText() { } this.Width = width; this.Height = height; this.Required = required; - this.Group = group; // to ensure "type" is required (not null) if (type == null) @@ -154,6 +153,7 @@ protected TemplateResponseDocumentFormFieldText() { } this.OriginalFontSize = originalFontSize; this.FontFamily = fontFamily; this.ValidationType = validationType; + this.Group = group; } /// @@ -206,6 +206,13 @@ public static TemplateResponseDocumentFormFieldText Init(string jsonData) [DataMember(Name = "fontFamily", EmitDefaultValue = true)] public string FontFamily { get; set; } + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + /// + /// The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + [DataMember(Name = "group", EmitDefaultValue = true)] + public string Group { get; set; } + /// /// Returns the string presentation of the object /// @@ -221,6 +228,7 @@ public override string ToString() sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); sb.Append(" ValidationType: ").Append(ValidationType).Append("\n"); + sb.Append(" Group: ").Append(Group).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -282,6 +290,11 @@ public bool Equals(TemplateResponseDocumentFormFieldText input) ( this.ValidationType == input.ValidationType || this.ValidationType.Equals(input.ValidationType) + ) && base.Equals(input) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) ); } @@ -309,6 +322,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); } hashCode = (hashCode * 59) + this.ValidationType.GetHashCode(); + if (this.Group != null) + { + hashCode = (hashCode * 59) + this.Group.GetHashCode(); + } return hashCode; } } @@ -381,6 +398,13 @@ public List GetOpenApiTypes() Type = "string", Value = ValidationType, }); + types.Add(new OpenApiType() + { + Name = "group", + Property = "Group", + Type = "string", + Value = Group, + }); return types; } diff --git a/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs b/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs deleted file mode 100644 index 85f472c..0000000 --- a/src/Dropbox.Sign/Model/TemplateResponseDocumentStaticField.cs +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// TemplateResponseDocumentStaticField - /// - [DataContract(Name = "TemplateResponseDocumentStaticField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseDocumentStaticField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseDocumentStaticField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the static field.. - /// The type of this static field. See [field types](/api/reference/constants/#field-types).. - /// The signer of the Static Field.. - /// The horizontal offset in pixels for this static field.. - /// The vertical offset in pixels for this static field.. - /// The width in pixels of this static field.. - /// The height in pixels of this static field.. - /// Boolean showing whether or not this field is required.. - /// A unique id for the static field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - public TemplateResponseDocumentStaticField(string name = default(string), string type = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseDocumentStaticField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseDocumentStaticField"); - } - - return obj; - } - - /// - /// The name of the static field. - /// - /// The name of the static field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The type of this static field. See [field types](/api/reference/constants/#field-types). - /// - /// The type of this static field. See [field types](/api/reference/constants/#field-types). - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; set; } - - /// - /// The signer of the Static Field. - /// - /// The signer of the Static Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this static field. - /// - /// The horizontal offset in pixels for this static field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this static field. - /// - /// The vertical offset in pixels for this static field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this static field. - /// - /// The width in pixels of this static field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this static field. - /// - /// The height in pixels of this static field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// A unique id for the static field. - /// - /// A unique id for the static field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateResponseDocumentStaticField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateResponseDocumentStaticField); - } - - /// - /// Returns true if TemplateResponseDocumentStaticField instances are equal - /// - /// Instance of TemplateResponseDocumentStaticField to be compared - /// Boolean - public bool Equals(TemplateResponseDocumentStaticField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs b/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs deleted file mode 100644 index d6dfd5f..0000000 --- a/src/Dropbox.Sign/Model/TemplateResponseNamedFormField.cs +++ /dev/null @@ -1,484 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// TemplateResponseNamedFormField - /// - [DataContract(Name = "TemplateResponseNamedFormField")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class TemplateResponseNamedFormField : IOpenApiTyped, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateResponseNamedFormField() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Named Form Field.. - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported.. - /// The signer of the Named Form Field.. - /// The horizontal offset in pixels for this form field.. - /// The vertical offset in pixels for this form field.. - /// The width in pixels of this form field.. - /// The height in pixels of this form field.. - /// Boolean showing whether or not this field is required.. - /// The unique ID for this field.. - /// The name of the group this field is in. If this field is not a group, this defaults to `null`.. - /// avgTextLength. - /// Whether this form field is multiline text.. - /// Original font size used in this form field's text.. - /// Font family used in this form field's text.. - public TemplateResponseNamedFormField(string name = default(string), string type = default(string), string signer = default(string), int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool), string apiId = default(string), string group = default(string), TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool? isMultiline = default(bool?), int? originalFontSize = default(int?), string fontFamily = default(string)) - { - - this.Name = name; - this.Type = type; - this.Signer = signer; - this.X = x; - this.Y = y; - this.Width = width; - this.Height = height; - this.Required = required; - this.ApiId = apiId; - this.Group = group; - this.AvgTextLength = avgTextLength; - this.IsMultiline = isMultiline; - this.OriginalFontSize = originalFontSize; - this.FontFamily = fontFamily; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static TemplateResponseNamedFormField Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of TemplateResponseNamedFormField"); - } - - return obj; - } - - /// - /// The name of the Named Form Field. - /// - /// The name of the Named Form Field. - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported. - /// - /// The type of this Named Form Field. Only `text` and `checkbox` are currently supported. - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; set; } - - /// - /// The signer of the Named Form Field. - /// - /// The signer of the Named Form Field. - [DataMember(Name = "signer", EmitDefaultValue = true)] - public string Signer { get; set; } - - /// - /// The horizontal offset in pixels for this form field. - /// - /// The horizontal offset in pixels for this form field. - [DataMember(Name = "x", EmitDefaultValue = true)] - public int X { get; set; } - - /// - /// The vertical offset in pixels for this form field. - /// - /// The vertical offset in pixels for this form field. - [DataMember(Name = "y", EmitDefaultValue = true)] - public int Y { get; set; } - - /// - /// The width in pixels of this form field. - /// - /// The width in pixels of this form field. - [DataMember(Name = "width", EmitDefaultValue = true)] - public int Width { get; set; } - - /// - /// The height in pixels of this form field. - /// - /// The height in pixels of this form field. - [DataMember(Name = "height", EmitDefaultValue = true)] - public int Height { get; set; } - - /// - /// Boolean showing whether or not this field is required. - /// - /// Boolean showing whether or not this field is required. - [DataMember(Name = "required", EmitDefaultValue = true)] - public bool Required { get; set; } - - /// - /// The unique ID for this field. - /// - /// The unique ID for this field. - [DataMember(Name = "api_id", EmitDefaultValue = true)] - public string ApiId { get; set; } - - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - /// - /// The name of the group this field is in. If this field is not a group, this defaults to `null`. - [DataMember(Name = "group", EmitDefaultValue = true)] - public string Group { get; set; } - - /// - /// Gets or Sets AvgTextLength - /// - [DataMember(Name = "avg_text_length", EmitDefaultValue = true)] - public TemplateResponseFieldAvgTextLength AvgTextLength { get; set; } - - /// - /// Whether this form field is multiline text. - /// - /// Whether this form field is multiline text. - [DataMember(Name = "isMultiline", EmitDefaultValue = true)] - public bool? IsMultiline { get; set; } - - /// - /// Original font size used in this form field's text. - /// - /// Original font size used in this form field's text. - [DataMember(Name = "originalFontSize", EmitDefaultValue = true)] - public int? OriginalFontSize { get; set; } - - /// - /// Font family used in this form field's text. - /// - /// Font family used in this form field's text. - [DataMember(Name = "fontFamily", EmitDefaultValue = true)] - public string FontFamily { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TemplateResponseNamedFormField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Signer: ").Append(Signer).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" Height: ").Append(Height).Append("\n"); - sb.Append(" Required: ").Append(Required).Append("\n"); - sb.Append(" ApiId: ").Append(ApiId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" AvgTextLength: ").Append(AvgTextLength).Append("\n"); - sb.Append(" IsMultiline: ").Append(IsMultiline).Append("\n"); - sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n"); - sb.Append(" FontFamily: ").Append(FontFamily).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TemplateResponseNamedFormField); - } - - /// - /// Returns true if TemplateResponseNamedFormField instances are equal - /// - /// Instance of TemplateResponseNamedFormField to be compared - /// Boolean - public bool Equals(TemplateResponseNamedFormField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Signer == input.Signer || - (this.Signer != null && - this.Signer.Equals(input.Signer)) - ) && - ( - this.X == input.X || - this.X.Equals(input.X) - ) && - ( - this.Y == input.Y || - this.Y.Equals(input.Y) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) && - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.ApiId == input.ApiId || - (this.ApiId != null && - this.ApiId.Equals(input.ApiId)) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.AvgTextLength == input.AvgTextLength || - (this.AvgTextLength != null && - this.AvgTextLength.Equals(input.AvgTextLength)) - ) && - ( - this.IsMultiline == input.IsMultiline || - (this.IsMultiline != null && - this.IsMultiline.Equals(input.IsMultiline)) - ) && - ( - this.OriginalFontSize == input.OriginalFontSize || - (this.OriginalFontSize != null && - this.OriginalFontSize.Equals(input.OriginalFontSize)) - ) && - ( - this.FontFamily == input.FontFamily || - (this.FontFamily != null && - this.FontFamily.Equals(input.FontFamily)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Signer != null) - { - hashCode = (hashCode * 59) + this.Signer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.X.GetHashCode(); - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - if (this.ApiId != null) - { - hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); - } - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.AvgTextLength != null) - { - hashCode = (hashCode * 59) + this.AvgTextLength.GetHashCode(); - } - if (this.IsMultiline != null) - { - hashCode = (hashCode * 59) + this.IsMultiline.GetHashCode(); - } - if (this.OriginalFontSize != null) - { - hashCode = (hashCode * 59) + this.OriginalFontSize.GetHashCode(); - } - if (this.FontFamily != null) - { - hashCode = (hashCode * 59) + this.FontFamily.GetHashCode(); - } - return hashCode; - } - } - - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "name", - Property = "Name", - Type = "string", - Value = Name, - }); - types.Add(new OpenApiType() - { - Name = "type", - Property = "Type", - Type = "string", - Value = Type, - }); - types.Add(new OpenApiType() - { - Name = "signer", - Property = "Signer", - Type = "string", - Value = Signer, - }); - types.Add(new OpenApiType() - { - Name = "x", - Property = "X", - Type = "int", - Value = X, - }); - types.Add(new OpenApiType() - { - Name = "y", - Property = "Y", - Type = "int", - Value = Y, - }); - types.Add(new OpenApiType() - { - Name = "width", - Property = "Width", - Type = "int", - Value = Width, - }); - types.Add(new OpenApiType() - { - Name = "height", - Property = "Height", - Type = "int", - Value = Height, - }); - types.Add(new OpenApiType() - { - Name = "required", - Property = "Required", - Type = "bool", - Value = Required, - }); - types.Add(new OpenApiType() - { - Name = "api_id", - Property = "ApiId", - Type = "string", - Value = ApiId, - }); - types.Add(new OpenApiType() - { - Name = "group", - Property = "Group", - Type = "string", - Value = Group, - }); - types.Add(new OpenApiType() - { - Name = "avg_text_length", - Property = "AvgTextLength", - Type = "TemplateResponseFieldAvgTextLength", - Value = AvgTextLength, - }); - types.Add(new OpenApiType() - { - Name = "isMultiline", - Property = "IsMultiline", - Type = "bool?", - Value = IsMultiline, - }); - types.Add(new OpenApiType() - { - Name = "originalFontSize", - Property = "OriginalFontSize", - Type = "int?", - Value = OriginalFontSize, - }); - types.Add(new OpenApiType() - { - Name = "fontFamily", - Property = "FontFamily", - Type = "string", - Value = FontFamily, - }); - - return types; - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/test_fixtures/ApiAppCreateRequest.json b/test_fixtures/ApiAppCreateRequest.json index ac9729d..2ee8e41 100644 --- a/test_fixtures/ApiAppCreateRequest.json +++ b/test_fixtures/ApiAppCreateRequest.json @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppGetResponse.json b/test_fixtures/ApiAppGetResponse.json index 07843c3..f7d799f 100644 --- a/test_fixtures/ApiAppGetResponse.json +++ b/test_fixtures/ApiAppGetResponse.json @@ -7,7 +7,7 @@ "is_approved": false, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -15,13 +15,28 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" }, "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" + "header_background_color": "#1A1A1A", + "legal_version": "terms1", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", + "primary_button_text_color": "#ffffff", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", + "text_color1": "#808080", + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppListResponse.json b/test_fixtures/ApiAppListResponse.json index 6bbacb4..cc17d45 100644 --- a/test_fixtures/ApiAppListResponse.json +++ b/test_fixtures/ApiAppListResponse.json @@ -8,7 +8,7 @@ "is_approved": true, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -16,6 +16,9 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" @@ -27,6 +30,9 @@ "domains": ["example.com"], "is_approved": false, "name": "My Other App", + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" diff --git a/test_fixtures/ApiAppUpdateRequest.json b/test_fixtures/ApiAppUpdateRequest.json index 4744e05..ee4e9ff 100644 --- a/test_fixtures/ApiAppUpdateRequest.json +++ b/test_fixtures/ApiAppUpdateRequest.json @@ -4,7 +4,7 @@ "domains": [ "example.com" ], - "callback_url": "http://example.com/dropboxsign", + "callback_url": "https://example.com/dropboxsign", "oauth": { "callback_url": "https://example.com/oauth", "scopes": [ @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json new file mode 100644 index 0000000..5892719 --- /dev/null +++ b/test_fixtures/FaxGetResponse.json @@ -0,0 +1,23 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json new file mode 100644 index 0000000..bfa69cd --- /dev/null +++ b/test_fixtures/FaxListResponse.json @@ -0,0 +1,31 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] + } +} diff --git a/test_fixtures/FaxSendRequest.json b/test_fixtures/FaxSendRequest.json new file mode 100644 index 0000000..4c418cb --- /dev/null +++ b/test_fixtures/FaxSendRequest.json @@ -0,0 +1,14 @@ +{ + "default": { + "file_url": [ + "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + ], + "test_mode": "true", + "recipient": "16690000001", + "sender": "16690000000", + "cover_page_to": "Jill Fax", + "cover_page_message": "I'm sending you a fax!", + "cover_page_from": "Faxer Faxerson", + "title": "This is what the fax is about!" + } +} diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json new file mode 100644 index 0000000..b651c78 --- /dev/null +++ b/test_fixtures/FaxSendResponse.json @@ -0,0 +1,16 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [ ], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + } + } +} diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16..327d26c 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } } diff --git a/test_fixtures/TemplateGetResponse.json b/test_fixtures/TemplateGetResponse.json index 52ff622..b025913 100644 --- a/test_fixtures/TemplateGetResponse.json +++ b/test_fixtures/TemplateGetResponse.json @@ -5,7 +5,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -566,496 +569,40 @@ ] } ], - "custom_fields": [ - { - "name": "merge_field_1", - "type": "text", - "x": 417, - "y": 219, - "width": 72, - "height": 15, - "required": false, - "api_id": "967c3e5f-2912-4f53-8ea3-c750652d29fc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "merge_field_2", - "type": "checkbox", - "x": 515, - "y": 346, - "width": 18, - "height": 18, - "required": false, - "api_id": "5e8fe02f-51cf-4f0b-b1d9-2b1e4f6ad07f" - } - ], - "named_form_fields": [ - { - "name": "Signature1", - "type": "signature", - "signer": "1", - "x": 136, - "y": 17, - "width": 108, - "height": 27, - "required": true, - "api_id": "8b6d78a5-0870-4f46-af9c-b78b54a49348" - }, - { - "name": "Textbox1", - "type": "text", - "signer": "1", - "x": 328, - "y": 17, - "width": 144, - "height": 14, - "required": true, - "api_id": "7ec10d80-53c9-433b-b252-0b8daa90a8e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox2", - "type": "text", - "signer": "1", - "x": 328, - "y": 48, - "width": 144, - "height": 14, - "required": true, - "api_id": "6574e6ad-7dac-49a2-9d56-650d7c5ade6e", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Initial1", - "type": "initials", - "signer": "1", - "x": 148, - "y": 66, - "width": 72, - "height": 27, - "required": true, - "api_id": "30f41f54-c7f3-46c3-a29a-bb76ec40b552" - }, - { - "name": "Checkbox1", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 111, - "width": 18, - "height": 18, - "required": false, - "api_id": "d4d6ada9-e1dc-419e-bc0d-1478da694449", - "group": "75a6e4b5fea47" - }, - { - "name": "Dropdown1", - "type": "dropdown", - "signer": "1", - "x": 423, - "y": 108, - "width": 70, - "height": 14, - "required": true, - "api_id": "5863be5e-ce5a-4c9d-aabe-c221914d73c2" - }, - { - "name": "DateSigned1", - "type": "date_signed", - "signer": "1", - "x": 150, - "y": 119, - "width": 105, - "height": 18, - "required": true, - "api_id": "9f6d3722-6db7-46da-8fac-3bc09f510262" - }, - { - "name": "Checkbox2", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 135, - "width": 18, - "height": 18, - "required": false, - "api_id": "edd732b8-b158-4714-a87b-503637d09ded", - "group": "75a6e4b5fea47" - }, - { - "name": "FullName1", - "type": "text", - "signer": "1", - "x": 144, - "y": 158, - "width": 72, - "height": 14, - "required": true, - "api_id": "62fd3f85-4808-4011-8eae-a14ebe9105ef", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Email1", - "type": "text", - "signer": "1", - "x": 133, - "y": 191, - "width": 144, - "height": 14, - "required": true, - "api_id": "a1c9bc6b-d498-4787-86e0-30ea779f06a7", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "RadioItem1", - "type": "radio", - "signer": "1", - "x": 307, - "y": 211, - "width": 18, - "height": 18, - "required": false, - "api_id": "fc8a1277-f757-47a2-aeea-5113fa81f2d5", - "group": "0831822584086" - }, - { - "name": "Company1", - "type": "text", - "signer": "1", - "x": 128, - "y": 221, - "width": 144, - "height": 14, - "required": true, - "api_id": "279b4e7f-e71f-426d-845c-6308cddde379", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Title1", - "type": "text", - "signer": "1", - "x": 127, - "y": 250, - "width": 144, - "height": 14, - "required": true, - "api_id": "8809e39a-a46c-4dae-aaf9-06fc6355d80f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "RadioItem2", - "type": "radio", - "signer": "1", - "x": 307, - "y": 253, - "width": 18, - "height": 18, - "required": false, - "api_id": "f7b6b70d-0522-4ab7-bfec-b86f147c8be3", - "group": "0831822584086" - }, - { - "name": "Textbox3", - "type": "text", - "signer": "1", - "x": 410, - "y": 279, - "width": 144, - "height": 14, - "required": true, - "api_id": "bad7512a-e22b-46ed-ba03-123db0eda932", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox4", - "type": "text", - "signer": "1", - "x": 101, - "y": 314, - "width": 72, - "height": 14, - "required": true, - "api_id": "368ed029-bc93-4f92-8f7a-14c3bf8109b5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "custom_regex" - }, - { - "name": "Textbox8", - "type": "text", - "signer": "1", - "x": 218, - "y": 313, - "width": 72, - "height": 14, - "required": true, - "api_id": "ecf2ae95-d2e6-41b2-819a-836a6fa8c7c5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_routing_number" - }, - { - "name": "Textbox12", - "type": "text", - "signer": "1", - "x": 339, - "y": 315, - "width": 72, - "height": 14, - "required": true, - "api_id": "3cb90a0a-a433-4f30-8af8-8fb4c747b704", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "social_security_number" - }, - { - "name": "Textbox9", - "type": "text", - "signer": "1", - "x": 224, - "y": 343, - "width": 72, - "height": 14, - "required": true, - "api_id": "5b9eb331-c97d-435b-a563-d936a9b930c0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_account_number" - }, - { - "name": "Textbox13", - "type": "text", - "signer": "1", - "x": 339, - "y": 345, - "width": 72, - "height": 14, - "required": true, - "api_id": "2b98ce7e-e53a-4cf8-a9f3-d7fb18d88631", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "employer_identification_number" - }, - { - "name": "Textbox5", - "type": "text", - "signer": "1", - "x": 113, - "y": 350, - "width": 72, - "height": 14, - "required": true, - "api_id": "5f52c011-2c5f-4143-bf04-4694fb4a0d3f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "numbers_only" - }, - { - "name": "Textbox6", - "type": "text", - "signer": "1", - "x": 122, - "y": 374, - "width": 72, - "height": 14, - "required": true, - "api_id": "47457b7d-b1e8-41a0-93ad-60ba30e64bb1", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "letters_only" - }, - { - "name": "Textbox10", - "type": "text", - "signer": "1", - "x": 234, - "y": 373, - "width": 72, - "height": 14, - "required": true, - "api_id": "18e3f994-1675-4d58-9b4a-4f92a2614551", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "Textbox14", - "type": "text", - "signer": "1", - "x": 339, - "y": 376, - "width": 72, - "height": 14, - "required": true, - "api_id": "9ad4b8cc-bac9-432b-8836-9f80f86fc7e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox7", - "type": "text", - "signer": "1", - "x": 130, - "y": 401, - "width": 72, - "height": 14, - "required": true, - "api_id": "58c5f942-04fb-45f1-9703-5e8411f3a3bb", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "phone_number" - }, - { - "name": "me_now_hyperlink_1", - "type": "hyperlink", - "signer": "me_now", - "x": 434, - "y": 400, - "width": 112, - "height": 14, - "required": false, - "api_id": "fd928b56-cf59-40a4-9a90-62f97ffd0ddc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 30 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "helvetica" - }, - { - "name": "Textbox11", - "type": "text", - "signer": "1", - "x": 237, - "y": 405, - "width": 72, - "height": 14, - "required": true, - "api_id": "e48c388d-8c26-4f20-848e-f8587a631746", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "zip_code" - } - ], "accounts": [ { "account_id": "5008b25c7f67153e57d5a357b1687968068fb465", "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } }, { "account_id": "", "email_address": "teammate@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] } diff --git a/test_fixtures/TemplateListResponse.json b/test_fixtures/TemplateListResponse.json index 7c4768b..caa5e6d 100644 --- a/test_fixtures/TemplateListResponse.json +++ b/test_fixtures/TemplateListResponse.json @@ -12,7 +12,10 @@ "title": "Purchase order", "message": "", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -49,7 +52,8 @@ "originalFontSize": 12, "fontFamily": "arial" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -58,7 +62,21 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] }, @@ -67,7 +85,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1329478947, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -564,7 +585,8 @@ "fontFamily": "arial", "validation_type": "zip_code" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -573,9 +595,16 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } } - ] + ], + "attachments": [] } ] }