dropbox-sign 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +8 -4
  4. data/VERSION +1 -1
  5. data/docs/DocumentApi.md +82 -0
  6. data/docs/DocumentFieldDetectionRequest.md +13 -0
  7. data/docs/DocumentFieldDetectionResponse.md +11 -0
  8. data/docs/DocumentFieldDetectionResponseDetectionResult.md +19 -0
  9. data/docs/FaxResponse.md +1 -0
  10. data/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +1 -0
  11. data/docs/SignatureRequestBulkSendWithTemplateRequest.md +1 -0
  12. data/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +1 -0
  13. data/docs/SignatureRequestSendWithTemplateRequest.md +1 -0
  14. data/examples/DocumentDetectFieldsExample.rb +22 -0
  15. data/lib/dropbox-sign/api/account_api.rb +8 -0
  16. data/lib/dropbox-sign/api/api_app_api.rb +10 -0
  17. data/lib/dropbox-sign/api/bulk_send_job_api.rb +4 -0
  18. data/lib/dropbox-sign/api/document_api.rb +137 -0
  19. data/lib/dropbox-sign/api/embedded_api.rb +4 -0
  20. data/lib/dropbox-sign/api/fax_api.rb +10 -0
  21. data/lib/dropbox-sign/api/fax_line_api.rb +14 -0
  22. data/lib/dropbox-sign/api/o_auth_api.rb +4 -0
  23. data/lib/dropbox-sign/api/report_api.rb +2 -0
  24. data/lib/dropbox-sign/api/signature_request_api.rb +40 -0
  25. data/lib/dropbox-sign/api/team_api.rb +20 -0
  26. data/lib/dropbox-sign/api/template_api.rb +22 -0
  27. data/lib/dropbox-sign/api/unclaimed_draft_api.rb +8 -0
  28. data/lib/dropbox-sign/models/document_field_detection_request.rb +317 -0
  29. data/lib/dropbox-sign/models/document_field_detection_response.rb +279 -0
  30. data/lib/dropbox-sign/models/document_field_detection_response_detection_result.rb +536 -0
  31. data/lib/dropbox-sign/models/event_callback_request_event.rb +2 -2
  32. data/lib/dropbox-sign/models/fax_response.rb +29 -1
  33. data/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +16 -4
  34. data/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +16 -4
  35. data/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +16 -4
  36. data/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +16 -4
  37. data/lib/dropbox-sign/version.rb +1 -1
  38. data/lib/dropbox-sign.rb +4 -0
  39. data/openapi-config.yaml +1 -1
  40. data/openapi-sdk.yaml +300 -0
  41. data/run-build +1 -1
  42. data/templates/api.mustache +2 -0
  43. data/test_fixtures/FaxGetResponse.json +2 -1
  44. data/test_fixtures/FaxListResponse.json +2 -1
  45. metadata +19 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f9c82135d14ebed022ffbf2c5c97da90e03b45182bbf9f9aa8af5ce647fa066
4
- data.tar.gz: 41ff5d35a8f10c21c77130429297857d679a0711700301d7b3632280e6163a51
3
+ metadata.gz: 66c64680be83c560ae134f58c13ca3a3a41fff2f82f00ef5e566a7bdcad28813
4
+ data.tar.gz: 73c5200e2b3c56a7b0932fe54d3b73fa30ac9ebd9245d8ee9e95012ef16389df
5
5
  SHA512:
6
- metadata.gz: 69642272372050900aeb9421cd424341f4cd2496d58b144355ef01aac023eb047471790382b8f3f291984f1f2bd817f15c6dc67b2d153388e3dbff159c28e6e1
7
- data.tar.gz: dbc743ceb70dd1f85329363d6a5401ed0739138257bbc524af8a3abc23995d144087dd5779a23485e2260fce637ad9acd4c2da0ba32de000112555abadc8fae0
6
+ metadata.gz: '009500eee44aae84325a1ed8dcb28db787461dc5175ecba11eb7476d5faed8585785e583659205f08668ea4742777384ed4e70dc123336f4a40c18d114c57848'
7
+ data.tar.gz: 30bac0e87d605a0c0e0e359c74b76d6639b5d2c9464b793f1f91a090e79e7d17f9c730fd8a15ca71915e8ac33ef0fd5d9679f51aada04ae682039e8760216794
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dropbox-sign (1.14.0)
4
+ dropbox-sign (1.15.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
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.14.0
28
+ - Package version: 1.15.0
29
29
  - Generator version: 7.12.0
30
30
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
31
31
 
@@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec
47
47
  Then install the gem locally:
48
48
 
49
49
  ```shell
50
- gem install ./dropbox-sign-1.14.0.gem
50
+ gem install ./dropbox-sign-1.15.0.gem
51
51
  ```
52
52
 
53
- (for development, run `gem install --dev ./dropbox-sign-1.14.0.gem` to install the development dependencies)
53
+ (for development, run `gem install --dev ./dropbox-sign-1.15.0.gem` to install the development dependencies)
54
54
 
55
55
 
56
56
  Finally add this to the Gemfile:
57
57
 
58
- gem 'dropbox-sign', '~> 1.14.0'
58
+ gem 'dropbox-sign', '~> 1.15.0'
59
59
 
60
60
  ### Install from Git
61
61
 
@@ -118,6 +118,7 @@ All URIs are relative to *https://api.hellosign.com/v3*
118
118
  |*Dropbox::Sign::ApiAppApi* | [**api_app_update**](docs/ApiAppApi.md#api_app_update) | **PUT** /api_app/{client_id} | Update API App |
119
119
  |*Dropbox::Sign::BulkSendJobApi* | [**bulk_send_job_get**](docs/BulkSendJobApi.md#bulk_send_job_get) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job |
120
120
  |*Dropbox::Sign::BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs |
121
+ |*Dropbox::Sign::DocumentApi* | [**document_detect_fields**](docs/DocumentApi.md#document_detect_fields) | **POST** /document/detect_fields | Detect Document Fields |
121
122
  |*Dropbox::Sign::EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL |
122
123
  |*Dropbox::Sign::EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL |
123
124
  |*Dropbox::Sign::FaxApi* | [**fax_delete**](docs/FaxApi.md#fax_delete) | **DELETE** /fax/{fax_id} | Delete Fax |
@@ -209,6 +210,9 @@ All URIs are relative to *https://api.hellosign.com/v3*
209
210
  - [Dropbox::Sign::BulkSendJobListResponse](docs/BulkSendJobListResponse.md)
210
211
  - [Dropbox::Sign::BulkSendJobResponse](docs/BulkSendJobResponse.md)
211
212
  - [Dropbox::Sign::BulkSendJobSendResponse](docs/BulkSendJobSendResponse.md)
213
+ - [Dropbox::Sign::DocumentFieldDetectionRequest](docs/DocumentFieldDetectionRequest.md)
214
+ - [Dropbox::Sign::DocumentFieldDetectionResponse](docs/DocumentFieldDetectionResponse.md)
215
+ - [Dropbox::Sign::DocumentFieldDetectionResponseDetectionResult](docs/DocumentFieldDetectionResponseDetectionResult.md)
212
216
  - [Dropbox::Sign::EmbeddedEditUrlRequest](docs/EmbeddedEditUrlRequest.md)
213
217
  - [Dropbox::Sign::EmbeddedEditUrlResponse](docs/EmbeddedEditUrlResponse.md)
214
218
  - [Dropbox::Sign::EmbeddedEditUrlResponseEmbedded](docs/EmbeddedEditUrlResponseEmbedded.md)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.14.0
1
+ 1.15.0
@@ -0,0 +1,82 @@
1
+ # Dropbox::Sign::DocumentApi
2
+
3
+ All URIs are relative to *https://api.hellosign.com/v3*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [`document_detect_fields`](DocumentApi.md#document_detect_fields) | **POST** `/document/detect_fields` | Detect Document Fields |
8
+
9
+
10
+ ## `document_detect_fields`
11
+
12
+ > `<DocumentFieldDetectionResponse> document_detect_fields(document_field_detection_request)`
13
+
14
+ Detect Document Fields
15
+
16
+ Detects form fields in a PDF document using either PDF form annotations or Dropbox Sign text tags.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require "json"
22
+ require "dropbox-sign"
23
+
24
+ Dropbox::Sign.configure do |config|
25
+ config.username = "YOUR_API_KEY"
26
+ # config.access_token = "YOUR_ACCESS_TOKEN"
27
+ end
28
+
29
+ document_field_detection_request = Dropbox::Sign::DocumentFieldDetectionRequest.new
30
+ document_field_detection_request.detection_mode = "annotations"
31
+ document_field_detection_request.file = File.new("./example_document.pdf", "r")
32
+ document_field_detection_request.page_range = "all"
33
+
34
+ begin
35
+ response = Dropbox::Sign::DocumentApi.new.document_detect_fields(
36
+ document_field_detection_request,
37
+ )
38
+
39
+ p response
40
+ rescue Dropbox::Sign::ApiError => e
41
+ puts "Exception when calling DocumentApi#document_detect_fields: #{e}"
42
+ end
43
+
44
+ ```
45
+
46
+ #### Using the `document_detect_fields_with_http_info` variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > `<Array(<DocumentFieldDetectionResponse>, Integer, Hash)> document_detect_fields_with_http_info(document_field_detection_request)`
51
+
52
+ ```ruby
53
+ begin
54
+ # Detect Document Fields
55
+ data, status_code, headers = api_instance.document_detect_fields_with_http_info(document_field_detection_request)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <DocumentFieldDetectionResponse>
59
+ rescue Dropbox::Sign::ApiError => e
60
+ puts "Error when calling DocumentApi->document_detect_fields_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | `document_field_detection_request` | [**DocumentFieldDetectionRequest**](DocumentFieldDetectionRequest.md) | | |
69
+
70
+ ### Return type
71
+
72
+ [**DocumentFieldDetectionResponse**](DocumentFieldDetectionResponse.md)
73
+
74
+ ### Authorization
75
+
76
+ [api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: application/json, multipart/form-data
81
+ - **Accept**: application/json
82
+
@@ -0,0 +1,13 @@
1
+ # Dropbox::Sign::DocumentFieldDetectionRequest
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `detection_mode`<sup>*_required_</sup> | ```String``` | The field detection method to use. Set to `annotations` to detect PDF form annotations or `text_tags` to detect Dropbox Sign text tags. | |
10
+ | `file` | ```File``` | The PDF file to analyze.<br><br>This endpoint requires either `file` or `file_url`, but not both. | |
11
+ | `file_url` | ```String``` | The URL of the PDF file to analyze.<br><br>This endpoint requires either `file` or `file_url`, but not both. | |
12
+ | `page_range` | ```String``` | The zero-based page indexes to analyze. Accepts `all`, individual pages, inclusive ranges, or comma-separated combinations, such as `0-2,5,7-9`. Defaults to `all`. | |
13
+
@@ -0,0 +1,11 @@
1
+ # Dropbox::Sign::DocumentFieldDetectionResponse
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `detection_result`<sup>*_required_</sup> | [```DocumentFieldDetectionResponseDetectionResult```](DocumentFieldDetectionResponseDetectionResult.md) | | |
10
+ | `warnings` | [```Array<WarningResponse>```](WarningResponse.md) | A list of warnings. | |
11
+
@@ -0,0 +1,19 @@
1
+ # Dropbox::Sign::DocumentFieldDetectionResponseDetectionResult
2
+
3
+
4
+
5
+ ## Properties
6
+
7
+ | Name | Type | Description | Notes |
8
+ | ---- | ---- | ----------- | ----- |
9
+ | `document_hash`<sup>*_required_</sup> | ```String``` | The SHA-256 hash of the analyzed document. | |
10
+ | `detection_mode`<sup>*_required_</sup> | ```String``` | The field detection method used to analyze the document: `annotations` or `text_tags`. | |
11
+ | `page_count`<sup>*_required_</sup> | ```Integer``` | The total number of pages in the document. | |
12
+ | `pages_analyzed`<sup>*_required_</sup> | ```String``` | The zero-based page indexes analyzed, represented by the requested `page_range`, or `all` when every page was analyzed. | |
13
+ | `detected_at`<sup>*_required_</sup> | ```Integer``` | The Unix timestamp when the field detection result was generated. | |
14
+ | `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` | |
15
+ | `form_field_groups`<sup>*_required_</sup> | [```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`. | |
16
+ | `warnings`<sup>*_required_</sup> | [```Array<WarningResponse>```](WarningResponse.md) | Non-fatal issues encountered during field detection. | |
17
+ | `errors`<sup>*_required_</sup> | [```Array<ErrorResponseError>```](ErrorResponseError.md) | Errors encountered during field detection. Successfully detected fields may still be included in the response. | |
18
+ | `suggestions`<sup>*_required_</sup> | ```Array<String>``` | Suggestions for improving the field detection results. | |
19
+
data/docs/FaxResponse.md CHANGED
@@ -14,6 +14,7 @@
14
14
  | `sender`<sup>*_required_</sup> | ```String``` | Fax Sender Email | |
15
15
  | `files_url`<sup>*_required_</sup> | ```String``` | Fax Files URL | |
16
16
  | `transmissions`<sup>*_required_</sup> | [```Array<FaxResponseTransmission>```](FaxResponseTransmission.md) | Fax Transmissions List | |
17
+ | `test_mode`<sup>*_required_</sup> | ```Boolean``` | Whether this is a test fax. Test faxes are not delivered to the recipient. Defaults to `false`. | [default to false] |
17
18
  | `subject` | ```String``` | Fax Subject | |
18
19
  | `message` | ```String``` | Fax Message | |
19
20
  | `final_copy_uri` | ```String``` | The path where the completed document can be downloaded | |
@@ -19,4 +19,5 @@
19
19
  | `subject` | ```String``` | The subject in the email that will be sent to the signers. | |
20
20
  | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] |
21
21
  | `title` | ```String``` | The title you want to assign to the SignatureRequest. | |
22
+ | `expires_at` | ```Integer``` | 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. | |
22
23
 
@@ -19,4 +19,5 @@
19
19
  | `subject` | ```String``` | The subject in the email that will be sent to the signers. | |
20
20
  | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] |
21
21
  | `title` | ```String``` | The title you want to assign to the SignatureRequest. | |
22
+ | `expires_at` | ```Integer``` | 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. | |
22
23
 
@@ -21,4 +21,5 @@
21
21
  | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] |
22
22
  | `title` | ```String``` | The title you want to assign to the SignatureRequest. | |
23
23
  | `populate_auto_fill_fields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer&#39;s information during signing.<br><br>**NOTE:** Keep your signer&#39;s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] |
24
+ | `expires_at` | ```Integer``` | 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. | |
24
25
 
@@ -23,4 +23,5 @@
23
23
  | `subject` | ```String``` | The subject in the email that will be sent to the signers. | |
24
24
  | `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] |
25
25
  | `title` | ```String``` | The title you want to assign to the SignatureRequest. | |
26
+ | `expires_at` | ```Integer``` | 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. | |
26
27
 
@@ -0,0 +1,22 @@
1
+ require "json"
2
+ require "dropbox-sign"
3
+
4
+ Dropbox::Sign.configure do |config|
5
+ config.username = "YOUR_API_KEY"
6
+ # config.access_token = "YOUR_ACCESS_TOKEN"
7
+ end
8
+
9
+ document_field_detection_request = Dropbox::Sign::DocumentFieldDetectionRequest.new
10
+ document_field_detection_request.detection_mode = "annotations"
11
+ document_field_detection_request.file = File.new("./example_document.pdf", "r")
12
+ document_field_detection_request.page_range = "all"
13
+
14
+ begin
15
+ response = Dropbox::Sign::DocumentApi.new.document_detect_fields(
16
+ document_field_detection_request,
17
+ )
18
+
19
+ p response
20
+ rescue Dropbox::Sign::ApiError => e
21
+ puts "Exception when calling DocumentApi#document_detect_fields: #{e}"
22
+ end
@@ -24,6 +24,7 @@ module Dropbox::Sign
24
24
  end
25
25
  # Create Account
26
26
  # Creates a new Dropbox Sign Account that is associated with the specified `email_address`.
27
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountCreateExample.rb
27
28
  # @param account_create_request [AccountCreateRequest]
28
29
  # @param [Hash] opts the optional parameters
29
30
  # @return [AccountCreateResponse]
@@ -34,6 +35,7 @@ module Dropbox::Sign
34
35
 
35
36
  # Create Account
36
37
  # Creates a new Dropbox Sign Account that is associated with the specified &#x60;email_address&#x60;.
38
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountCreateExample.rb
37
39
  # @param account_create_request [AccountCreateRequest]
38
40
  # @param [Hash] opts the optional parameters
39
41
  # @return [Array<(AccountCreateResponse, Integer, Hash)>] AccountCreateResponse data, response status code and response headers
@@ -134,6 +136,7 @@ module Dropbox::Sign
134
136
 
135
137
  # Get Account
136
138
  # Returns the properties and settings of your Account.
139
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountGetExample.rb
137
140
  # @param [Hash] opts the optional parameters
138
141
  # @option opts [String] :account_id &#x60;account_id&#x60; or &#x60;email_address&#x60; is required. If both are provided, the account id prevails. The ID of the Account.
139
142
  # @option opts [String] :email_address &#x60;account_id&#x60; or &#x60;email_address&#x60; is required, If both are provided, the account id prevails. The email address of the Account.
@@ -145,6 +148,7 @@ module Dropbox::Sign
145
148
 
146
149
  # Get Account
147
150
  # Returns the properties and settings of your Account.
151
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountGetExample.rb
148
152
  # @param [Hash] opts the optional parameters
149
153
  # @option opts [String] :account_id &#x60;account_id&#x60; or &#x60;email_address&#x60; is required. If both are provided, the account id prevails. The ID of the Account.
150
154
  # @option opts [String] :email_address &#x60;account_id&#x60; or &#x60;email_address&#x60; is required, If both are provided, the account id prevails. The email address of the Account.
@@ -229,6 +233,7 @@ module Dropbox::Sign
229
233
 
230
234
  # Update Account
231
235
  # Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
236
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountUpdateExample.rb
232
237
  # @param account_update_request [AccountUpdateRequest]
233
238
  # @param [Hash] opts the optional parameters
234
239
  # @return [AccountGetResponse]
@@ -239,6 +244,7 @@ module Dropbox::Sign
239
244
 
240
245
  # Update Account
241
246
  # Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
247
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountUpdateExample.rb
242
248
  # @param account_update_request [AccountUpdateRequest]
243
249
  # @param [Hash] opts the optional parameters
244
250
  # @return [Array<(AccountGetResponse, Integer, Hash)>] AccountGetResponse data, response status code and response headers
@@ -339,6 +345,7 @@ module Dropbox::Sign
339
345
 
340
346
  # Verify Account
341
347
  # Verifies whether an Dropbox Sign Account exists for the given email address.
348
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountVerifyExample.rb
342
349
  # @param account_verify_request [AccountVerifyRequest]
343
350
  # @param [Hash] opts the optional parameters
344
351
  # @return [AccountVerifyResponse]
@@ -349,6 +356,7 @@ module Dropbox::Sign
349
356
 
350
357
  # Verify Account
351
358
  # Verifies whether an Dropbox Sign Account exists for the given email address.
359
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/AccountVerifyExample.rb
352
360
  # @param account_verify_request [AccountVerifyRequest]
353
361
  # @param [Hash] opts the optional parameters
354
362
  # @return [Array<(AccountVerifyResponse, Integer, Hash)>] AccountVerifyResponse data, response status code and response headers
@@ -24,6 +24,7 @@ module Dropbox::Sign
24
24
  end
25
25
  # Create API App
26
26
  # Creates a new API App.
27
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppCreateExample.rb
27
28
  # @param api_app_create_request [ApiAppCreateRequest]
28
29
  # @param [Hash] opts the optional parameters
29
30
  # @return [ApiAppGetResponse]
@@ -34,6 +35,7 @@ module Dropbox::Sign
34
35
 
35
36
  # Create API App
36
37
  # Creates a new API App.
38
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppCreateExample.rb
37
39
  # @param api_app_create_request [ApiAppCreateRequest]
38
40
  # @param [Hash] opts the optional parameters
39
41
  # @return [Array<(ApiAppGetResponse, Integer, Hash)>] ApiAppGetResponse data, response status code and response headers
@@ -134,6 +136,7 @@ module Dropbox::Sign
134
136
 
135
137
  # Delete API App
136
138
  # Deletes an API App. Can only be invoked for apps you own.
139
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppDeleteExample.rb
137
140
  # @param client_id [String] The client id of the API App to delete.
138
141
  # @param [Hash] opts the optional parameters
139
142
  # @return [nil]
@@ -144,6 +147,7 @@ module Dropbox::Sign
144
147
 
145
148
  # Delete API App
146
149
  # Deletes an API App. Can only be invoked for apps you own.
150
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppDeleteExample.rb
147
151
  # @param client_id [String] The client id of the API App to delete.
148
152
  # @param [Hash] opts the optional parameters
149
153
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -202,6 +206,7 @@ module Dropbox::Sign
202
206
 
203
207
  # Get API App
204
208
  # Returns an object with information about an API App.
209
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppGetExample.rb
205
210
  # @param client_id [String] The client id of the API App to retrieve.
206
211
  # @param [Hash] opts the optional parameters
207
212
  # @return [ApiAppGetResponse]
@@ -212,6 +217,7 @@ module Dropbox::Sign
212
217
 
213
218
  # Get API App
214
219
  # Returns an object with information about an API App.
220
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppGetExample.rb
215
221
  # @param client_id [String] The client id of the API App to retrieve.
216
222
  # @param [Hash] opts the optional parameters
217
223
  # @return [Array<(ApiAppGetResponse, Integer, Hash)>] ApiAppGetResponse data, response status code and response headers
@@ -297,6 +303,7 @@ module Dropbox::Sign
297
303
 
298
304
  # List API Apps
299
305
  # Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates.
306
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppListExample.rb
300
307
  # @param [Hash] opts the optional parameters
301
308
  # @option opts [Integer] :page Which page number of the API App List to return. Defaults to &#x60;1&#x60;. (default to 1)
302
309
  # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between &#x60;1&#x60; and &#x60;100&#x60;. Default is &#x60;20&#x60;. (default to 20)
@@ -308,6 +315,7 @@ module Dropbox::Sign
308
315
 
309
316
  # List API Apps
310
317
  # Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates.
318
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppListExample.rb
311
319
  # @param [Hash] opts the optional parameters
312
320
  # @option opts [Integer] :page Which page number of the API App List to return. Defaults to &#x60;1&#x60;. (default to 1)
313
321
  # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between &#x60;1&#x60; and &#x60;100&#x60;. Default is &#x60;20&#x60;. (default to 20)
@@ -392,6 +400,7 @@ module Dropbox::Sign
392
400
 
393
401
  # Update API App
394
402
  # Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string.
403
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppUpdateExample.rb
395
404
  # @param client_id [String] The client id of the API App to update.
396
405
  # @param api_app_update_request [ApiAppUpdateRequest]
397
406
  # @param [Hash] opts the optional parameters
@@ -403,6 +412,7 @@ module Dropbox::Sign
403
412
 
404
413
  # Update API App
405
414
  # Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string.
415
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/ApiAppUpdateExample.rb
406
416
  # @param client_id [String] The client id of the API App to update.
407
417
  # @param api_app_update_request [ApiAppUpdateRequest]
408
418
  # @param [Hash] opts the optional parameters
@@ -24,6 +24,7 @@ module Dropbox::Sign
24
24
  end
25
25
  # Get Bulk Send Job
26
26
  # Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter.
27
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/BulkSendJobGetExample.rb
27
28
  # @param bulk_send_job_id [String] The id of the BulkSendJob to retrieve.
28
29
  # @param [Hash] opts the optional parameters
29
30
  # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to &#x60;1&#x60;. (default to 1)
@@ -36,6 +37,7 @@ module Dropbox::Sign
36
37
 
37
38
  # Get Bulk Send Job
38
39
  # Returns the status of the BulkSendJob and its SignatureRequests specified by the &#x60;bulk_send_job_id&#x60; parameter.
40
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/BulkSendJobGetExample.rb
39
41
  # @param bulk_send_job_id [String] The id of the BulkSendJob to retrieve.
40
42
  # @param [Hash] opts the optional parameters
41
43
  # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to &#x60;1&#x60;. (default to 1)
@@ -125,6 +127,7 @@ module Dropbox::Sign
125
127
 
126
128
  # List Bulk Send Jobs
127
129
  # Returns a list of BulkSendJob that you can access.
130
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/BulkSendJobListExample.rb
128
131
  # @param [Hash] opts the optional parameters
129
132
  # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to &#x60;1&#x60;. (default to 1)
130
133
  # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between &#x60;1&#x60; and &#x60;100&#x60;. Default is 20. (default to 20)
@@ -136,6 +139,7 @@ module Dropbox::Sign
136
139
 
137
140
  # List Bulk Send Jobs
138
141
  # Returns a list of BulkSendJob that you can access.
142
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/BulkSendJobListExample.rb
139
143
  # @param [Hash] opts the optional parameters
140
144
  # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to &#x60;1&#x60;. (default to 1)
141
145
  # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between &#x60;1&#x60; and &#x60;100&#x60;. Default is 20. (default to 20)
@@ -0,0 +1,137 @@
1
+ =begin
2
+ #Dropbox Sign API
3
+
4
+ #Dropbox Sign v3 API
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: apisupport@hellosign.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Dropbox
16
+ end
17
+
18
+ module Dropbox::Sign
19
+ class DocumentApi
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = ApiClient.default)
23
+ @api_client = api_client
24
+ end
25
+ # Detect Document Fields
26
+ # Detects form fields in a PDF document using either PDF form annotations or Dropbox Sign text tags.
27
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/DocumentDetectFieldsExample.rb
28
+ # @param document_field_detection_request [DocumentFieldDetectionRequest]
29
+ # @param [Hash] opts the optional parameters
30
+ # @return [DocumentFieldDetectionResponse]
31
+ def document_detect_fields(document_field_detection_request, opts = {})
32
+ data, _status_code, _headers = document_detect_fields_with_http_info(document_field_detection_request, opts)
33
+ data
34
+ end
35
+
36
+ # Detect Document Fields
37
+ # Detects form fields in a PDF document using either PDF form annotations or Dropbox Sign text tags.
38
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/DocumentDetectFieldsExample.rb
39
+ # @param document_field_detection_request [DocumentFieldDetectionRequest]
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(DocumentFieldDetectionResponse, Integer, Hash)>] DocumentFieldDetectionResponse data, response status code and response headers
42
+ def document_detect_fields_with_http_info(document_field_detection_request, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug 'Calling API: DocumentApi.document_detect_fields ...'
45
+ end
46
+ # verify the required parameter 'document_field_detection_request' is set
47
+ if @api_client.config.client_side_validation && document_field_detection_request.nil?
48
+ fail ArgumentError, "Missing the required parameter 'document_field_detection_request' when calling DocumentApi.document_detect_fields"
49
+ end
50
+ # resource path
51
+ local_var_path = '/document/detect_fields'
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
60
+ # HTTP header 'Content-Type'
61
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
62
+ if !content_type.nil?
63
+ header_params['Content-Type'] = content_type
64
+ end
65
+
66
+ post_body = {}
67
+ form_params = opts[:form_params] || {}
68
+ result = @api_client.generate_form_data(
69
+ document_field_detection_request,
70
+ Dropbox::Sign::DocumentFieldDetectionRequest.openapi_types
71
+ )
72
+
73
+ # form parameters
74
+ if result[:has_file]
75
+ form_params = opts[:form_params] || result[:params]
76
+ header_params['Content-Type'] = 'multipart/form-data'
77
+ else
78
+ # http body (model)
79
+ post_body = opts[:debug_body] || result[:params]
80
+ end
81
+
82
+ # return_type
83
+ return_type = opts[:debug_return_type] || 'DocumentFieldDetectionResponse'
84
+
85
+ # auth_names
86
+ auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2']
87
+
88
+ new_options = opts.merge(
89
+ :operation => :"DocumentApi.document_detect_fields",
90
+ :header_params => header_params,
91
+ :query_params => query_params,
92
+ :form_params => form_params,
93
+ :body => post_body,
94
+ :auth_names => auth_names,
95
+ :return_type => return_type
96
+ )
97
+
98
+ begin
99
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
100
+ rescue Dropbox::Sign::ApiError => e
101
+ if e.code === 200
102
+ body = @api_client.convert_to_type(
103
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
104
+ "Dropbox::Sign::DocumentFieldDetectionResponse"
105
+ )
106
+
107
+ fail ApiError.new(:code => e.code,
108
+ :response_headers => e.response_headers,
109
+ :response_body => body),
110
+ e.message
111
+ end
112
+
113
+ range_code = "4XX".split('').first
114
+ range_code_left = "#{range_code}00".to_i
115
+ range_code_right = "#{range_code}99".to_i
116
+ if e.code && e.code >= range_code_left && e.code <= range_code_right
117
+ body = @api_client.convert_to_type(
118
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
119
+ "Dropbox::Sign::ErrorResponse"
120
+ )
121
+
122
+ fail ApiError.new(:code => e.code,
123
+ :response_headers => e.response_headers,
124
+ :response_body => body),
125
+ e.message
126
+ end
127
+
128
+ raise e
129
+ end
130
+
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: DocumentApi#document_detect_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+ end
137
+ end
@@ -24,6 +24,7 @@ module Dropbox::Sign
24
24
  end
25
25
  # Get Embedded Template Edit URL
26
26
  # Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint.
27
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/EmbeddedEditUrlExample.rb
27
28
  # @param template_id [String] The id of the template to edit.
28
29
  # @param embedded_edit_url_request [EmbeddedEditUrlRequest]
29
30
  # @param [Hash] opts the optional parameters
@@ -35,6 +36,7 @@ module Dropbox::Sign
35
36
 
36
37
  # Get Embedded Template Edit URL
37
38
  # Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint.
39
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/EmbeddedEditUrlExample.rb
38
40
  # @param template_id [String] The id of the template to edit.
39
41
  # @param embedded_edit_url_request [EmbeddedEditUrlRequest]
40
42
  # @param [Hash] opts the optional parameters
@@ -140,6 +142,7 @@ module Dropbox::Sign
140
142
 
141
143
  # Get Embedded Sign URL
142
144
  # Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API.
145
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/EmbeddedSignUrlExample.rb
143
146
  # @param signature_id [String] The id of the signature to get a signature url for.
144
147
  # @param [Hash] opts the optional parameters
145
148
  # @return [EmbeddedSignUrlResponse]
@@ -150,6 +153,7 @@ module Dropbox::Sign
150
153
 
151
154
  # Get Embedded Sign URL
152
155
  # Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API.
156
+ # Example: https://github.com/hellosign/dropbox-sign-ruby/blob/main/examples/EmbeddedSignUrlExample.rb
153
157
  # @param signature_id [String] The id of the signature to get a signature url for.
154
158
  # @param [Hash] opts the optional parameters
155
159
  # @return [Array<(EmbeddedSignUrlResponse, Integer, Hash)>] EmbeddedSignUrlResponse data, response status code and response headers