diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 594f2b3..724ee4f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -56,6 +56,10 @@ docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md docs/SignatureRequestBulkSendWithTemplateRequest.md docs/SignatureRequestCreateEmbeddedRequest.md docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +docs/SignatureRequestEditEmbeddedRequest.md +docs/SignatureRequestEditEmbeddedWithTemplateRequest.md +docs/SignatureRequestEditRequest.md +docs/SignatureRequestEditWithTemplateRequest.md docs/SignatureRequestGetResponse.md docs/SignatureRequestListResponse.md docs/SignatureRequestRemindRequest.md @@ -259,6 +263,10 @@ src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedRequest.cs src/Dropbox.Sign/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.cs +src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs +src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs +src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs +src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs src/Dropbox.Sign/Model/SignatureRequestGetResponse.cs src/Dropbox.Sign/Model/SignatureRequestListResponse.cs src/Dropbox.Sign/Model/SignatureRequestRemindRequest.cs diff --git a/README.md b/README.md index 49bec34..61e2950 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.3.0 +- SDK version: 1.4.0 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen ### Building @@ -145,6 +145,10 @@ Class | Method | HTTP request | Description *SignatureRequestApi* | [**SignatureRequestCancel**](docs/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request *SignatureRequestApi* | [**SignatureRequestCreateEmbedded**](docs/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request *SignatureRequestApi* | [**SignatureRequestCreateEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +*SignatureRequestApi* | [**SignatureRequestEdit**](docs/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +*SignatureRequestApi* | [**SignatureRequestEditEmbedded**](docs/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +*SignatureRequestApi* | [**SignatureRequestEditEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +*SignatureRequestApi* | [**SignatureRequestEditWithTemplate**](docs/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template *SignatureRequestApi* | [**SignatureRequestFiles**](docs/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files *SignatureRequestApi* | [**SignatureRequestFilesAsDataUri**](docs/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri *SignatureRequestApi* | [**SignatureRequestFilesAsFileUrl**](docs/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -232,6 +236,10 @@ Class | Method | HTTP request | Description - [Model.SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [Model.SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [Model.SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [Model.SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [Model.SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [Model.SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [Model.SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [Model.SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [Model.SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [Model.SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) diff --git a/VERSION b/VERSION index f0bb29e..88c5fb8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.4.0 diff --git a/docs/ApiAppApi.md b/docs/ApiAppApi.md index 78e02c0..d395eb7 100644 --- a/docs/ApiAppApi.md +++ b/docs/ApiAppApi.md @@ -125,7 +125,7 @@ catch (ApiException e) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **201** | 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/BulkSendJobGetResponseSignatureRequests.md b/docs/BulkSendJobGetResponseSignatureRequests.md index 75541f8..012dd70 100644 --- a/docs/BulkSendJobGetResponseSignatureRequests.md +++ b/docs/BulkSendJobGetResponseSignatureRequests.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] **CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] **SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] +**FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] **TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] **CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] diff --git a/docs/EventCallbackRequestEvent.md b/docs/EventCallbackRequestEvent.md index 47819b7..98884f1 100644 --- a/docs/EventCallbackRequestEvent.md +++ b/docs/EventCallbackRequestEvent.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **EventTime** | **string** | Time the event was created (using Unix time). | **EventType** | **string** | Type of callback event that was triggered. | **EventHash** | **string** | Generated hash used to verify source of event data. | -**EventMetadata** | [**EventCallbackRequestEventMetadata**](EventCallbackRequestEventMetadata.md) | | +**EventMetadata** | [**EventCallbackRequestEventMetadata**](EventCallbackRequestEventMetadata.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index 80c05e8..8ca9434 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**SignatureRequestCancel**](SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**SignatureRequestCreateEmbedded**](SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**SignatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**SignatureRequestEdit**](SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**SignatureRequestEditEmbedded**](SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**SignatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**SignatureRequestEditWithTemplate**](SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**SignatureRequestFiles**](SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**SignatureRequestFilesAsDataUri**](SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**SignatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -641,6 +645,551 @@ catch (ApiException e) - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SignatureRequestEdit** +> SignatureRequestGetResponse SignatureRequestEdit (string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestSigner( + emailAddress: "jack@example.com", + name: "Jack", + order: 0 + ); + + var signer2 = new SubSignatureRequestSigner( + emailAddress: "jill@example.com", + name: "Jill", + order: 1 + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: true, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var subFieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY + ); + + var metadata = new Dictionary() + { + ["custom_id"] = 1234, + ["custom_text"] = "NDA #9" + }; + + var files = new List { + new FileStream( + "./example_signature_request.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new SignatureRequestEditRequest( + title: "NDA with Acme Co.", + subject: "The NDA we talked about", + message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers: new List(){signer1, signer2}, + ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, + files: files, + metadata: metadata, + signingOptions: signingOptions, + fieldOptions: subFieldOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEdit(signatureRequestId, data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestEditWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Edit Signature Request + ApiResponse response = apiInstance.SignatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **SignatureRequestEditEmbedded** +> SignatureRequestGetResponse SignatureRequestEditEmbedded (string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example +```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(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestSigner( + emailAddress: "jack@example.com", + name: "Jack", + order: 0 + ); + + var signer2 = new SubSignatureRequestSigner( + emailAddress: "jill@example.com", + name: "Jill", + order: 1 + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: true, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var files = new List { + new FileStream( + "./example_signature_request.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new SignatureRequestEditEmbeddedRequest( + clientId: "ec64a202072370a737edf4a0eb7f4437", + title: "NDA with Acme Co.", + subject: "The NDA we talked about", + message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers: new List(){signer1, signer2}, + ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, + files: files, + signingOptions: signingOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditEmbedded( + signatureRequestId, + data + ); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestEditEmbeddedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Edit Embedded Signature Request + ApiResponse response = apiInstance.SignatureRequestEditEmbeddedWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditEmbeddedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **SignatureRequestEditEmbeddedWithTemplate** +> SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate (string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest) + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example +```csharp +using System; +using System.Collections.Generic; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George" + ); + + var subSigningOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: false, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var data = new SignatureRequestEditEmbeddedWithTemplateRequest( + clientId: "ec64a202072370a737edf4a0eb7f4437", + templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, + subject: "Purchase Order", + message: "Glad we could come to an agreement.", + signers: new List(){signer1}, + signingOptions: subSigningOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditEmbeddedWithTemplate( + signatureRequestId, + data + ); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestEditEmbeddedWithTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Edit Embedded Signature Request with Template + ApiResponse response = apiInstance.SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + +[[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) + + +# **SignatureRequestEditWithTemplate** +> SignatureRequestGetResponse SignatureRequestEditWithTemplate (string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example +```csharp +using System; +using System.Collections.Generic; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestTemplateSigner( + role: "Client", + emailAddress: "george@example.com", + name: "George" + ); + + var cc1 = new SubCC( + role: "Accounting", + emailAddress: "accouting@emaple.com" + ); + + var customField1 = new SubCustomField( + name: "Cost", + value: "$20,000", + editor: "Client", + required: true + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: false, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var data = new SignatureRequestEditWithTemplateRequest( + templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, + subject: "Purchase Order", + message: "Glad we could come to an agreement.", + signers: new List(){signer1}, + ccs: new List(){cc1}, + customFields: new List(){customField1}, + signingOptions: signingOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditWithTemplate(signatureRequestId, data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestEditWithTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Edit Signature Request With Template + ApiResponse response = apiInstance.SignatureRequestEditWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditWithTemplateRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| diff --git a/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 5bb192a..390b05f 100644 --- a/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | -**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

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

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

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

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] +**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

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

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

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

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

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] **Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] diff --git a/docs/SignatureRequestBulkSendWithTemplateRequest.md b/docs/SignatureRequestBulkSendWithTemplateRequest.md index e59f987..25a6b8e 100644 --- a/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | -**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

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

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

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

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] +**SignerFile** | **System.IO.Stream** | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

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

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

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

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

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | [optional] **SignerList** | [**List<SubBulkSignerList>**](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false] **Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] diff --git a/docs/SignatureRequestEditEmbeddedRequest.md b/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 0000000..fda25d6 --- /dev/null +++ b/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,33 @@ +# Dropbox.Sign.Model.SignatureRequestEditEmbeddedRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | +**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] +**SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] +**SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] +**Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] +**TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false] +**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] + +[[Back to Model 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/SignatureRequestResponse.md b/docs/SignatureRequestResponse.md index 8c97e6b..3a36fd4 100644 --- a/docs/SignatureRequestResponse.md +++ b/docs/SignatureRequestResponse.md @@ -23,11 +23,13 @@ Name | Type | Description | Notes **DetailsUrl** | **string** | The URL where the requester and the signers can view the current status of the SignatureRequest. | [optional] **CcEmailAddresses** | **List<string>** | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | [optional] **SigningRedirectUrl** | **string** | The URL you want the signer redirected to after they successfully sign. | [optional] +**FinalCopyUri** | **string** | The path where the completed document can be downloaded | [optional] **TemplateIds** | **List<string>** | Templates IDs used in this SignatureRequest (if any). | [optional] **CustomFields** | [**List<SignatureRequestResponseCustomFieldBase>**](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | [optional] **Attachments** | [**List<SignatureRequestResponseAttachment>**](SignatureRequestResponseAttachment.md) | Signer attachments. | [optional] **ResponseData** | [**List<SignatureRequestResponseDataBase>**](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | [optional] **Signatures** | [**List<SignatureRequestResponseSignatures>**](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | [optional] +**BulkSendJobId** | **string** | The ID of the Bulk Send job which sent the signature request, if applicable. | [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/SubFormFieldsPerDocumentDateSigned.md b/docs/SubFormFieldsPerDocumentDateSigned.md index 695fcb3..3f4d425 100644 --- a/docs/SubFormFieldsPerDocumentDateSigned.md +++ b/docs/SubFormFieldsPerDocumentDateSigned.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] **Type** | **string** | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to "date_signed"] **FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] +**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model 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/SubFormFieldsPerDocumentDropdown.md b/docs/SubFormFieldsPerDocumentDropdown.md index a7086be..71502f7 100644 --- a/docs/SubFormFieldsPerDocumentDropdown.md +++ b/docs/SubFormFieldsPerDocumentDropdown.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **Options** | **List<string>** | Array of string values representing dropdown values. | **Content** | **string** | Selected value in `options` array. Value must exist in array. | [optional] **FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] +**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model 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/SubFormFieldsPerDocumentHyperlink.md b/docs/SubFormFieldsPerDocumentHyperlink.md index 2480201..0da5f6e 100644 --- a/docs/SubFormFieldsPerDocumentHyperlink.md +++ b/docs/SubFormFieldsPerDocumentHyperlink.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **Content** | **string** | Link Text. | **ContentUrl** | **string** | Link URL. | **FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] +**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model 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/SubFormFieldsPerDocumentText.md b/docs/SubFormFieldsPerDocumentText.md index 5e83205..8c9b043 100644 --- a/docs/SubFormFieldsPerDocumentText.md +++ b/docs/SubFormFieldsPerDocumentText.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **ValidationCustomRegexFormatLabel** | **string** | | [optional] **Content** | **string** | Content of a `me_now` text field | [optional] **FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] +**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model 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/SubFormFieldsPerDocumentTextMerge.md b/docs/SubFormFieldsPerDocumentTextMerge.md index ac624c4..92525c9 100644 --- a/docs/SubFormFieldsPerDocumentTextMerge.md +++ b/docs/SubFormFieldsPerDocumentTextMerge.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **Page** | **int?** | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | [optional] **Type** | **string** | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to "text-merge"] **FontFamily** | **string** | Font family for the field. | [optional] -**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] +**FontSize** | **int** | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [optional] [default to 12] [[Back to Model 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/SubSignatureRequestSigner.md b/docs/SubSignatureRequestSigner.md index 82bbc85..ff9f42c 100644 --- a/docs/SubSignatureRequestSigner.md +++ b/docs/SubSignatureRequestSigner.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **EmailAddress** | **string** | The email address of the signer. | **Order** | **int?** | The order the signer is required to sign in. | [optional] **Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] -**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

**Note**: Not available in test mode and requires a Standard plan or higher. | [optional] +**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

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

**Note**: Not available in test mode and requires a Standard plan or higher. | [optional] **SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [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/SubSignatureRequestTemplateSigner.md b/docs/SubSignatureRequestTemplateSigner.md index b026727..042f8a6 100644 --- a/docs/SubSignatureRequestTemplateSigner.md +++ b/docs/SubSignatureRequestTemplateSigner.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Name** | **string** | The name of the signer. | **EmailAddress** | **string** | The email address of the signer. | **Pin** | **string** | The 4- to 12-character access code that will secure this signer's signature page. | [optional] -**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

**Note**: Not available in test mode and requires a Standard plan or higher. | [optional] +**SmsPhoneNumber** | **string** | An E.164 formatted phone number.

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

**Note**: Not available in test mode and requires a Standard plan or higher. | [optional] **SmsPhoneNumberType** | **string** | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | [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/TeamApi.md b/docs/TeamApi.md index bf4df43..90d89f0 100644 --- a/docs/TeamApi.md +++ b/docs/TeamApi.md @@ -760,7 +760,7 @@ catch (ApiException e) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **201** | 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/examples/SignatureRequestEdit.cs b/examples/SignatureRequestEdit.cs new file mode 100644 index 0000000..02c197f --- /dev/null +++ b/examples/SignatureRequestEdit.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestSigner( + emailAddress: "jack@example.com", + name: "Jack", + order: 0 + ); + + var signer2 = new SubSignatureRequestSigner( + emailAddress: "jill@example.com", + name: "Jill", + order: 1 + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: true, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var subFieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY + ); + + var metadata = new Dictionary() + { + ["custom_id"] = 1234, + ["custom_text"] = "NDA #9" + }; + + var files = new List { + new FileStream( + "./example_signature_request.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new SignatureRequestEditRequest( + title: "NDA with Acme Co.", + subject: "The NDA we talked about", + message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers: new List(){signer1, signer2}, + ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, + files: files, + metadata: metadata, + signingOptions: signingOptions, + fieldOptions: subFieldOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEdit(signatureRequestId, data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditEmbedded.cs b/examples/SignatureRequestEditEmbedded.cs new file mode 100644 index 0000000..87d7d73 --- /dev/null +++ b/examples/SignatureRequestEditEmbedded.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestSigner( + emailAddress: "jack@example.com", + name: "Jack", + order: 0 + ); + + var signer2 = new SubSignatureRequestSigner( + emailAddress: "jill@example.com", + name: "Jill", + order: 1 + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: true, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var files = new List { + new FileStream( + "./example_signature_request.pdf", + FileMode.Open, + FileAccess.Read, + FileShare.Read + ) + }; + + var data = new SignatureRequestEditEmbeddedRequest( + clientId: "ec64a202072370a737edf4a0eb7f4437", + title: "NDA with Acme Co.", + subject: "The NDA we talked about", + message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + signers: new List(){signer1, signer2}, + ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, + files: files, + signingOptions: signingOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditEmbedded( + signatureRequestId, + data + ); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.cs b/examples/SignatureRequestEditEmbeddedWithTemplate.cs new file mode 100644 index 0000000..12a591d --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplate.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George" + ); + + var subSigningOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: false, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var data = new SignatureRequestEditEmbeddedWithTemplateRequest( + clientId: "ec64a202072370a737edf4a0eb7f4437", + templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, + subject: "Purchase Order", + message: "Glad we could come to an agreement.", + signers: new List(){signer1}, + signingOptions: subSigningOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditEmbeddedWithTemplate( + signatureRequestId, + data + ); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditWithTemplate.cs b/examples/SignatureRequestEditWithTemplate.cs new file mode 100644 index 0000000..22038ee --- /dev/null +++ b/examples/SignatureRequestEditWithTemplate.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +public class Example +{ + public static void Main() + { + var config = new Configuration(); + // Configure HTTP basic authorization: api_key + config.Username = "YOUR_API_KEY"; + + // or, configure Bearer (JWT) authorization: oauth2 + // config.AccessToken = "YOUR_BEARER_TOKEN"; + + var signatureRequestApi = new SignatureRequestApi(config); + + var signer1 = new SubSignatureRequestTemplateSigner( + role: "Client", + emailAddress: "george@example.com", + name: "George" + ); + + var cc1 = new SubCC( + role: "Accounting", + emailAddress: "accouting@emaple.com" + ); + + var customField1 = new SubCustomField( + name: "Cost", + value: "$20,000", + editor: "Client", + required: true + ); + + var signingOptions = new SubSigningOptions( + draw: true, + type: true, + upload: true, + phone: false, + defaultType: SubSigningOptions.DefaultTypeEnum.Draw + ); + + var data = new SignatureRequestEditWithTemplateRequest( + templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, + subject: "Purchase Order", + message: "Glad we could come to an agreement.", + signers: new List(){signer1}, + ccs: new List(){cc1}, + customFields: new List(){customField1}, + signingOptions: signingOptions, + testMode: true + ); + + var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + + try + { + var result = signatureRequestApi.SignatureRequestEditWithTemplate(signatureRequestId, data); + Console.WriteLine(result); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/openapi-config.yaml b/openapi-config.yaml index 12c8e82..e52a5e8 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -5,7 +5,7 @@ additionalProperties: packageAuthors: Dropbox Sign API Team packageCompany: Dropbox Sign API Team packageDescription: Client library for using the Dropbox Sign API - packageVersion: 1.3.0 + packageVersion: 1.4.0 packageTitle: Dropbox Sign .Net SDK sortModelPropertiesByRequiredFlag: true optionalEmitDefaultValues: true diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 6ef2e00..d77d984 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -457,7 +457,7 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 200: + 201: description: 'successful operation' headers: X-RateLimit-Limit: @@ -2226,35 +2226,39 @@ paths: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create a new SignatureRequest based on the given Template, click here.' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files' + summary: 'Edit Signature Request' description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFiles + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: 200: description: 'successful operation' @@ -2266,14 +2270,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditResponseExample' 4XX: description: failed_operation content: @@ -2293,8 +2295,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2311,65 +2311,78 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEdit.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs + $ref: examples/SignatureRequestEdit.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEdit.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEdit.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEdit.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEdit.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEdit.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEdit.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsDataUri + summary: 'Edit Embedded Signature Request' + description: 'Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: 200: description: 'successful operation' @@ -2383,10 +2396,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponseExample' 4XX: description: failed_operation content: @@ -2406,8 +2419,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2417,79 +2428,82 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbedded.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs + $ref: examples/SignatureRequestEditEmbedded.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbedded.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbedded.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbedded.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbedded.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbedded.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbedded.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsFileUrl + summary: 'Edit Embedded Signature Request with Template' + description: 'Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: 200: description: 'successful operation' @@ -2503,10 +2517,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -2526,8 +2540,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2537,69 +2549,85 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/{signature_request_id}': - get: + title: 'Signature Request with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Get Signature Request' - description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' - operationId: signatureRequestGet + summary: 'Edit Signature Request With Template' + description: |- + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: 200: description: 'successful operation' @@ -2616,7 +2644,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -2634,8 +2662,10 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2650,84 +2680,77 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs + $ref: examples/SignatureRequestEditWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplate.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplate.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplate.sh x-meta: seo: - title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' - /signature_request/list: + title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: 'List Signature Requests' + summary: 'Download Files' description: |- - Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - operationId: signatureRequestList + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page - in: query - description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + default: pdf + enum: + - pdf + - zip responses: 200: description: 'successful operation' @@ -2739,12 +2762,14 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' + type: string + format: binary + application/zip: + schema: + type: string + format: binary 4XX: description: failed_operation content: @@ -2760,8 +2785,14 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2776,58 +2807,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs + $ref: examples/SignatureRequestFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFiles.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFiles.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFiles.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFiles.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFiles.sh x-meta: seo: - title: 'List Signature Requests | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' - '/signature_request/release_hold/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Release On-Hold Signature Request' - description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' - operationId: signatureRequestReleaseHold - parameters: - - - name: signature_request_id - in: path - description: 'The id of the SignatureRequest to release.' + summary: 'Download Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsDataUri + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string @@ -2845,10 +2879,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' + $ref: '#/components/examples/SignatureRequestFilesResponseExample' 4XX: description: failed_operation content: @@ -2866,6 +2900,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2873,80 +2913,79 @@ paths: api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestFilesAsDataUri.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs + $ref: examples/SignatureRequestFilesAsDataUri.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestFilesAsDataUri.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestFilesAsDataUri.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestFilesAsDataUri.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestFilesAsDataUri.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestFilesAsDataUri.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestFilesAsDataUri.sh x-meta: seo: - title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' - '/signature_request/remind/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_file_url/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Send Request Reminder' + summary: 'Download Files as File Url' description: |- - Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - **NOTE**: This action can **not** be used with embedded signature requests. - operationId: signatureRequestRemind + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsFileUrl parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to send a reminder for.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestRemindRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: 200: description: 'successful operation' @@ -2960,10 +2999,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' + $ref: '#/components/examples/SignatureRequestFilesResponseExample' 4XX: description: failed_operation content: @@ -3001,63 +3040,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestFilesAsFileUrl.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs + $ref: examples/SignatureRequestFilesAsFileUrl.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestFilesAsFileUrl.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestFilesAsFileUrl.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestFilesAsFileUrl.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestFilesAsFileUrl.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestFilesAsFileUrl.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestFilesAsFileUrl.sh x-meta: seo: - title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' - '/signature_request/remove/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Remove Signature Request Access' - description: |- - Removes your access to a completed signature request. This action is **not reversible**. - - The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). - - Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. - operationId: signatureRequestRemove + summary: 'Get Signature Request' + description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' + operationId: signatureRequestGet parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to remove.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string @@ -3073,7 +3107,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestGetResponseExample' 4XX: description: failed_operation content: @@ -3091,8 +3130,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' 410_example: $ref: '#/components/examples/Error410ResponseExample' 4XX_example: @@ -3100,72 +3137,93 @@ paths: security: - api_key: [] + - + oauth2: + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs + $ref: examples/SignatureRequestGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestGet.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestGet.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestGet.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestGet.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestGet.sh x-meta: seo: - title: 'Remove Signature Request Access | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' - /signature_request/send: - post: + title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' + /signature_request/list: + get: tags: - 'Signature Request' - summary: 'Send Signature Request' - description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' - operationId: signatureRequestSend - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' - grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' + summary: 'List Signature Requests' + description: |- + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + + Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + schema: + type: string responses: 200: description: 'successful operation' @@ -3179,10 +3237,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/SignatureRequestListResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' + $ref: '#/components/examples/SignatureRequestListResponseExample' 4XX: description: failed_operation content: @@ -3200,8 +3258,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3216,82 +3272,79 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestList.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs + $ref: examples/SignatureRequestList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestList.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestList.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestList.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestList.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestList.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestList.sh x-meta: seo: - title: 'Send Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' - /signature_request/send_with_template: + title: 'List Signature Requests | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' + '/signature_request/release_hold/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Send with Template' - description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' - operationId: signatureRequestSendWithTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - 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: + summary: 'Release On-Hold Signature Request' + description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to release.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: application/json: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' + $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' 4XX: description: failed_operation content: @@ -3307,8 +3360,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3316,70 +3369,67 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestReleaseHold.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs + $ref: examples/SignatureRequestReleaseHold.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestReleaseHold.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestReleaseHold.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestReleaseHold.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestReleaseHold.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestReleaseHold.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestReleaseHold.sh x-meta: seo: - title: 'Send with Template | API Documentation | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' - '/signature_request/update/{signature_request_id}': + title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' + '/signature_request/remind/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Update Signature Request' + summary: 'Send Request Reminder' description: |- - Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. - - Updating the email address of a signer will generate a new `signature_id` value. + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. - **NOTE**: This action cannot be performed on a signature request with an appended signature page. - operationId: signatureRequestUpdate + **NOTE**: This action can **not** be used with embedded signature requests. + operationId: signatureRequestRemind parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to update.' + description: 'The id of the SignatureRequest to send a reminder for.' required: true schema: type: string @@ -3389,10 +3439,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestUpdateRequest' + $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' responses: 200: description: 'successful operation' @@ -3409,7 +3459,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' + $ref: '#/components/examples/SignatureRequestRemindResponseExample' 4XX: description: failed_operation content: @@ -3427,6 +3477,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3434,79 +3490,74 @@ paths: api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestRemind.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs + $ref: examples/SignatureRequestRemind.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestRemind.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestRemind.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestRemind.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestRemind.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestRemind.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestRemind.sh x-meta: seo: - title: 'Update Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' - /team/add_member: - put: + title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' + '/signature_request/remove/{signature_request_id}': + post: tags: - - Team - summary: 'Add User to Team' - description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' - operationId: teamAddMember + - 'Signature Request' + summary: 'Remove Signature Request Access' + description: |- + Removes your access to a completed signature request. This action is **not reversible**. + + The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + + Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + operationId: signatureRequestRemove parameters: - - name: team_id - in: query - description: 'The id of the team.' - required: false + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to remove.' + required: true schema: type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamAddMemberRequest' - examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: 200: description: 'successful operation' @@ -3518,12 +3569,7 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' + application/json: {} 4XX: description: failed_operation content: @@ -3541,75 +3587,81 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: - api_key: [] - - - oauth2: - - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/SignatureRequestRemove.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs + $ref: examples/SignatureRequestRemove.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamAddMember.js + $ref: examples/SignatureRequestRemove.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/SignatureRequestRemove.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/SignatureRequestRemove.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/SignatureRequestRemove.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/SignatureRequestRemove.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/SignatureRequestRemove.sh x-meta: seo: - title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: + title: 'Remove Signature Request Access | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' + /signature_request/send: post: tags: - - Team - summary: 'Create Team' - description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' - operationId: teamCreate + - 'Signature Request' + summary: 'Send Signature Request' + description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' + operationId: signatureRequestSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamCreateRequest' + $ref: '#/components/schemas/SignatureRequestSendRequest' examples: default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendRequest' responses: 200: description: 'successful operation' @@ -3623,10 +3675,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/TeamCreateResponseExample' + $ref: '#/components/examples/SignatureRequestSendResponseExample' 4XX: description: failed_operation content: @@ -3642,6 +3694,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3649,59 +3705,72 @@ paths: api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/SignatureRequestSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs + $ref: examples/SignatureRequestSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamCreate.js + $ref: examples/SignatureRequestSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/SignatureRequestSend.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/SignatureRequestSend.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/SignatureRequestSend.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/SignatureRequestSend.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/SignatureRequestSend.sh x-meta: seo: - title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: 'Send Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' + /signature_request/send_with_template: + post: tags: - - Team - summary: 'Delete Team' - description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' - operationId: teamDelete + - 'Signature Request' + summary: 'Send with Template' + description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' + operationId: signatureRequestSendWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: 200: description: 'successful operation' @@ -3712,6 +3781,13 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -3727,6 +3803,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3734,59 +3812,83 @@ paths: api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/SignatureRequestSendWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs + $ref: examples/SignatureRequestSendWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamDelete.js + $ref: examples/SignatureRequestSendWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/SignatureRequestSendWithTemplate.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/SignatureRequestSendWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/SignatureRequestSendWithTemplate.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/SignatureRequestSendWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/SignatureRequestSendWithTemplate.sh x-meta: seo: - title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: - get: + title: 'Send with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' + '/signature_request/update/{signature_request_id}': + post: tags: - - Team - summary: 'Get Team' - description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' - operationId: teamGet + - 'Signature Request' + summary: 'Update Signature Request' + description: |- + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + + Updating the email address of a signer will generate a new `signature_id` value. + + **NOTE**: This action cannot be performed on a signature request with an appended signature page. + operationId: signatureRequestUpdate + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to update.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestUpdateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -3800,10 +3902,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/TeamGetResponseExample' + $ref: '#/components/examples/SignatureRequestUpdateResponseExample' 4XX: description: failed_operation content: @@ -3820,7 +3922,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: @@ -3828,67 +3930,79 @@ paths: api_key: [] - oauth2: - - team_access + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/SignatureRequestUpdate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs + $ref: examples/SignatureRequestUpdate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamGet.js + $ref: examples/SignatureRequestUpdate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/SignatureRequestUpdate.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/SignatureRequestUpdate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/SignatureRequestUpdate.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/SignatureRequestUpdate.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/SignatureRequestUpdate.sh x-meta: seo: - title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + title: 'Update Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' + /team/add_member: put: tags: - Team - summary: 'Update Team' - description: 'Updates the name of your Team.' - operationId: teamUpdate + summary: 'Add User to Team' + description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' + operationId: teamAddMember + parameters: + - + name: team_id + in: query + description: 'The id of the team.' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamUpdateRequest' + $ref: '#/components/schemas/TeamAddMemberRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + email_address: + $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' + account_id: + $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' responses: 200: description: 'successful operation' @@ -3905,7 +4019,7 @@ paths: $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' + $ref: '#/components/examples/TeamAddMemberResponseExample' 4XX: description: failed_operation content: @@ -3921,6 +4035,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3934,62 +4050,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamAddMember.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs + $ref: examples/TeamAddMember.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamAddMember.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamAddMember.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamAddMember.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamAddMember.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamAddMember.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamAddMember.sh x-meta: seo: - title: 'Update Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: - get: + title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: tags: - Team - summary: 'Get Team Info' - description: 'Provides information about a team.' - operationId: teamInfo - parameters: - - - name: team_id - in: query - description: 'The id of the team.' - required: false - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + summary: 'Create Team' + description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + default_example: + $ref: '#/components/examples/TeamCreateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4003,10 +4119,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' + $ref: '#/components/examples/TeamCreateResponseExample' 4XX: description: failed_operation content: @@ -4022,10 +4138,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4039,61 +4151,53 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamCreate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs + $ref: examples/TeamCreate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamInfo.js + $ref: examples/TeamCreate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamCreate.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamCreate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamCreate.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamCreate.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamCreate.sh x-meta: seo: - title: 'Get Team Info | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: tags: - Team - summary: 'List Team Invites' - description: 'Provides a list of team invites (and their roles).' - operationId: teamInvites - parameters: - - - name: email_address - in: query - description: 'The email address for which to display the team invites.' - required: false - schema: - type: string + summary: 'Delete Team' + description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' + operationId: teamDelete responses: 200: description: 'successful operation' @@ -4104,13 +4208,6 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/TeamInvitesResponse' - examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' 4XX: description: failed_operation content: @@ -4133,85 +4230,59 @@ paths: api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamDelete.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs + $ref: examples/TeamDelete.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamInvites.js + $ref: examples/TeamDelete.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamDelete.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamDelete.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamDelete.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamDelete.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamDelete.sh x-meta: seo: - title: 'List Team Invites | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' - '/team/members/{team_id}': + title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: get: tags: - Team - summary: 'List Team Members' - description: 'Provides a paginated list of members (and their roles) that belong to a given team.' - operationId: teamMembers - parameters: - - - name: team_id - in: path - description: 'The id of the team that a member list is being requested from.' - required: true - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the team member list to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 + summary: 'Get Team' + description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' + operationId: teamGet responses: 200: description: 'successful operation' @@ -4225,10 +4296,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamMembersResponseExample' + $ref: '#/components/examples/TeamGetResponseExample' 4XX: description: failed_operation content: @@ -4244,10 +4315,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 404_example: + $ref: '#/components/examples/TeamDoesNotExistResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4261,64 +4330,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs + $ref: examples/TeamGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamMembers.js + $ref: examples/TeamGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamGet.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamGet.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamGet.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamGet.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamGet.sh x-meta: seo: - title: 'List Team Members | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: - post: + title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: 'Remove User from Team' - description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' - operationId: teamRemoveMember + summary: 'Update Team' + description: 'Updates the name of your Team.' + operationId: teamUpdate requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' + $ref: '#/components/schemas/TeamUpdateRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + default_example: + $ref: '#/components/examples/TeamUpdateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4335,7 +4401,7 @@ paths: $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' + $ref: '#/components/examples/TeamUpdateResponseExample' 4XX: description: failed_operation content: @@ -4351,8 +4417,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4366,78 +4430,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamUpdate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs + $ref: examples/TeamUpdate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamUpdate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamUpdate.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamUpdate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamUpdate.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamUpdate.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamUpdate.sh x-meta: seo: - title: 'Remove User from Team | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + title: 'Update Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get Team Info' + description: 'Provides information about a team.' + operationId: teamInfo parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'The id of the team.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: 200: description: 'successful operation' @@ -4451,10 +4499,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' + $ref: '#/components/examples/TeamGetInfoResponseExample' 4XX: description: failed_operation content: @@ -4487,71 +4535,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamInfo.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs + $ref: examples/TeamInfo.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamInfo.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamInfo.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamInfo.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamInfo.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamInfo.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamInfo.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': - post: + title: 'Get Team Info | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'List Team Invites' + description: 'Provides a list of team invites (and their roles).' + operationId: teamInvites parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: email_address + in: query + description: 'The email address for which to display the team invites.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4565,10 +4603,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' + $ref: '#/components/examples/TeamInvitesResponseExample' 4XX: description: failed_operation content: @@ -4584,8 +4622,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4593,77 +4629,85 @@ paths: api_key: [] - oauth2: - - template_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TeamInvites.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs + $ref: examples/TeamInvites.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateAddUser.js + $ref: examples/TeamInvites.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TeamInvites.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TeamInvites.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TeamInvites.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TeamInvites.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TeamInvites.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'List Team Invites | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' + '/team/members/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: 'Creates a template that can then be used.' - operationId: templateCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' + - Team + summary: 'List Team Members' + description: 'Provides a paginated list of members (and their roles) that belong to a given team.' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: 'The id of the team that a member list is being requested from.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the team member list to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: 200: description: 'successful operation' @@ -4677,10 +4721,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' + $ref: '#/components/examples/TeamMembersResponseExample' 4XX: description: failed_operation content: @@ -4696,10 +4740,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4707,79 +4751,72 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TeamMembers.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs + $ref: examples/TeamMembers.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateCreate.js + $ref: examples/TeamMembers.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TeamMembers.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TeamMembers.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TeamMembers.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TeamMembers.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TeamMembers.sh x-meta: seo: - title: 'Create Template | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' - /template/create_embedded_draft: + title: 'List Team Members | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: post: tags: - - Template - summary: 'Create Embedded Template Draft' - description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' - operationId: templateCreateEmbeddedDraft + - Team + summary: 'Remove User from Team' + description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' + operationId: teamRemoveMember requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + email_address: + $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' + account_id: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' responses: - 200: + 201: description: 'successful operation' headers: X-RateLimit-Limit: @@ -4791,10 +4828,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' + $ref: '#/components/examples/TeamRemoveMemberResponseExample' 4XX: description: failed_operation content: @@ -4812,8 +4849,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4821,68 +4856,84 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TeamRemoveMember.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs + $ref: examples/TeamRemoveMember.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TeamRemoveMember.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TeamRemoveMember.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TeamRemoveMember.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TeamRemoveMember.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TeamRemoveMember.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TeamRemoveMember.sh x-meta: seo: - title: 'Create Embedded Template Draft | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' - '/template/delete/{template_id}': - post: + title: 'Remove User from Team | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Delete Template' - description: 'Completely deletes the template specified from the account.' - operationId: templateDelete + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams parameters: - - name: template_id + name: team_id in: path - description: 'The id of the Template to delete.' + description: 'The id of the parent Team.' required: true schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: 200: description: 'successful operation' @@ -4894,7 +4945,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/TeamSubTeamsResponse' + examples: + default_example: + $ref: '#/components/examples/TeamSubTeamsResponseExample' 4XX: description: failed_operation content: @@ -4910,10 +4966,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4921,80 +4977,77 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TeamSubTeams.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs + $ref: examples/TeamSubTeams.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateDelete.js + $ref: examples/TeamSubTeams.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TeamSubTeams.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TeamSubTeams.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TeamSubTeams.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TeamSubTeams.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TeamSubTeams.sh x-meta: seo: - title: 'Delete Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' - '/template/files/{template_id}': - get: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: tags: - Template - summary: 'Get Template Files' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFiles + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser parameters: - name: template_id in: path - description: 'The id of the template files to retrieve.' + description: 'The id of the Template to give the Account access to.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -5006,14 +5059,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TemplateGetResponse' + examples: + default_example: + $ref: '#/components/examples/TemplateAddUserResponseExample' 4XX: description: failed_operation content: @@ -5031,12 +5082,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5050,84 +5095,90 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateAddUser.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs + $ref: examples/TemplateAddUser.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateAddUser.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateAddUser.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateAddUser.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateAddUser.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateAddUser.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateAddUser.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_data_uri/{template_id}': - get: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: tags: - Template - summary: 'Get Template Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsDataUri - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - responses: - 200: - description: 'successful operation' - headers: - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-Ratelimit-Reset: - $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/FileResponseDataUri' - examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: - description: failed_operation + summary: 'Create Template' + description: 'Creates a template that can then be used.' + operationId: templateCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + 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/TemplateCreateResponse' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateResponseExample' + 4XX: + description: failed_operation content: application/json: schema: @@ -5145,10 +5196,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5162,72 +5209,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateCreate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs + $ref: examples/TemplateCreate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateCreate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateCreate.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateCreate.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateCreate.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateCreate.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateCreate.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_file_url/{template_id}': - get: + title: 'Create Template | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' + /template/create_embedded_draft: + post: tags: - Template - summary: 'Get Template Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsFileUrl - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + summary: 'Create Embedded Template Draft' + description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' + operationId: templateCreateEmbeddedDraft + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: 200: description: 'successful operation' @@ -5241,10 +5287,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' 4XX: description: failed_operation content: @@ -5264,10 +5310,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5281,58 +5323,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateCreateEmbeddedDraft.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs + $ref: examples/TemplateCreateEmbeddedDraft.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateCreateEmbeddedDraft.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateCreateEmbeddedDraft.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateCreateEmbeddedDraft.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateCreateEmbeddedDraft.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateCreateEmbeddedDraft.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateCreateEmbeddedDraft.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/{template_id}': - get: + title: 'Create Embedded Template Draft | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' + '/template/delete/{template_id}': + post: tags: - Template - summary: 'Get Template' - description: 'Returns the Template specified by the `template_id` parameter.' - operationId: templateGet + summary: 'Delete Template' + description: 'Completely deletes the template specified from the account.' + operationId: templateDelete parameters: - name: template_id in: path - description: 'The id of the Template to retrieve.' + description: 'The id of the Template to delete.' required: true schema: type: string @@ -5348,12 +5390,7 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' + application/json: {} 4XX: description: failed_operation content: @@ -5371,8 +5408,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5386,85 +5423,74 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateDelete.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs + $ref: examples/TemplateDelete.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateDelete.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateDelete.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateDelete.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateDelete.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateDelete.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateDelete.sh x-meta: seo: - title: 'Get Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' - /template/list: + title: 'Delete Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' + '/template/files/{template_id}': get: tags: - Template - summary: 'List Templates' + summary: 'Get Template Files' description: |- - Returns a list of the Templates that are accessible by you. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - operationId: templateList + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFiles parameters: - - name: account_id - in: query - description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: template_id + in: path + description: 'The id of the template files to retrieve.' + required: true schema: type: string + example: f57db65d3f933b5316d398057a36176831451a35 - - name: page - in: query - description: 'Which page number of the Template List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + enum: + - pdf + - zip responses: 200: description: 'successful operation' @@ -5476,12 +5502,14 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/TemplateListResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' + type: string + format: binary + application/zip: + schema: + type: string + format: binary 4XX: description: failed_operation content: @@ -5497,8 +5525,12 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -5514,71 +5546,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs + $ref: examples/TemplateFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateList.js + $ref: examples/TemplateFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateFiles.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateFiles.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateFiles.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateFiles.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateFiles.sh x-meta: seo: - title: 'List Templates | API Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' - '/template/remove_user/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_data_uri/{template_id}': + get: tags: - Template - summary: 'Remove User from Template' - description: 'Removes the specified Account''s access to the specified Template.' - operationId: templateRemoveUser + summary: 'Get Template Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsDataUri parameters: - name: template_id in: path - description: 'The id of the Template to remove the Account''s access to.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateRemoveUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -5592,10 +5618,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' + $ref: '#/components/examples/TemplateFilesResponseExample' 4XX: description: failed_operation content: @@ -5613,6 +5639,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5626,86 +5658,72 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateFilesAsDataUri.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs + $ref: examples/TemplateFilesAsDataUri.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateFilesAsDataUri.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateFilesAsDataUri.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateFilesAsDataUri.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateFilesAsDataUri.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateFilesAsDataUri.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateFilesAsDataUri.sh x-meta: seo: - title: 'Remove User from Template | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' - '/template/update_files/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_file_url/{template_id}': + get: tags: - Template - summary: 'Update Template Files' + summary: 'Get Template Files as File Url' description: |- - Overlays a new file with the overlay of an existing template. The new file(s) must: - - 1. have the same or higher page count - 2. the same orientation as the file(s) being replaced. - - This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. - - Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. - - It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - operationId: templateUpdateFiles + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsFileUrl parameters: - name: template_id in: path - description: 'The ID of the template whose files to update.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: 200: description: 'successful operation' @@ -5719,10 +5737,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateUpdateFilesResponse' + $ref: '#/components/schemas/FileResponse' examples: default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' + $ref: '#/components/examples/TemplateFilesResponseExample' 4XX: description: failed_operation content: @@ -5742,6 +5760,8 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -5757,71 +5777,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateFilesAsFileUrl.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs + $ref: examples/TemplateFilesAsFileUrl.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateFilesAsFileUrl.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateFilesAsFileUrl.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateFilesAsFileUrl.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateFilesAsFileUrl.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateFilesAsFileUrl.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateFilesAsFileUrl.sh x-meta: seo: - title: 'Update Template Files | REST API | Dropbox Sign for Developers' - description: 'Overlays a new file with the overlay of an existing template' - /unclaimed_draft/create: - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/{template_id}': + get: tags: - - 'Unclaimed Draft' - summary: 'Create Unclaimed Draft' - description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' - operationId: unclaimedDraftCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + - Template + summary: 'Get Template' + description: 'Returns the Template specified by the `template_id` parameter.' + operationId: templateGet + parameters: + - + name: template_id + in: path + description: 'The id of the Template to retrieve.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 responses: 200: description: 'successful operation' @@ -5835,10 +5846,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' + $ref: '#/components/examples/TemplateGetResponseExample' 4XX: description: failed_operation content: @@ -5854,6 +5865,10 @@ paths: $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: @@ -5861,80 +5876,91 @@ paths: api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/TemplateGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs + $ref: examples/TemplateGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/TemplateGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/TemplateGet.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/TemplateGet.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/TemplateGet.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/TemplateGet.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/TemplateGet.sh x-meta: seo: - title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' - /unclaimed_draft/create_embedded: - post: + title: 'Get Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' + /template/list: + get: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft' + - Template + summary: 'List Templates' description: |- - Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + Returns a list of the Templates that are accessible by you. - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbedded - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + operationId: templateList + parameters: + - + name: account_id + in: query + description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the Template List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + schema: + type: string responses: 200: description: 'successful operation' @@ -5948,10 +5974,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateListResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' + $ref: '#/components/examples/TemplateListResponseExample' 4XX: description: failed_operation content: @@ -5967,10 +5993,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5978,75 +6004,77 @@ paths: api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/TemplateList.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs + $ref: examples/TemplateList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/TemplateList.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/TemplateList.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/TemplateList.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/TemplateList.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/TemplateList.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/TemplateList.sh x-meta: seo: - title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' - /unclaimed_draft/create_embedded_with_template: + title: 'List Templates | API Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' + '/template/remove_user/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft with Template' - description: |- - Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbeddedWithTemplate + - Template + summary: 'Remove User from Template' + description: 'Removes the specified Account''s access to the specified Template.' + operationId: templateRemoveUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to remove the Account''s access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -6060,10 +6088,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' + $ref: '#/components/examples/TemplateRemoveUserResponseExample' 4XX: description: failed_operation content: @@ -6081,10 +6109,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -6092,80 +6116,92 @@ paths: api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/TemplateRemoveUser.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs + $ref: examples/TemplateRemoveUser.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/TemplateRemoveUser.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/TemplateRemoveUser.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/TemplateRemoveUser.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/TemplateRemoveUser.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/TemplateRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/TemplateRemoveUser.sh x-meta: seo: - title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' - '/unclaimed_draft/edit_and_resend/{signature_request_id}': + title: 'Remove User from Template | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' + '/template/update_files/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Edit and Resend Unclaimed Draft' + - Template + summary: 'Update Template Files' description: |- - Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + Overlays a new file with the overlay of an existing template. The new file(s) must: - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftEditAndResend + 1. have the same or higher page count + 2. the same orientation as the file(s) being replaced. + + This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + + Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + + It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + + If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + operationId: templateUpdateFiles parameters: - - name: signature_request_id + name: template_id in: path - description: 'The ID of the signature request to edit and resend.' + description: 'The ID of the template whose files to update.' required: true schema: type: string - example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: 200: description: 'successful operation' @@ -6179,10 +6215,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' + $ref: '#/components/examples/TemplateUpdateFilesResponseExample' 4XX: description: failed_operation content: @@ -6202,8 +6238,8 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -6211,157 +6247,617 @@ paths: api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/TemplateUpdateFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs + $ref: examples/TemplateUpdateFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/TemplateUpdateFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/TemplateUpdateFiles.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/TemplateUpdateFiles.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/TemplateUpdateFiles.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/TemplateUpdateFiles.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/TemplateUpdateFiles.sh x-meta: seo: - title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' -components: - schemas: - AccountCreateRequest: - required: - - email_address - properties: - client_id: - description: |- - Used when creating a new account with OAuth authorization. - - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - client_secret: - description: |- - Used when creating a new account with OAuth authorization. - - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - email_address: - description: 'The email address which will be associated with the new Account.' - type: string - format: email - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountUpdateRequest: - properties: - account_id: - description: 'The ID of the Account' - type: string - nullable: true - callback_url: - description: 'The URL that Dropbox Sign should POST events to.' - type: string - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountVerifyRequest: - required: - - email_address - properties: - email_address: - description: 'Email address to run the verification for.' - type: string - format: email - type: object - ApiAppCreateRequest: - required: - - name - - domains - properties: - callback_url: - description: 'The URL at which the ApiApp should receive event callbacks.' - type: string - custom_logo_file: - description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' - type: string - format: binary - domains: - description: 'The domain names the ApiApp will be associated with.' - type: array - items: - type: string - maxItems: 2 - minItems: 1 - name: - description: 'The name you want to assign to the ApiApp.' - type: string - oauth: - $ref: '#/components/schemas/SubOAuth' - options: - $ref: '#/components/schemas/SubOptions' - white_labeling_options: - $ref: '#/components/schemas/SubWhiteLabelingOptions' - type: object - ApiAppUpdateRequest: - properties: - callback_url: - description: 'The URL at which the API App should receive event callbacks.' - type: string - custom_logo_file: - description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' - type: string - format: binary - domains: - description: 'The domain names the ApiApp will be associated with.' - type: array - items: - type: string - maxItems: 2 - name: - description: 'The name you want to assign to the ApiApp.' - type: string - oauth: - $ref: '#/components/schemas/SubOAuth' - options: - $ref: '#/components/schemas/SubOptions' - white_labeling_options: - $ref: '#/components/schemas/SubWhiteLabelingOptions' - type: object - EmbeddedEditUrlRequest: - properties: + title: 'Update Template Files | REST API | Dropbox Sign for Developers' + description: 'Overlays a new file with the overlay of an existing template' + /unclaimed_draft/create: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Unclaimed Draft' + description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' + operationId: unclaimedDraftCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' + 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: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreate.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreate.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreate.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreate.sh + x-meta: + seo: + title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' + /unclaimed_draft/create_embedded: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft' + description: |- + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbedded + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' + 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' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbedded.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbedded.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreateEmbedded.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbedded.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbedded.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbedded.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbedded.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbedded.sh + x-meta: + seo: + title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' + /unclaimed_draft/create_embedded_with_template: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft with Template' + description: |- + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbeddedWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' + 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' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + x-meta: + seo: + title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' + '/unclaimed_draft/edit_and_resend/{signature_request_id}': + post: + tags: + - 'Unclaimed Draft' + summary: 'Edit and Resend Unclaimed Draft' + description: |- + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftEditAndResend + parameters: + - + name: signature_request_id + in: path + description: 'The ID of the signature request to edit and resend.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' + 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' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftEditAndResend.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftEditAndResend.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftEditAndResend.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftEditAndResend.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftEditAndResend.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftEditAndResend.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftEditAndResend.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftEditAndResend.sh + x-meta: + seo: + title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' +components: + schemas: + AccountCreateRequest: + required: + - email_address + properties: + client_id: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + client_secret: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + email_address: + description: 'The email address which will be associated with the new Account.' + type: string + format: email + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountUpdateRequest: + properties: + account_id: + description: 'The ID of the Account' + type: string + nullable: true + callback_url: + description: 'The URL that Dropbox Sign should POST events to.' + type: string + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountVerifyRequest: + required: + - email_address + properties: + email_address: + description: 'Email address to run the verification for.' + type: string + format: email + type: object + ApiAppCreateRequest: + required: + - name + - domains + properties: + callback_url: + description: 'The URL at which the ApiApp should receive event callbacks.' + type: string + custom_logo_file: + description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' + type: string + format: binary + domains: + description: 'The domain names the ApiApp will be associated with.' + type: array + items: + type: string + maxItems: 2 + minItems: 1 + name: + description: 'The name you want to assign to the ApiApp.' + type: string + oauth: + $ref: '#/components/schemas/SubOAuth' + options: + $ref: '#/components/schemas/SubOptions' + white_labeling_options: + $ref: '#/components/schemas/SubWhiteLabelingOptions' + type: object + ApiAppUpdateRequest: + properties: + callback_url: + description: 'The URL at which the API App should receive event callbacks.' + type: string + custom_logo_file: + description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' + type: string + format: binary + domains: + description: 'The domain names the ApiApp will be associated with.' + type: array + items: + type: string + maxItems: 2 + name: + description: 'The name you want to assign to the ApiApp.' + type: string + oauth: + $ref: '#/components/schemas/SubOAuth' + options: + $ref: '#/components/schemas/SubOptions' + white_labeling_options: + $ref: '#/components/schemas/SubWhiteLabelingOptions' + type: object + EmbeddedEditUrlRequest: + properties: allow_edit_ccs: description: 'This allows the requester to enable/disable to add or change CC roles when editing the template.' type: boolean @@ -6470,9 +6966,98 @@ components: description: 'The (inclusive) start date for the report data in `MM/DD/YYYY` format.' type: string type: object - SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + signer_file: + description: |- + `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: + + - `name`: the name of the signer filling the role of RoleName + - `email_address`: email address of the signer filling the role of RoleName + - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) + - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) + + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + + **Note**: Not available in test mode and requires a Standard plan or higher. + - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) + + You may only specify field values here, any other options should be set in the custom_fields request parameter. + + Example CSV: + + ``` + name, email_address, pin, company_field + George, george@example.com, d79a3td, ABC Corp + Mary, mary@example.com, gd9as5b, 123 LLC + ``` + type: string + format: binary + signer_list: + description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestBulkSendWithTemplateRequest: required: - - client_id - template_ids properties: template_ids: @@ -6489,6 +7074,8 @@ components: - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) @@ -6518,7 +7105,7 @@ components: items: $ref: '#/components/schemas/SubCC' client_id: - description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string custom_fields: description: |- @@ -6558,52 +7145,299 @@ components: type: string maxLength: 255 type: object - SignatureRequestBulkSendWithTemplateRequest: + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **Note**: Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: required: + - client_id - template_ids + - signers properties: template_ids: description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' type: array items: type: string - signer_file: + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + type: object + SignatureRequestEditRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: description: |- - `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - - - `name`: the name of the signer filling the role of RoleName - - `email_address`: email address of the signer filling the role of RoleName - - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) - - **Note**: Not available in test mode and requires a Standard plan or higher. - - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - You may only specify field values here, any other options should be set in the custom_fields request parameter. + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. - Example CSV: + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. - ``` - name, email_address, pin, company_field - George, george@example.com, d79a3td, ABC Corp - Mary, mary@example.com, gd9as5b, 123 LLC - ``` - type: string - format: binary - signer_list: - description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + This endpoint requires either **signers** or **grouped_signers**, but not both. type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' type: boolean default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **Note**: Only available for Premium plan and higher. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email client_id: description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string @@ -6617,6 +7451,63 @@ components: type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + is_qualified_signature: + description: |- + Send with a value of `true` if you wish to enable + [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), + which requires a face-to-face call to verify the signer's identity.
+ **Note**: QES is only available on the Premium API plan as an add-on purchase. + Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + deprecated: true + x-hideOn: doc + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false message: description: 'The custom message in the email that will be sent to the signers.' type: string @@ -6629,6 +7520,8 @@ components: type: object maxItems: 10 additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' type: string @@ -6644,8 +7537,16 @@ components: description: 'The title you want to assign to the SignatureRequest.' type: string maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -6797,7 +7698,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -6881,6 +7782,105 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + is_qualified_signature: + description: |- + Send with a value of `true` if you wish to enable + [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), + which requires a face-to-face call to verify the signer's identity.
+ **Note**: QES is only available on the Premium API plan as an add-on purchase. + Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + deprecated: true + x-hideOn: doc + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -7531,6 +8531,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7583,6 +8584,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7633,6 +8635,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7768,6 +8771,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7810,6 +8814,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -8024,6 +9029,8 @@ components: description: |- An E.164 formatted phone number. + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. type: string sms_phone_number_type: @@ -8063,6 +9070,8 @@ components: description: |- An E.164 formatted phone number. + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. type: string sms_phone_number_type: @@ -9680,6 +10689,10 @@ components: description: 'The URL you want the signer redirected to after they successfully sign.' type: string nullable: true + final_copy_uri: + description: 'The path where the completed document can be downloaded' + type: string + nullable: true template_ids: description: 'Templates IDs used in this SignatureRequest (if any).' type: array @@ -9713,6 +10726,10 @@ components: type: array items: $ref: '#/components/schemas/SignatureRequestResponseSignatures' + bulk_send_job_id: + description: 'The ID of the Bulk Send job which sent the signature request, if applicable.' + type: string + nullable: true type: object x-internal: true SignatureRequestResponseAttachment: @@ -11208,7 +12225,6 @@ components: - event_time - event_type - event_hash - - event_metadata properties: event_time: description: 'Time the event was created (using Unix time).' @@ -11239,6 +12255,7 @@ components: - template_created - template_error - callback_test + - signature_request_signer_removed event_hash: description: 'Generated hash used to verify source of event data.' type: string @@ -11334,6 +12351,30 @@ components: summary: 'Default Example' value: $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json + SignatureRequestEditRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditRequestDefaultExample.json + SignatureRequestEditRequestGroupedSignersExample: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSignersExample.json + SignatureRequestEditEmbeddedRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedRequestDefaultExample.json + SignatureRequestEditEmbeddedRequestGroupedSignersExample: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSignersExample.json + SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample.json + SignatureRequestEditWithTemplateRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditWithTemplateRequestDefaultExample.json SignatureRequestRemindRequestDefaultExample: summary: 'Default Example' value: @@ -11582,10 +12623,18 @@ components: summary: 'Create Embedded Signature Request' value: $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json + SignatureRequestEditEmbeddedResponseExample: + summary: 'Edit Embedded Signature Request' + value: + $ref: examples/json/SignatureRequestEditEmbeddedResponseExample.json SignatureRequestCreateEmbeddedWithTemplateResponseExample: summary: 'Create Embedded Signature Request With Template' value: $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json + SignatureRequestEditEmbeddedWithTemplateResponseExample: + summary: 'Edit Embedded Signature Request With Template' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateResponseExample.json SignatureRequestFilesResponseExample: summary: 'Signature Requests Files' value: @@ -11602,10 +12651,18 @@ components: summary: 'Send Signature Request' value: $ref: examples/json/SignatureRequestSendResponseExample.json + SignatureRequestEditResponseExample: + summary: 'Edit Signature Request' + value: + $ref: examples/json/SignatureRequestEditResponseExample.json SignatureRequestSendWithTemplateResponseExample: summary: 'Send Signature Request With Template' value: $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json + SignatureRequestEditWithTemplateResponseExample: + summary: 'Edit Signature Request With Template' + value: + $ref: examples/json/SignatureRequestEditWithTemplateResponseExample.json SignatureRequestUpdateResponseExample: summary: 'Signature Request Update' value: diff --git a/src/Dropbox.Sign.Test/EventCallbackHelperTests.cs b/src/Dropbox.Sign.Test/EventCallbackHelperTests.cs index bbe8761..5a213a6 100644 --- a/src/Dropbox.Sign.Test/EventCallbackHelperTests.cs +++ b/src/Dropbox.Sign.Test/EventCallbackHelperTests.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json; using Xunit; using Dropbox.Sign.Model; @@ -13,22 +12,50 @@ public class EventCallbackHelperTests [Fact] public void IsValidTest() { - var keys = new List + var account_keys = new List { "base", + "base_no_metadata", "account", + "account_no_metadata", "signature_request", + "signature_request_no_metadata", "template", + "template_no_metadata", }; - foreach (var key in keys) + foreach (var key in account_keys) { - var requestData = TestHelper.GetJsonContents(nameof(EventCallbackHelper), key); + var requestData = TestHelper.GetJsonContents("EventCallbackHelper_AccountCallbacks", key); var callbackEvent = EventCallbackRequest.Init(requestData.ToString()); Assert.True(EventCallbackHelper.IsValid(ApiKey, callbackEvent)); Assert.False(EventCallbackHelper.IsValid(Reverse(ApiKey), callbackEvent)); + Assert.Equal( + EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK, + EventCallbackHelper.GetCallbackType(callbackEvent) + ); + } + + var app_keys = new List + { + "base", + "account", + "signature_request", + "template", + }; + + foreach (var key in app_keys) + { + var requestData = TestHelper.GetJsonContents("EventCallbackHelper_AppCallbacks", key); + var callbackEvent = EventCallbackRequest.Init(requestData.ToString()); + Assert.True(EventCallbackHelper.IsValid(ApiKey, callbackEvent)); + Assert.False(EventCallbackHelper.IsValid(Reverse(ApiKey), callbackEvent)); + Assert.Equal( + EventCallbackHelper.EVENT_TYPE_APP_CALLBACK, + EventCallbackHelper.GetCallbackType(callbackEvent) + ); } } diff --git a/src/Dropbox.Sign/Api/SignatureRequestApi.cs b/src/Dropbox.Sign/Api/SignatureRequestApi.cs index eb79bee..22fe492 100644 --- a/src/Dropbox.Sign/Api/SignatureRequestApi.cs +++ b/src/Dropbox.Sign/Api/SignatureRequestApi.cs @@ -143,6 +143,106 @@ public interface ISignatureRequestApiSync : IApiAccessor /// ApiResponse of SignatureRequestGetResponse ApiResponse SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0); /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEdit(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0); + + /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditWithHttpInfo(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0); + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditEmbedded(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0); + + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditEmbeddedWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0); + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0); + + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0); + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditWithTemplate(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0); + + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0); + /// /// Download Files /// /// @@ -544,6 +644,114 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Task of ApiResponse (SignatureRequestGetResponse) System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditEmbeddedAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditEmbeddedWithTemplateAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditWithTemplateAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Download Files /// /// @@ -1833,6 +2041,806 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq return localVarResponse; } + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEdit(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditWithHttpInfo(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + // verify the required parameter 'signatureRequestEditRequest' is set + if (signatureRequestEditRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditRequest' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEdit"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEdit", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditWithHttpInfoAsync(signatureRequestId, signatureRequestEditRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + // verify the required parameter 'signatureRequestEditRequest' is set + if (signatureRequestEditRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditRequest' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEdit"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEdit", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditEmbedded(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditEmbeddedWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedRequest); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditEmbeddedWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedRequest' is set + if (signatureRequestEditEmbeddedRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedRequest' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbedded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_embedded/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbedded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditEmbeddedAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditEmbeddedWithHttpInfoAsync(signatureRequestId, signatureRequestEditEmbeddedRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedRequest' is set + if (signatureRequestEditEmbeddedRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedRequest' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbedded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_embedded/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbedded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is set + if (signatureRequestEditEmbeddedWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_embedded_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbeddedWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditEmbeddedWithTemplateAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. <u>Note</u> that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is set + if (signatureRequestEditEmbeddedWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_embedded_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbeddedWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditWithTemplate(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditWithTemplateRequest); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditWithTemplateRequest' is set + if (signatureRequestEditWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditWithTemplateAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditWithTemplateWithHttpInfoAsync(signatureRequestId, signatureRequestEditWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditWithTemplateRequest' is set + if (signatureRequestEditWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Download Files Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. /// diff --git a/src/Dropbox.Sign/Client/Configuration.cs b/src/Dropbox.Sign/Client/Configuration.cs index 3fd2864..6dec993 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.3.0"; + public const string Version = "1.4.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -118,7 +118,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.3.0/csharp"); + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.4.0/csharp"); BasePath = "https://api.hellosign.com/v3"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -550,7 +550,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.3.0\n"; + report += " SDK Package Version: 1.4.0\n"; return report; } diff --git a/src/Dropbox.Sign/Dropbox.Sign.csproj b/src/Dropbox.Sign/Dropbox.Sign.csproj index 5332c75..fbf46dd 100644 --- a/src/Dropbox.Sign/Dropbox.Sign.csproj +++ b/src/Dropbox.Sign/Dropbox.Sign.csproj @@ -11,7 +11,7 @@ Dropbox Sign .Net SDK Client library for using the Dropbox Sign API Dropbox.Sign - 1.3.0 + 1.4.0 bin\$(Configuration)\$(TargetFramework)\Dropbox.Sign.xml https://github.com/hellosign/dropbox-sign-dotnet.git git diff --git a/src/Dropbox.Sign/EventCallbackHelper.cs b/src/Dropbox.Sign/EventCallbackHelper.cs index ed1b9b9..40fa9a2 100644 --- a/src/Dropbox.Sign/EventCallbackHelper.cs +++ b/src/Dropbox.Sign/EventCallbackHelper.cs @@ -35,7 +35,7 @@ public static string GetCallbackType(EventCallbackRequest eventCallback) { var metaData = eventCallback.Event.EventMetadata; - if (String.IsNullOrEmpty(metaData.ReportedForAppId)) + if (metaData == null || String.IsNullOrEmpty(metaData.ReportedForAppId)) { return EVENT_TYPE_ACCOUNT_CALLBACK; } diff --git a/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs b/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs index b7152a9..c1a68e6 100644 --- a/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs +++ b/src/Dropbox.Sign/Model/BulkSendJobGetResponseSignatureRequests.cs @@ -59,13 +59,14 @@ protected BulkSendJobGetResponseSignatureRequests() { } /// The URL where the requester and the signers can view the current status of the SignatureRequest.. /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.. /// The URL you want the signer redirected to after they successfully sign.. + /// The path where the completed document can be downloaded. /// Templates IDs used in this SignatureRequest (if any).. /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. /// Signer attachments.. /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. /// An array of signature objects, 1 for each signer.. /// The id of the BulkSendJob.. - public BulkSendJobGetResponseSignatureRequests(bool? testMode = false, string signatureRequestId = default(string), string requesterEmailAddress = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Object metadata = default(Object), int createdAt = default(int), int expiresAt = default(int), bool isComplete = default(bool), bool isDeclined = default(bool), bool hasError = default(bool), string filesUrl = default(string), string signingUrl = default(string), string detailsUrl = default(string), List ccEmailAddresses = default(List), string signingRedirectUrl = default(string), List templateIds = default(List), List customFields = default(List), List attachments = default(List), List responseData = default(List), List signatures = default(List), string bulkSendJobId = default(string)) + public BulkSendJobGetResponseSignatureRequests(bool? testMode = false, string signatureRequestId = default(string), string requesterEmailAddress = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Object metadata = default(Object), int createdAt = default(int), int expiresAt = default(int), bool isComplete = default(bool), bool isDeclined = default(bool), bool hasError = default(bool), string filesUrl = default(string), string signingUrl = default(string), string detailsUrl = default(string), List ccEmailAddresses = default(List), string signingRedirectUrl = default(string), string finalCopyUri = default(string), List templateIds = default(List), List customFields = default(List), List attachments = default(List), List responseData = default(List), List signatures = default(List), string bulkSendJobId = default(string)) { // use default value if no "testMode" provided @@ -87,6 +88,7 @@ protected BulkSendJobGetResponseSignatureRequests() { } this.DetailsUrl = detailsUrl; this.CcEmailAddresses = ccEmailAddresses; this.SigningRedirectUrl = signingRedirectUrl; + this.FinalCopyUri = finalCopyUri; this.TemplateIds = templateIds; this.CustomFields = customFields; this.Attachments = attachments; @@ -237,6 +239,13 @@ public static BulkSendJobGetResponseSignatureRequests Init(string jsonData) [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } + /// + /// The path where the completed document can be downloaded + /// + /// The path where the completed document can be downloaded + [DataMember(Name = "final_copy_uri", EmitDefaultValue = true)] + public string FinalCopyUri { get; set; } + /// /// Templates IDs used in this SignatureRequest (if any). /// @@ -305,6 +314,7 @@ public override string ToString() sb.Append(" DetailsUrl: ").Append(DetailsUrl).Append("\n"); sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); + sb.Append(" FinalCopyUri: ").Append(FinalCopyUri).Append("\n"); sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); sb.Append(" Attachments: ").Append(Attachments).Append("\n"); @@ -432,6 +442,11 @@ public bool Equals(BulkSendJobGetResponseSignatureRequests input) (this.SigningRedirectUrl != null && this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) ) && + ( + this.FinalCopyUri == input.FinalCopyUri || + (this.FinalCopyUri != null && + this.FinalCopyUri.Equals(input.FinalCopyUri)) + ) && ( this.TemplateIds == input.TemplateIds || this.TemplateIds != null && @@ -535,6 +550,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); } + if (this.FinalCopyUri != null) + { + hashCode = (hashCode * 59) + this.FinalCopyUri.GetHashCode(); + } if (this.TemplateIds != null) { hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); @@ -674,6 +693,12 @@ public List GetOpenApiTypes() Type = "string", Value = SigningRedirectUrl, }); + types.Add(new OpenApiType(){ + Name = "final_copy_uri", + Property = "FinalCopyUri", + Type = "string", + Value = FinalCopyUri, + }); types.Add(new OpenApiType(){ Name = "template_ids", Property = "TemplateIds", diff --git a/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs b/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs index 1bb377a..9513fff 100644 --- a/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs +++ b/src/Dropbox.Sign/Model/EventCallbackRequestEvent.cs @@ -170,7 +170,13 @@ public enum EventTypeEnum /// Enum CallbackTest for value: callback_test /// [EnumMember(Value = "callback_test")] - CallbackTest = 22 + CallbackTest = 22, + + /// + /// Enum SignatureRequestSignerRemoved for value: signature_request_signer_removed + /// + [EnumMember(Value = "signature_request_signer_removed")] + SignatureRequestSignerRemoved = 23 } @@ -192,7 +198,7 @@ protected EventCallbackRequestEvent() { } /// Time the event was created (using Unix time). (required). /// Type of callback event that was triggered. (required). /// Generated hash used to verify source of event data. (required). - /// eventMetadata (required). + /// eventMetadata. public EventCallbackRequestEvent(string eventTime = default(string), EventTypeEnum eventType = default(EventTypeEnum), string eventHash = default(string), EventCallbackRequestEventMetadata eventMetadata = default(EventCallbackRequestEventMetadata)) { @@ -209,11 +215,6 @@ protected EventCallbackRequestEvent() { } throw new ArgumentNullException("eventHash is a required property for EventCallbackRequestEvent and cannot be null"); } this.EventHash = eventHash; - // to ensure "eventMetadata" is required (not null) - if (eventMetadata == null) - { - throw new ArgumentNullException("eventMetadata is a required property for EventCallbackRequestEvent and cannot be null"); - } this.EventMetadata = eventMetadata; } @@ -250,7 +251,7 @@ public static EventCallbackRequestEvent Init(string jsonData) /// /// Gets or Sets EventMetadata /// - [DataMember(Name = "event_metadata", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "event_metadata", EmitDefaultValue = true)] public EventCallbackRequestEventMetadata EventMetadata { get; set; } /// diff --git a/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs index 7700668..fd825ec 100644 --- a/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs +++ b/src/Dropbox.Sign/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.cs @@ -42,7 +42,7 @@ protected SignatureRequestBulkCreateEmbeddedWithTemplateRequest() { } /// 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). - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```. + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```. /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. /// 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.. @@ -113,9 +113,9 @@ public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest Init(string public string ClientId { get; set; } /// - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` /// - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` [DataMember(Name = "signer_file", EmitDefaultValue = true)] public System.IO.Stream SignerFile { get; set; } diff --git a/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs index 5b4fdf8..ae37604 100644 --- a/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs +++ b/src/Dropbox.Sign/Model/SignatureRequestBulkSendWithTemplateRequest.cs @@ -42,7 +42,7 @@ protected SignatureRequestBulkSendWithTemplateRequest() { } /// 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). - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```. + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```. /// `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.. /// 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.. @@ -101,9 +101,9 @@ public static SignatureRequestBulkSendWithTemplateRequest Init(string jsonData) public List TemplateIds { get; set; } /// - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` /// - /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + /// `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` [DataMember(Name = "signer_file", EmitDefaultValue = true)] public System.IO.Stream SignerFile { get; set; } diff --git a/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs b/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs new file mode 100644 index 0000000..b615630 --- /dev/null +++ b/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs @@ -0,0 +1,749 @@ +/* + * 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 new file mode 100644 index 0000000..ee9e1f6 --- /dev/null +++ b/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs @@ -0,0 +1,543 @@ +/* + * 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 new file mode 100644 index 0000000..d858c1c --- /dev/null +++ b/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs @@ -0,0 +1,791 @@ +/* + * 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 new file mode 100644 index 0000000..2348855 --- /dev/null +++ b/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs @@ -0,0 +1,585 @@ +/* + * 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/SignatureRequestResponse.cs b/src/Dropbox.Sign/Model/SignatureRequestResponse.cs index e318237..b2663d8 100644 --- a/src/Dropbox.Sign/Model/SignatureRequestResponse.cs +++ b/src/Dropbox.Sign/Model/SignatureRequestResponse.cs @@ -59,12 +59,14 @@ protected SignatureRequestResponse() { } /// The URL where the requester and the signers can view the current status of the SignatureRequest.. /// A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.. /// The URL you want the signer redirected to after they successfully sign.. + /// The path where the completed document can be downloaded. /// Templates IDs used in this SignatureRequest (if any).. /// An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`. /// Signer attachments.. /// An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.. /// An array of signature objects, 1 for each signer.. - public SignatureRequestResponse(bool? testMode = false, string signatureRequestId = default(string), string requesterEmailAddress = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Object metadata = default(Object), int createdAt = default(int), int expiresAt = default(int), bool isComplete = default(bool), bool isDeclined = default(bool), bool hasError = default(bool), string filesUrl = default(string), string signingUrl = default(string), string detailsUrl = default(string), List ccEmailAddresses = default(List), string signingRedirectUrl = default(string), List templateIds = default(List), List customFields = default(List), List attachments = default(List), List responseData = default(List), List signatures = default(List)) + /// The ID of the Bulk Send job which sent the signature request, if applicable.. + public SignatureRequestResponse(bool? testMode = false, string signatureRequestId = default(string), string requesterEmailAddress = default(string), string title = default(string), string originalTitle = default(string), string subject = default(string), string message = default(string), Object metadata = default(Object), int createdAt = default(int), int expiresAt = default(int), bool isComplete = default(bool), bool isDeclined = default(bool), bool hasError = default(bool), string filesUrl = default(string), string signingUrl = default(string), string detailsUrl = default(string), List ccEmailAddresses = default(List), string signingRedirectUrl = default(string), string finalCopyUri = default(string), List templateIds = default(List), List customFields = default(List), List attachments = default(List), List responseData = default(List), List signatures = default(List), string bulkSendJobId = default(string)) { // use default value if no "testMode" provided @@ -86,11 +88,13 @@ protected SignatureRequestResponse() { } this.DetailsUrl = detailsUrl; this.CcEmailAddresses = ccEmailAddresses; this.SigningRedirectUrl = signingRedirectUrl; + this.FinalCopyUri = finalCopyUri; this.TemplateIds = templateIds; this.CustomFields = customFields; this.Attachments = attachments; this.ResponseData = responseData; this.Signatures = signatures; + this.BulkSendJobId = bulkSendJobId; } /// @@ -235,6 +239,13 @@ public static SignatureRequestResponse Init(string jsonData) [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] public string SigningRedirectUrl { get; set; } + /// + /// The path where the completed document can be downloaded + /// + /// The path where the completed document can be downloaded + [DataMember(Name = "final_copy_uri", EmitDefaultValue = true)] + public string FinalCopyUri { get; set; } + /// /// Templates IDs used in this SignatureRequest (if any). /// @@ -270,6 +281,13 @@ public static SignatureRequestResponse Init(string jsonData) [DataMember(Name = "signatures", EmitDefaultValue = true)] public List Signatures { get; set; } + /// + /// The ID of the Bulk Send job which sent the signature request, if applicable. + /// + /// The ID of the Bulk Send job which sent the signature request, if applicable. + [DataMember(Name = "bulk_send_job_id", EmitDefaultValue = true)] + public string BulkSendJobId { get; set; } + /// /// Returns the string presentation of the object /// @@ -296,11 +314,13 @@ public override string ToString() sb.Append(" DetailsUrl: ").Append(DetailsUrl).Append("\n"); sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); + sb.Append(" FinalCopyUri: ").Append(FinalCopyUri).Append("\n"); sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); sb.Append(" Attachments: ").Append(Attachments).Append("\n"); sb.Append(" ResponseData: ").Append(ResponseData).Append("\n"); sb.Append(" Signatures: ").Append(Signatures).Append("\n"); + sb.Append(" BulkSendJobId: ").Append(BulkSendJobId).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -422,6 +442,11 @@ public bool Equals(SignatureRequestResponse input) (this.SigningRedirectUrl != null && this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) ) && + ( + this.FinalCopyUri == input.FinalCopyUri || + (this.FinalCopyUri != null && + this.FinalCopyUri.Equals(input.FinalCopyUri)) + ) && ( this.TemplateIds == input.TemplateIds || this.TemplateIds != null && @@ -451,6 +476,11 @@ public bool Equals(SignatureRequestResponse input) this.Signatures != null && input.Signatures != null && this.Signatures.SequenceEqual(input.Signatures) + ) && + ( + this.BulkSendJobId == input.BulkSendJobId || + (this.BulkSendJobId != null && + this.BulkSendJobId.Equals(input.BulkSendJobId)) ); } @@ -520,6 +550,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); } + if (this.FinalCopyUri != null) + { + hashCode = (hashCode * 59) + this.FinalCopyUri.GetHashCode(); + } if (this.TemplateIds != null) { hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); @@ -540,6 +574,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Signatures.GetHashCode(); } + if (this.BulkSendJobId != null) + { + hashCode = (hashCode * 59) + this.BulkSendJobId.GetHashCode(); + } return hashCode; } } @@ -655,6 +693,12 @@ public List GetOpenApiTypes() Type = "string", Value = SigningRedirectUrl, }); + types.Add(new OpenApiType(){ + Name = "final_copy_uri", + Property = "FinalCopyUri", + Type = "string", + Value = FinalCopyUri, + }); types.Add(new OpenApiType(){ Name = "template_ids", Property = "TemplateIds", @@ -685,6 +729,12 @@ public List GetOpenApiTypes() Type = "List", Value = Signatures, }); + types.Add(new OpenApiType(){ + Name = "bulk_send_job_id", + Property = "BulkSendJobId", + Type = "string", + Value = BulkSendJobId, + }); return types; } diff --git a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs index ddc8137..4f4df3b 100644 --- a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs +++ b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDateSigned.cs @@ -167,7 +167,7 @@ protected SubFormFieldsPerDocumentDateSigned() { } /// /// A date. Use the `SubFormFieldsPerDocumentDateSigned` class. (required) (default to "date_signed"). /// Font family for the field.. - /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field.. + /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. (default to 12). /// Represents the integer index of the `file` or `file_url` document the field should be attached to. (required). /// An identifier for the field that is unique across all documents in the request. (required). /// Size of the field in pixels. (required). @@ -178,7 +178,7 @@ protected SubFormFieldsPerDocumentDateSigned() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentDateSigned(string type = "date_signed", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = default(int), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentDateSigned(string type = "date_signed", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; diff --git a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs index 0d12744..8ebd7cc 100644 --- a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs +++ b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentDropdown.cs @@ -169,7 +169,7 @@ protected SubFormFieldsPerDocumentDropdown() { } /// Array of string values representing dropdown values. (required). /// Selected value in `options` array. Value must exist in array.. /// Font family for the field.. - /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field.. + /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. (default to 12). /// Represents the integer index of the `file` or `file_url` document the field should be attached to. (required). /// An identifier for the field that is unique across all documents in the request. (required). /// Size of the field in pixels. (required). @@ -180,7 +180,7 @@ protected SubFormFieldsPerDocumentDropdown() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentDropdown(string type = "dropdown", List options = default(List), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = default(int), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentDropdown(string type = "dropdown", List options = default(List), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; diff --git a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs index ef4f038..8e8da49 100644 --- a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs +++ b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentHyperlink.cs @@ -169,7 +169,7 @@ protected SubFormFieldsPerDocumentHyperlink() { } /// Link Text. (required). /// Link URL. (required). /// Font family for the field.. - /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field.. + /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. (default to 12). /// Represents the integer index of the `file` or `file_url` document the field should be attached to. (required). /// An identifier for the field that is unique across all documents in the request. (required). /// Size of the field in pixels. (required). @@ -180,7 +180,7 @@ protected SubFormFieldsPerDocumentHyperlink() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentHyperlink(string type = "hyperlink", string content = default(string), string contentUrl = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = default(int), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentHyperlink(string type = "hyperlink", string content = default(string), string contentUrl = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; diff --git a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs index 791a1c1..bdd6be4 100644 --- a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs +++ b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentText.cs @@ -251,7 +251,7 @@ protected SubFormFieldsPerDocumentText() { } /// validationCustomRegexFormatLabel. /// Content of a `me_now` text field. /// Font family for the field.. - /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field.. + /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. (default to 12). /// Represents the integer index of the `file` or `file_url` document the field should be attached to. (required). /// An identifier for the field that is unique across all documents in the request. (required). /// Size of the field in pixels. (required). @@ -262,7 +262,7 @@ protected SubFormFieldsPerDocumentText() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentText(string type = "text", string placeholder = default(string), string autoFillType = default(string), string linkId = default(string), bool masked = default(bool), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string validationCustomRegex = default(string), string validationCustomRegexFormatLabel = default(string), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = default(int), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentText(string type = "text", string placeholder = default(string), string autoFillType = default(string), string linkId = default(string), bool masked = default(bool), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string validationCustomRegex = default(string), string validationCustomRegexFormatLabel = default(string), string content = default(string), FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; diff --git a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs index 5e54837..3b5ced8 100644 --- a/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs +++ b/src/Dropbox.Sign/Model/SubFormFieldsPerDocumentTextMerge.cs @@ -167,7 +167,7 @@ protected SubFormFieldsPerDocumentTextMerge() { } /// /// A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. (required) (default to "text-merge"). /// Font family for the field.. - /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field.. + /// The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. (default to 12). /// Represents the integer index of the `file` or `file_url` document the field should be attached to. (required). /// An identifier for the field that is unique across all documents in the request. (required). /// Size of the field in pixels. (required). @@ -178,7 +178,7 @@ protected SubFormFieldsPerDocumentTextMerge() { } /// Size of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). /// Location coordinates of the field in pixels. (required). - public SubFormFieldsPerDocumentTextMerge(string type = "text-merge", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = default(int), int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) + public SubFormFieldsPerDocumentTextMerge(string type = "text-merge", FontFamilyEnum? fontFamily = default(FontFamilyEnum?), int fontSize = 12, int documentIndex = default(int), string apiId = default(string), int height = default(int), string name = default(string), int? page = default(int?), bool required = default(bool), Object signer = null, int width = default(int), int x = default(int), int y = default(int)) { this.DocumentIndex = documentIndex; this.ApiId = apiId; diff --git a/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs b/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs index 08fe72c..966463a 100644 --- a/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs +++ b/src/Dropbox.Sign/Model/SubSignatureRequestSigner.cs @@ -73,7 +73,7 @@ protected SubSignatureRequestSigner() { } /// The email address of the signer. (required). /// The order the signer is required to sign in.. /// The 4- to 12-character access code that will secure this signer's signature page.. - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher.. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher.. /// Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).. public SubSignatureRequestSigner(string name = default(string), string emailAddress = default(string), int? order = default(int?), string pin = default(string), string smsPhoneNumber = default(string), SmsPhoneNumberTypeEnum? smsPhoneNumberType = default(SmsPhoneNumberTypeEnum?)) { @@ -141,9 +141,9 @@ public static SubSignatureRequestSigner Init(string jsonData) public string Pin { get; set; } /// - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. /// - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. [DataMember(Name = "sms_phone_number", EmitDefaultValue = true)] public string SmsPhoneNumber { get; set; } diff --git a/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs b/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs index 65b1e9b..d9005a6 100644 --- a/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs +++ b/src/Dropbox.Sign/Model/SubSignatureRequestTemplateSigner.cs @@ -73,7 +73,7 @@ protected SubSignatureRequestTemplateSigner() { } /// The name of the signer. (required). /// The email address of the signer. (required). /// The 4- to 12-character access code that will secure this signer's signature page.. - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher.. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher.. /// Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).. public SubSignatureRequestTemplateSigner(string role = default(string), string name = default(string), string emailAddress = default(string), string pin = default(string), string smsPhoneNumber = default(string), SmsPhoneNumberTypeEnum? smsPhoneNumberType = default(SmsPhoneNumberTypeEnum?)) { @@ -146,9 +146,9 @@ public static SubSignatureRequestTemplateSigner Init(string jsonData) public string Pin { get; set; } /// - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. /// - /// An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + /// An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. [DataMember(Name = "sms_phone_number", EmitDefaultValue = true)] public string SmsPhoneNumber { get; set; } diff --git a/templates/EventCallbackHelper.cs b/templates/EventCallbackHelper.cs index ed1b9b9..40fa9a2 100644 --- a/templates/EventCallbackHelper.cs +++ b/templates/EventCallbackHelper.cs @@ -35,7 +35,7 @@ public static string GetCallbackType(EventCallbackRequest eventCallback) { var metaData = eventCallback.Event.EventMetadata; - if (String.IsNullOrEmpty(metaData.ReportedForAppId)) + if (metaData == null || String.IsNullOrEmpty(metaData.ReportedForAppId)) { return EVENT_TYPE_ACCOUNT_CALLBACK; } diff --git a/test_fixtures/EventCallbackHelper_AccountCallbacks.json b/test_fixtures/EventCallbackHelper_AccountCallbacks.json new file mode 100644 index 0000000..bbdf418 --- /dev/null +++ b/test_fixtures/EventCallbackHelper_AccountCallbacks.json @@ -0,0 +1,82 @@ +{ + "base": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "unknown_error", + "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "base_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "unknown_error", + "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371" + } + }, + "account": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "account_confirmed", + "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "account_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "account_confirmed", + "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848" + } + }, + "signature_request": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "signature_request_sent", + "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "signature_request_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "signature_request_sent", + "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756" + } + }, + "template": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "template_created", + "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "template_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "template_created", + "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d" + } + } +} diff --git a/test_fixtures/EventCallbackHelper.json b/test_fixtures/EventCallbackHelper_AppCallbacks.json similarity index 83% rename from test_fixtures/EventCallbackHelper.json rename to test_fixtures/EventCallbackHelper_AppCallbacks.json index bfd2346..bf6e9ad 100644 --- a/test_fixtures/EventCallbackHelper.json +++ b/test_fixtures/EventCallbackHelper_AppCallbacks.json @@ -7,7 +7,8 @@ "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -19,7 +20,8 @@ "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -31,7 +33,8 @@ "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -43,7 +46,8 @@ "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } } diff --git a/test_fixtures/SignatureRequestSendRequest.json b/test_fixtures/SignatureRequestSendRequest.json index b80dfb2..6a33979 100644 --- a/test_fixtures/SignatureRequestSendRequest.json +++ b/test_fixtures/SignatureRequestSendRequest.json @@ -122,7 +122,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -140,7 +141,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -153,7 +155,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -352,7 +355,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -370,7 +374,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -383,7 +388,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, diff --git a/test_fixtures/SubFormFieldsPerDocument.json b/test_fixtures/SubFormFieldsPerDocument.json index 11ef509..afcbcc2 100644 --- a/test_fixtures/SubFormFieldsPerDocument.json +++ b/test_fixtures/SubFormFieldsPerDocument.json @@ -32,7 +32,8 @@ "height": 16, "x": 112, "y": 328, - "options": ["foo"] + "options": ["foo"], + "font_size": 12 }, "SubFormFieldsPerDocumentHyperlink": { "type" : "hyperlink", @@ -45,7 +46,8 @@ "x": 112, "y": 328, "content": "Dropbox Sign", - "content_url": "https://dropboxsign.com" + "content_url": "https://dropboxsign.com", + "font_size": 12 }, "SubFormFieldsPerDocumentInitials": { "type" : "initials", @@ -91,7 +93,8 @@ "width": 100, "height": 16, "x": 112, - "y": 328 + "y": 328, + "font_size": 12 }, "SubFormFieldsPerDocumentTextMerge": { "type" : "text-merge", @@ -102,6 +105,7 @@ "width": 100, "height": 16, "x": 112, - "y": 328 + "y": 328, + "font_size": 12 } }