dropbox-sign 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +9 -4
  4. data/VERSION +1 -1
  5. data/docs/OAuthApi.md +0 -16
  6. data/docs/SignatureRequestApi.md +1 -1
  7. data/docs/SignatureRequestSendRequest.md +1 -0
  8. data/docs/SignatureRequestSendWithTemplateRequest.md +1 -0
  9. data/docs/SignatureRequestUpdateRequest.md +1 -1
  10. data/docs/SubFormFieldsPerDocumentBase.md +1 -1
  11. data/docs/SubFormFieldsPerDocumentDateSigned.md +2 -0
  12. data/docs/SubFormFieldsPerDocumentDropdown.md +2 -0
  13. data/docs/SubFormFieldsPerDocumentFontEnum.md +9 -0
  14. data/docs/SubFormFieldsPerDocumentHyperlink.md +2 -0
  15. data/docs/SubFormFieldsPerDocumentText.md +3 -0
  16. data/docs/SubFormFieldsPerDocumentTextMerge.md +2 -0
  17. data/docs/SubWhiteLabelingOptions.md +1 -1
  18. data/docs/TemplateApi.md +102 -0
  19. data/docs/TemplateCreateRequest.md +27 -0
  20. data/docs/TemplateCreateResponse.md +11 -0
  21. data/docs/TemplateCreateResponseTemplate.md +10 -0
  22. data/examples/OauthTokenGenerate.rb +0 -8
  23. data/examples/OauthTokenRefresh.rb +0 -8
  24. data/examples/TemplateCreate.rb +49 -0
  25. data/lib/dropbox-sign/api/signature_request_api.rb +2 -2
  26. data/lib/dropbox-sign/api/template_api.rb +109 -0
  27. data/lib/dropbox-sign/models/signature_request_send_request.rb +14 -1
  28. data/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +14 -1
  29. data/lib/dropbox-sign/models/signature_request_update_request.rb +1 -1
  30. data/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +1 -1
  31. data/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +60 -4
  32. data/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +60 -4
  33. data/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +54 -0
  34. data/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +60 -4
  35. data/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +49 -4
  36. data/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +60 -4
  37. data/lib/dropbox-sign/models/sub_white_labeling_options.rb +1 -1
  38. data/lib/dropbox-sign/models/template_create_request.rb +509 -0
  39. data/lib/dropbox-sign/models/template_create_response.rb +263 -0
  40. data/lib/dropbox-sign/models/template_create_response_template.rb +252 -0
  41. data/lib/dropbox-sign/version.rb +1 -1
  42. data/lib/dropbox-sign.rb +4 -0
  43. data/openapi-config.yaml +1 -1
  44. data/openapi-sdk.yaml +701 -241
  45. data/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +6 -2
  46. data/test_fixtures/SignatureRequestSendRequest.json +8 -2
  47. data/test_fixtures/SignatureRequestSendWithTemplateRequest.json +1 -0
  48. data/test_fixtures/TemplateCreateEmbeddedDraftRequest.json +3 -1
  49. data/test_fixtures/TemplateCreateRequest.json +120 -0
  50. data/test_fixtures/TemplateCreateResponse.json +7 -0
  51. data/test_fixtures/UnclaimedDraftCreateEmbeddedRequest.json +3 -1
  52. data/test_fixtures/UnclaimedDraftCreateRequest.json +3 -1
  53. metadata +21 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d50bfef68b16710880777e5aae08b959a236077ef11e7cfcc46861f3876c32d
4
- data.tar.gz: 5d97ce40c8374a2c0372f862ac5bc73c6d1b4a13f892c3827828a3236f417994
3
+ metadata.gz: eecee0b147e45bb327b88445dcc75bcd926ccffd1ae5c1a3ff8e2a71acb0d988
4
+ data.tar.gz: eed1ad5ba86b98ea71c94dd8ca63cc401f003089ea8fa8749f2b99c815c835be
5
5
  SHA512:
6
- metadata.gz: b517dc4c093c0f6c1e6158631f56fc974d3dbf62ca94c2302550240bd279d3ec963e16b2667f64cdc9ecd6a4e3f05f05dc6f77625a35af3edc048bd519be9a94
7
- data.tar.gz: 1ca8a8bf45466dc80833daeccbea76fc4ef4f8edc7ccff5f4849c6da1a00c676f3eafabd58d82beb6f0b99cf901f58cf6da90d53124b32ee399e14966c406de0
6
+ metadata.gz: b4f66f7788ceb2ce28ce04c4688d010dd0eaafd5dc29eea3a265d4426aaa25b6cfcb54c160de693a38a97502601fc8c3e6d263a1a9e8ff386b75da4c72460123
7
+ data.tar.gz: 8f4205e27c1ec117f05aebc0db00769421d87b33a7637eee047deeb5678faae802ba1a29880ed480b786628a5dfac1f9de1d07aaf4291eedd75e25966cbacc01
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dropbox-sign (1.1.2)
4
+ dropbox-sign (1.2.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ GEM
13
13
  diff-lcs (1.5.0)
14
14
  ethon (0.16.0)
15
15
  ffi (>= 1.15.0)
16
- ffi (1.15.5)
16
+ ffi (1.16.3)
17
17
  jaro_winkler (1.5.4)
18
18
  json_spec (1.1.5)
19
19
  multi_json (~> 1.0)
data/README.md CHANGED
@@ -25,7 +25,7 @@ directory that corresponds to the file you want updated.
25
25
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
26
26
 
27
27
  - API version: 3.0.0
28
- - Package version: 1.1.2
28
+ - Package version: 1.2.0
29
29
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
30
30
 
31
31
  ## Installation
@@ -46,14 +46,14 @@ gem build dropbox-sign.gemspec
46
46
  Then install the gem locally:
47
47
 
48
48
  ```shell
49
- gem install ./dropbox-sign-1.1.2.gem
49
+ gem install ./dropbox-sign-1.2.0.gem
50
50
  ```
51
51
 
52
- (for development, run `gem install --dev ./dropbox-sign-1.1.2.gem` to install the development dependencies)
52
+ (for development, run `gem install --dev ./dropbox-sign-1.2.0.gem` to install the development dependencies)
53
53
 
54
54
  Finally add this to the Gemfile:
55
55
 
56
- gem 'dropbox-sign', '~> 1.1.2'
56
+ gem 'dropbox-sign', '~> 1.2.0'
57
57
 
58
58
  ### Install from Git
59
59
 
@@ -149,6 +149,7 @@ All URIs are relative to *https://api.hellosign.com/v3*
149
149
  |*Dropbox::Sign::TeamApi* | [**team_sub_teams**](docs/TeamApi.md#team_sub_teams) | **GET** /team/sub_teams/{team_id} | List Sub Teams |
150
150
  |*Dropbox::Sign::TeamApi* | [**team_update**](docs/TeamApi.md#team_update) | **PUT** /team | Update Team |
151
151
  |*Dropbox::Sign::TemplateApi* | [**template_add_user**](docs/TemplateApi.md#template_add_user) | **POST** /template/add_user/{template_id} | Add User to Template |
152
+ |*Dropbox::Sign::TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template |
152
153
  |*Dropbox::Sign::TemplateApi* | [**template_create_embedded_draft**](docs/TemplateApi.md#template_create_embedded_draft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft |
153
154
  |*Dropbox::Sign::TemplateApi* | [**template_delete**](docs/TemplateApi.md#template_delete) | **POST** /template/delete/{template_id} | Delete Template |
154
155
  |*Dropbox::Sign::TemplateApi* | [**template_files**](docs/TemplateApi.md#template_files) | **GET** /template/files/{template_id} | Get Template Files |
@@ -252,6 +253,7 @@ All URIs are relative to *https://api.hellosign.com/v3*
252
253
  - [Dropbox::Sign::SubFormFieldsPerDocumentCheckboxMerge](docs/SubFormFieldsPerDocumentCheckboxMerge.md)
253
254
  - [Dropbox::Sign::SubFormFieldsPerDocumentDateSigned](docs/SubFormFieldsPerDocumentDateSigned.md)
254
255
  - [Dropbox::Sign::SubFormFieldsPerDocumentDropdown](docs/SubFormFieldsPerDocumentDropdown.md)
256
+ - [Dropbox::Sign::SubFormFieldsPerDocumentFontEnum](docs/SubFormFieldsPerDocumentFontEnum.md)
255
257
  - [Dropbox::Sign::SubFormFieldsPerDocumentHyperlink](docs/SubFormFieldsPerDocumentHyperlink.md)
256
258
  - [Dropbox::Sign::SubFormFieldsPerDocumentInitials](docs/SubFormFieldsPerDocumentInitials.md)
257
259
  - [Dropbox::Sign::SubFormFieldsPerDocumentRadio](docs/SubFormFieldsPerDocumentRadio.md)
@@ -289,6 +291,9 @@ All URIs are relative to *https://api.hellosign.com/v3*
289
291
  - [Dropbox::Sign::TemplateCreateEmbeddedDraftRequest](docs/TemplateCreateEmbeddedDraftRequest.md)
290
292
  - [Dropbox::Sign::TemplateCreateEmbeddedDraftResponse](docs/TemplateCreateEmbeddedDraftResponse.md)
291
293
  - [Dropbox::Sign::TemplateCreateEmbeddedDraftResponseTemplate](docs/TemplateCreateEmbeddedDraftResponseTemplate.md)
294
+ - [Dropbox::Sign::TemplateCreateRequest](docs/TemplateCreateRequest.md)
295
+ - [Dropbox::Sign::TemplateCreateResponse](docs/TemplateCreateResponse.md)
296
+ - [Dropbox::Sign::TemplateCreateResponseTemplate](docs/TemplateCreateResponseTemplate.md)
292
297
  - [Dropbox::Sign::TemplateEditResponse](docs/TemplateEditResponse.md)
293
298
  - [Dropbox::Sign::TemplateGetResponse](docs/TemplateGetResponse.md)
294
299
  - [Dropbox::Sign::TemplateListResponse](docs/TemplateListResponse.md)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.2.0
data/docs/OAuthApi.md CHANGED
@@ -21,14 +21,6 @@ Once you have retrieved the code from the user callback, you will need to exchan
21
21
  ```ruby
22
22
  require "dropbox-sign"
23
23
 
24
- Dropbox::Sign.configure do |config|
25
- # Configure HTTP basic authorization: api_key
26
- config.username = "YOUR_API_KEY"
27
-
28
- # or, configure Bearer (JWT) authorization: oauth2
29
- # config.access_token = "YOUR_ACCESS_TOKEN"
30
- end
31
-
32
24
  oauth_api = Dropbox::Sign::OAuthApi.new
33
25
 
34
26
  data = Dropbox::Sign::OAuthTokenGenerateRequest.new
@@ -97,14 +89,6 @@ Access tokens are only valid for a given period of time (typically one hour) for
97
89
  ```ruby
98
90
  require "dropbox-sign"
99
91
 
100
- Dropbox::Sign.configure do |config|
101
- # Configure HTTP basic authorization: api_key
102
- config.username = "YOUR_API_KEY"
103
-
104
- # or, configure Bearer (JWT) authorization: oauth2
105
- # config.access_token = "YOUR_ACCESS_TOKEN"
106
- end
107
-
108
92
  oauth_api = Dropbox::Sign::OAuthApi.new
109
93
 
110
94
  data = Dropbox::Sign::OAuthTokenRefreshRequest.new
@@ -1305,7 +1305,7 @@ end
1305
1305
 
1306
1306
  Update Signature Request
1307
1307
 
1308
- 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. **NOTE**: This action cannot be performed on a signature request with an appended signature page.
1308
+ 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.
1309
1309
 
1310
1310
  ### Examples
1311
1311
 
@@ -22,6 +22,7 @@
22
22
  | `form_fields_per_document` | [```Array<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).)<br><br>**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.<br><br>* Text Field use `SubFormFieldsPerDocumentText`<br>* Dropdown Field use `SubFormFieldsPerDocumentDropdown`<br>* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`<br>* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`<br>* Radio Field use `SubFormFieldsPerDocumentRadio`<br>* Signature Field use `SubFormFieldsPerDocumentSignature`<br>* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`<br>* Initials Field use `SubFormFieldsPerDocumentInitials`<br>* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`<br>* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | |
23
23
  | `hide_text_tags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.<br><br>**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] |
24
24
  | `is_qualified_signature` | ```Boolean``` | 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&#39;s identity.&lt;br&gt;<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] |
25
+ | `is_eid` | ```Boolean``` | 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.&lt;br&gt;<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] |
25
26
  | `message` | ```String``` | The custom message in the email that will be sent to the signers. | |
26
27
  | `metadata` | ```Hash<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&#39;s order number for look up when receiving events for the signature request.<br><br>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. | |
27
28
  | `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | |
@@ -15,6 +15,7 @@
15
15
  | `files` | ```Array<File>``` | Use `files[]` to indicate the uploaded file(s) to send for signature.<br><br>This endpoint requires either **files** or **file_urls[]**, but not both. | |
16
16
  | `file_urls` | ```Array<String>``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.<br><br>This endpoint requires either **files** or **file_urls[]**, but not both. | |
17
17
  | `is_qualified_signature` | ```Boolean``` | 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&#39;s identity.&lt;br&gt;<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] |
18
+ | `is_eid` | ```Boolean``` | 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.&lt;br&gt;<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] |
18
19
  | `message` | ```String``` | The custom message in the email that will be sent to the signers. | |
19
20
  | `metadata` | ```Hash<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&#39;s order number for look up when receiving events for the signature request.<br><br>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. | |
20
21
  | `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | |
@@ -7,7 +7,7 @@
7
7
  | Name | Type | Description | Notes |
8
8
  | ---- | ---- | ----------- | ----- |
9
9
  | `signature_id`<sup>*_required_</sup> | ```String``` | The signature ID for the recipient. | |
10
- | `email_address` | ```String``` | The new email address for the recipient.<br><br>**NOTE**: Optional if `name` is provided. | |
10
+ | `email_address` | ```String``` | The new email address for the recipient.<br><br>This will generate a new `signature_id` value.<br><br>**NOTE**: Optional if `name` is provided. | |
11
11
  | `name` | ```String``` | The new name for the recipient.<br><br>**NOTE**: Optional if `email_address` is provided. | |
12
12
  | `expires_at` | ```Integer``` | The new time 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. | |
13
13
 
@@ -23,7 +23,7 @@ The fields that should appear on the document, expressed as an array of objects.
23
23
  | `api_id`<sup>*_required_</sup> | ```String``` | An identifier for the field that is unique across all documents in the request. | |
24
24
  | `height`<sup>*_required_</sup> | ```Integer``` | Size of the field in pixels. | |
25
25
  | `required`<sup>*_required_</sup> | ```Boolean``` | Whether this field is required. | |
26
- | `signer`<sup>*_required_</sup> | ```String``` | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.<br><br>**NOTE**: If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | |
26
+ | `signer`<sup>*_required_</sup> | ```String``` | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.<br><br>**NOTE**: To set the value of the field as the preparer you must set this to `me_now`<br><br>**NOTE**: If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | |
27
27
  | `type`<sup>*_required_</sup> | ```String``` | | |
28
28
  | `width`<sup>*_required_</sup> | ```Integer``` | Size of the field in pixels. | |
29
29
  | `x`<sup>*_required_</sup> | ```Integer``` | Location coordinates of the field in pixels. | |
@@ -7,4 +7,6 @@ This class extends `SubFormFieldsPerDocumentBase`.
7
7
  | Name | Type | Description | Notes |
8
8
  | ---- | ---- | ----------- | ----- |
9
9
  | `type`<sup>*_required_</sup> | ```String``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to 'date_signed'] |
10
+ | `font_family` | ```String``` | Font family for the field. | |
11
+ | `font_size` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.<br><br>**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | |
10
12
 
@@ -9,4 +9,6 @@ This class extends `SubFormFieldsPerDocumentBase`.
9
9
  | `type`<sup>*_required_</sup> | ```String``` | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | [default to 'dropdown'] |
10
10
  | `options`<sup>*_required_</sup> | ```Array<String>``` | Array of string values representing dropdown values. | |
11
11
  | `content` | ```String``` | Selected value in `options` array. Value must exist in array. | |
12
+ | `font_family` | ```String``` | Font family for the field. | |
13
+ | `font_size` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.<br><br>**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | |
12
14
 
@@ -0,0 +1,9 @@
1
+ # Dropbox::Sign::SubFormFieldsPerDocumentFontEnum
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+
@@ -9,4 +9,6 @@ This class extends `SubFormFieldsPerDocumentBase`.
9
9
  | `type`<sup>*_required_</sup> | ```String``` | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | [default to 'hyperlink'] |
10
10
  | `content`<sup>*_required_</sup> | ```String``` | Link Text. | |
11
11
  | `content_url`<sup>*_required_</sup> | ```String``` | Link URL. | |
12
+ | `font_family` | ```String``` | Font family for the field. | |
13
+ | `font_size` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.<br><br>**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | |
12
14
 
@@ -14,4 +14,7 @@ This class extends `SubFormFieldsPerDocumentBase`.
14
14
  | `validation_type` | ```String``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.<br><br>**NOTE**: When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. | |
15
15
  | `validation_custom_regex` | ```String``` | | |
16
16
  | `validation_custom_regex_format_label` | ```String``` | | |
17
+ | `content` | ```String``` | Content of a `me_now` text field | |
18
+ | `font_family` | ```String``` | Font family for the field. | |
19
+ | `font_size` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.<br><br>**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | |
17
20
 
@@ -7,4 +7,6 @@ This class extends `SubFormFieldsPerDocumentBase`.
7
7
  | Name | Type | Description | Notes |
8
8
  | ---- | ---- | ----------- | ----- |
9
9
  | `type`<sup>*_required_</sup> | ```String``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to 'text-merge'] |
10
+ | `font_family` | ```String``` | Font family for the field. | |
11
+ | `font_size` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.<br><br>**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | |
10
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  An array of elements and values serialized to a string, to be used to customize the app&#39;s signer page. (Only applies to some API plans)
4
4
 
5
- Take a look at our [white labeling guide](/api/reference/white-labeling/) to learn more.
5
+ Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more.
6
6
 
7
7
  ## Properties
8
8
 
data/docs/TemplateApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [`template_add_user`](TemplateApi.md#template_add_user) | **POST** `/template/add_user/{template_id}` | Add User to Template |
8
+ | [`template_create`](TemplateApi.md#template_create) | **POST** `/template/create` | Create Template |
8
9
  | [`template_create_embedded_draft`](TemplateApi.md#template_create_embedded_draft) | **POST** `/template/create_embedded_draft` | Create Embedded Template Draft |
9
10
  | [`template_delete`](TemplateApi.md#template_delete) | **POST** `/template/delete/{template_id}` | Delete Template |
10
11
  | [`template_files`](TemplateApi.md#template_files) | **GET** `/template/files/{template_id}` | Get Template Files |
@@ -92,6 +93,107 @@ end
92
93
  - **Accept**: application/json
93
94
 
94
95
 
96
+ ## `template_create`
97
+
98
+ > `<TemplateCreateResponse> template_create(template_create_request)`
99
+
100
+ Create Template
101
+
102
+ Creates a template that can then be used.
103
+
104
+ ### Examples
105
+
106
+ ```ruby
107
+ require "dropbox-sign"
108
+
109
+ Dropbox::Sign.configure do |config|
110
+ # Configure HTTP basic authorization: api_key
111
+ config.username = "YOUR_API_KEY"
112
+
113
+ # or, configure Bearer (JWT) authorization: oauth2
114
+ # config.access_token = "YOUR_ACCESS_TOKEN"
115
+ end
116
+
117
+ template_api = Dropbox::Sign::TemplateApi.new
118
+
119
+ role_1 = Dropbox::Sign::SubTemplateRole.new
120
+ role_1.name = "Client"
121
+ role_1.order = 0
122
+
123
+ role_2 = Dropbox::Sign::SubTemplateRole.new
124
+ role_2.name = "Witness"
125
+ role_2.order = 1
126
+
127
+ merge_field_1 = Dropbox::Sign::SubMergeField.new
128
+ merge_field_1.name = "Full Name"
129
+ merge_field_1.type = "text"
130
+
131
+ merge_field_2 = Dropbox::Sign::SubMergeField.new
132
+ merge_field_2.name = "Is Registered?"
133
+ merge_field_2.type = "checkbox"
134
+
135
+ field_options = Dropbox::Sign::SubFieldOptions.new
136
+ field_options.date_format = "DD - MM - YYYY"
137
+
138
+ data = Dropbox::Sign::TemplateCreateRequest.new
139
+ data.client_id = "37dee8d8440c66d54cfa05d92c160882"
140
+ data.files = [File.new("example_signature_request.pdf", "r")]
141
+ data.title = "Test Template"
142
+ data.subject = "Please sign this document"
143
+ data.message = "For your approval"
144
+ data.signer_roles = [role_1, role_2]
145
+ data.cc_roles = ["Manager"]
146
+ data.merge_fields = [merge_field_1, merge_field_2]
147
+ data.field_options = field_options
148
+ data.test_mode = true
149
+
150
+ begin
151
+ result = template_api.template_create(data)
152
+ p result
153
+ rescue Dropbox::Sign::ApiError => e
154
+ puts "Exception when calling Dropbox Sign API: #{e}"
155
+ end
156
+
157
+ ```
158
+
159
+ #### Using the `template_create_with_http_info` variant
160
+
161
+ This returns an Array which contains the response data, status code and headers.
162
+
163
+ > `<Array(<TemplateCreateResponse>, Integer, Hash)> template_create_with_http_info(template_create_request)`
164
+
165
+ ```ruby
166
+ begin
167
+ # Create Template
168
+ data, status_code, headers = api_instance.template_create_with_http_info(template_create_request)
169
+ p status_code # => 2xx
170
+ p headers # => { ... }
171
+ p data # => <TemplateCreateResponse>
172
+ rescue Dropbox::Sign::ApiError => e
173
+ puts "Error when calling TemplateApi->template_create_with_http_info: #{e}"
174
+ end
175
+ ```
176
+
177
+ ### Parameters
178
+
179
+ | Name | Type | Description | Notes |
180
+ | ---- | ---- | ----------- | ----- |
181
+ | `template_create_request` | [**TemplateCreateRequest**](TemplateCreateRequest.md) | | |
182
+
183
+ ### Return type
184
+
185
+ [**TemplateCreateResponse**](TemplateCreateResponse.md)
186
+
187
+ ### Authorization
188
+
189
+ [api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
190
+
191
+ ### HTTP request headers
192
+
193
+ - **Content-Type**: application/json, multipart/form-data
194
+ - **Accept**: application/json
195
+
196
+
95
197
  ## `template_create_embedded_draft`
96
198
 
97
199
  > `<TemplateCreateEmbeddedDraftResponse> template_create_embedded_draft(template_create_embedded_draft_request)`
@@ -0,0 +1,27 @@
1
+ # Dropbox::Sign::TemplateCreateRequest
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `form_fields_per_document`<sup>*_required_</sup> | [```Array<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).)<br><br>**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.<br><br>* Text Field use `SubFormFieldsPerDocumentText`<br>* Dropdown Field use `SubFormFieldsPerDocumentDropdown`<br>* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`<br>* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`<br>* Radio Field use `SubFormFieldsPerDocumentRadio`<br>* Signature Field use `SubFormFieldsPerDocumentSignature`<br>* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`<br>* Initials Field use `SubFormFieldsPerDocumentInitials`<br>* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`<br>* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | |
10
+ | `signer_roles`<sup>*_required_</sup> | [```Array<SubTemplateRole>```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | |
11
+ | `files` | ```Array<File>``` | Use `files[]` to indicate the uploaded file(s) to send for signature.<br><br>This endpoint requires either **files** or **file_urls[]**, but not both. | |
12
+ | `file_urls` | ```Array<String>``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.<br><br>This endpoint requires either **files** or **file_urls[]**, but not both. | |
13
+ | `allow_reassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.<br><br>**Note**: Only available for Premium plan and higher. | [default to false] |
14
+ | `attachments` | [```Array<SubAttachment>```](SubAttachment.md) | A list describing the attachments | |
15
+ | `cc_roles` | ```Array<String>``` | The CC roles that must be assigned when using the template to send a signature request | |
16
+ | `client_id` | ```String``` | Client id of the app you&#39;re using to create this draft. Used to apply the branding and callback url defined for the app. | |
17
+ | `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | |
18
+ | `form_field_groups` | [```Array<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`. | |
19
+ | `form_field_rules` | [```Array<SubFormFieldRule>```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | |
20
+ | `merge_fields` | [```Array<SubMergeField>```](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | |
21
+ | `message` | ```String``` | The default template email message. | |
22
+ | `metadata` | ```Hash<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&#39;s order number for look up when receiving events for the signature request.<br><br>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. | |
23
+ | `subject` | ```String``` | The template title (alias). | |
24
+ | `test_mode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | [default to false] |
25
+ | `title` | ```String``` | The title you want to assign to the SignatureRequest. | |
26
+ | `use_preexisting_fields` | ```Boolean``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | [default to false] |
27
+
@@ -0,0 +1,11 @@
1
+ # Dropbox::Sign::TemplateCreateResponse
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `template` | [```TemplateCreateResponse```](TemplateCreateResponse.md) | | |
10
+ | `warnings` | [```Array<WarningResponse>```](WarningResponse.md) | A list of warnings. | |
11
+
@@ -0,0 +1,10 @@
1
+ # Dropbox::Sign::TemplateCreateResponseTemplate
2
+
3
+ Template object with parameters: `template_id`.
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `template_id` | ```String``` | The id of the Template. | |
10
+
@@ -1,13 +1,5 @@
1
1
  require "dropbox-sign"
2
2
 
3
- Dropbox::Sign.configure do |config|
4
- # Configure HTTP basic authorization: api_key
5
- config.username = "YOUR_API_KEY"
6
-
7
- # or, configure Bearer (JWT) authorization: oauth2
8
- # config.access_token = "YOUR_ACCESS_TOKEN"
9
- end
10
-
11
3
  oauth_api = Dropbox::Sign::OAuthApi.new
12
4
 
13
5
  data = Dropbox::Sign::OAuthTokenGenerateRequest.new
@@ -1,13 +1,5 @@
1
1
  require "dropbox-sign"
2
2
 
3
- Dropbox::Sign.configure do |config|
4
- # Configure HTTP basic authorization: api_key
5
- config.username = "YOUR_API_KEY"
6
-
7
- # or, configure Bearer (JWT) authorization: oauth2
8
- # config.access_token = "YOUR_ACCESS_TOKEN"
9
- end
10
-
11
3
  oauth_api = Dropbox::Sign::OAuthApi.new
12
4
 
13
5
  data = Dropbox::Sign::OAuthTokenRefreshRequest.new
@@ -0,0 +1,49 @@
1
+ require "dropbox-sign"
2
+
3
+ Dropbox::Sign.configure do |config|
4
+ # Configure HTTP basic authorization: api_key
5
+ config.username = "YOUR_API_KEY"
6
+
7
+ # or, configure Bearer (JWT) authorization: oauth2
8
+ # config.access_token = "YOUR_ACCESS_TOKEN"
9
+ end
10
+
11
+ template_api = Dropbox::Sign::TemplateApi.new
12
+
13
+ role_1 = Dropbox::Sign::SubTemplateRole.new
14
+ role_1.name = "Client"
15
+ role_1.order = 0
16
+
17
+ role_2 = Dropbox::Sign::SubTemplateRole.new
18
+ role_2.name = "Witness"
19
+ role_2.order = 1
20
+
21
+ merge_field_1 = Dropbox::Sign::SubMergeField.new
22
+ merge_field_1.name = "Full Name"
23
+ merge_field_1.type = "text"
24
+
25
+ merge_field_2 = Dropbox::Sign::SubMergeField.new
26
+ merge_field_2.name = "Is Registered?"
27
+ merge_field_2.type = "checkbox"
28
+
29
+ field_options = Dropbox::Sign::SubFieldOptions.new
30
+ field_options.date_format = "DD - MM - YYYY"
31
+
32
+ data = Dropbox::Sign::TemplateCreateRequest.new
33
+ data.client_id = "37dee8d8440c66d54cfa05d92c160882"
34
+ data.files = [File.new("example_signature_request.pdf", "r")]
35
+ data.title = "Test Template"
36
+ data.subject = "Please sign this document"
37
+ data.message = "For your approval"
38
+ data.signer_roles = [role_1, role_2]
39
+ data.cc_roles = ["Manager"]
40
+ data.merge_fields = [merge_field_1, merge_field_2]
41
+ data.field_options = field_options
42
+ data.test_mode = true
43
+
44
+ begin
45
+ result = template_api.template_create(data)
46
+ p result
47
+ rescue Dropbox::Sign::ApiError => e
48
+ puts "Exception when calling Dropbox Sign API: #{e}"
49
+ end
@@ -1503,7 +1503,7 @@ module Dropbox::Sign
1503
1503
  end
1504
1504
 
1505
1505
  # Update Signature Request
1506
- # 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. **NOTE**: This action cannot be performed on a signature request with an appended signature page.
1506
+ # 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.
1507
1507
  # @param signature_request_id [String] The id of the SignatureRequest to update.
1508
1508
  # @param signature_request_update_request [SignatureRequestUpdateRequest]
1509
1509
  # @param [Hash] opts the optional parameters
@@ -1514,7 +1514,7 @@ module Dropbox::Sign
1514
1514
  end
1515
1515
 
1516
1516
  # Update Signature Request
1517
- # Updates the email address and/or the name for a given signer on a signature request. You can listen for the &#x60;signature_request_email_bounce&#x60; event on your app or account to detect bounced emails, and respond with this method. **NOTE**: This action cannot be performed on a signature request with an appended signature page.
1517
+ # Updates the email address and/or the name for a given signer on a signature request. You can listen for the &#x60;signature_request_email_bounce&#x60; 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 &#x60;signature_id&#x60; value. **NOTE**: This action cannot be performed on a signature request with an appended signature page.
1518
1518
  # @param signature_request_id [String] The id of the SignatureRequest to update.
1519
1519
  # @param signature_request_update_request [SignatureRequestUpdateRequest]
1520
1520
  # @param [Hash] opts the optional parameters
@@ -137,6 +137,115 @@ module Dropbox::Sign
137
137
  return data, status_code, headers
138
138
  end
139
139
 
140
+ # Create Template
141
+ # Creates a template that can then be used.
142
+ # @param template_create_request [TemplateCreateRequest]
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [TemplateCreateResponse]
145
+ def template_create(template_create_request, opts = {})
146
+ data, _status_code, _headers = template_create_with_http_info(template_create_request, opts)
147
+ data
148
+ end
149
+
150
+ # Create Template
151
+ # Creates a template that can then be used.
152
+ # @param template_create_request [TemplateCreateRequest]
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [Array<(TemplateCreateResponse, Integer, Hash)>] TemplateCreateResponse data, response status code and response headers
155
+ def template_create_with_http_info(template_create_request, opts = {})
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug 'Calling API: TemplateApi.template_create ...'
158
+ end
159
+ # verify the required parameter 'template_create_request' is set
160
+ if @api_client.config.client_side_validation && template_create_request.nil?
161
+ fail ArgumentError, "Missing the required parameter 'template_create_request' when calling TemplateApi.template_create"
162
+ end
163
+ # resource path
164
+ local_var_path = '/template/create'
165
+
166
+ # query parameters
167
+ query_params = opts[:query_params] || {}
168
+
169
+ # header parameters
170
+ header_params = opts[:header_params] || {}
171
+ # HTTP header 'Accept' (if needed)
172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
173
+ # HTTP header 'Content-Type'
174
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
175
+ if !content_type.nil?
176
+ header_params['Content-Type'] = content_type
177
+ end
178
+
179
+ post_body = {}
180
+ form_params = opts[:form_params] || {}
181
+ result = @api_client.generate_form_data(
182
+ template_create_request,
183
+ Dropbox::Sign::TemplateCreateRequest.openapi_types
184
+ )
185
+
186
+ # form parameters
187
+ if result[:has_file]
188
+ form_params = opts[:form_params] || result[:params]
189
+ header_params['Content-Type'] = 'multipart/form-data'
190
+ else
191
+ # http body (model)
192
+ post_body = opts[:debug_body] || result[:params]
193
+ end
194
+
195
+ # return_type
196
+ return_type = opts[:debug_return_type] || 'TemplateCreateResponse'
197
+
198
+ # auth_names
199
+ auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2']
200
+
201
+ new_options = opts.merge(
202
+ :operation => :"TemplateApi.template_create",
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => return_type
209
+ )
210
+
211
+ begin
212
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
213
+ rescue Dropbox::Sign::ApiError => e
214
+ if e.code === 200
215
+ body = @api_client.convert_to_type(
216
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
217
+ "Dropbox::Sign::TemplateCreateResponse"
218
+ )
219
+
220
+ fail ApiError.new(:code => e.code,
221
+ :response_headers => e.response_headers,
222
+ :response_body => body),
223
+ e.message
224
+ end
225
+
226
+ range_code = "4XX".split('').first
227
+ range_code_left = "#{range_code}00".to_i
228
+ range_code_right = "#{range_code}99".to_i
229
+ if e.code >= range_code_left && e.code <= range_code_right
230
+ body = @api_client.convert_to_type(
231
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
232
+ "Dropbox::Sign::ErrorResponse"
233
+ )
234
+
235
+ fail ApiError.new(:code => e.code,
236
+ :response_headers => e.response_headers,
237
+ :response_body => body),
238
+ e.message
239
+ end
240
+
241
+ end
242
+
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: TemplateApi#template_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ return data, status_code, headers
247
+ end
248
+
140
249
  # Create Embedded Template Draft
141
250
  # The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage.
142
251
  # @param template_create_embedded_draft_request [TemplateCreateEmbeddedDraftRequest]