diff --git a/.travis.yml b/.travis.yml index 01488db..0cc7629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.2.0.gem + - gem install ./dropbox-sign-1.3.0.gem diff --git a/Gemfile.lock b/Gemfile.lock index fe3a74b..3bcf2dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.2.0) + dropbox-sign (1.3.0) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -56,7 +56,7 @@ GEM unicode-display_width (>= 1.4.0, < 1.6) ruby-progressbar (1.11.0) stringio (3.0.1) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) unicode-display_width (1.5.0) diff --git a/README.md b/README.md index c1db3a5..00ec157 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ directory that corresponds to the file you want updated. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.2.0 +- Package version: 1.3.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -46,14 +46,14 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.2.0.gem +gem install ./dropbox-sign-1.3.0.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.2.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.3.0.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.2.0' + gem 'dropbox-sign', '~> 1.3.0' ### Install from Git diff --git a/VERSION b/VERSION index 26aaba0..f0bb29e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.0 +1.3.0 diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index b3ccd7b..6bb78d0 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -651,7 +651,7 @@ end ## `signature_request_files_as_file_url` -> ` signature_request_files_as_file_url(signature_request_id)` +> ` signature_request_files_as_file_url(signature_request_id, opts)` Download Files as File Url @@ -687,12 +687,12 @@ end This returns an Array which contains the response data, status code and headers. -> `, Integer, Hash)> signature_request_files_as_file_url_with_http_info(signature_request_id)` +> `, Integer, Hash)> signature_request_files_as_file_url_with_http_info(signature_request_id, opts)` ```ruby begin # Download Files as File Url - data, status_code, headers = api_instance.signature_request_files_as_file_url_with_http_info(signature_request_id) + data, status_code, headers = api_instance.signature_request_files_as_file_url_with_http_info(signature_request_id, opts) p status_code # => 2xx p headers # => { ... } p data # => @@ -706,6 +706,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `signature_request_id` | **String** | The id of the SignatureRequest to retrieve. | | +| `force_download` | **Integer** | 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. | [optional][default to 1] | ### Return type diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index 0c11986..921b0a6 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -514,7 +514,7 @@ end ## `template_files_as_file_url` -> ` template_files_as_file_url(template_id)` +> ` template_files_as_file_url(template_id, opts)` Get Template Files as File Url @@ -550,12 +550,12 @@ end This returns an Array which contains the response data, status code and headers. -> `, Integer, Hash)> template_files_as_file_url_with_http_info(template_id)` +> `, Integer, Hash)> template_files_as_file_url_with_http_info(template_id, opts)` ```ruby begin # Get Template Files as File Url - data, status_code, headers = api_instance.template_files_as_file_url_with_http_info(template_id) + data, status_code, headers = api_instance.template_files_as_file_url_with_http_info(template_id, opts) p status_code # => 2xx p headers # => { ... } p data # => @@ -569,6 +569,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `template_id` | **String** | The id of the template files to retrieve. | | +| `force_download` | **Integer** | 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. | [optional][default to 1] | ### Return type diff --git a/docs/TemplateCreateResponse.md b/docs/TemplateCreateResponse.md index e7e4f77..7592150 100644 --- a/docs/TemplateCreateResponse.md +++ b/docs/TemplateCreateResponse.md @@ -6,6 +6,6 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `template` | [```TemplateCreateResponse```](TemplateCreateResponse.md) | | | +| `template` | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | | | | `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | diff --git a/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index 2fe23db..6fede20 100644 --- a/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -35,4 +35,5 @@ | `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] | | `title` | ```String``` | The title you want to assign to the SignatureRequest. | | | `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'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] | +| `allow_ccs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | [default to false] | diff --git a/lib/dropbox-sign/api/signature_request_api.rb b/lib/dropbox-sign/api/signature_request_api.rb index eb3ea1e..bc857d3 100644 --- a/lib/dropbox-sign/api/signature_request_api.rb +++ b/lib/dropbox-sign/api/signature_request_api.rb @@ -724,6 +724,7 @@ def signature_request_files_as_data_uri_with_http_info(signature_request_id, opt # 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. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. # @param [Hash] opts the optional parameters + # @option opts [Integer] :force_download 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. (default to 1) # @return [FileResponse] def signature_request_files_as_file_url(signature_request_id, opts = {}) data, _status_code, _headers = signature_request_files_as_file_url_with_http_info(signature_request_id, opts) @@ -734,6 +735,7 @@ def signature_request_files_as_file_url(signature_request_id, opts = {}) # 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. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. # @param [Hash] opts the optional parameters + # @option opts [Integer] :force_download 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. # @return [Array<(FileResponse, Integer, Hash)>] FileResponse data, response status code and response headers def signature_request_files_as_file_url_with_http_info(signature_request_id, opts = {}) if @api_client.config.debugging @@ -748,6 +750,7 @@ def signature_request_files_as_file_url_with_http_info(signature_request_id, opt # query parameters query_params = opts[:query_params] || {} + query_params[:'force_download'] = opts[:'force_download'] if !opts[:'force_download'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/dropbox-sign/api/template_api.rb b/lib/dropbox-sign/api/template_api.rb index c4941d8..e3f5852 100644 --- a/lib/dropbox-sign/api/template_api.rb +++ b/lib/dropbox-sign/api/template_api.rb @@ -621,6 +621,7 @@ def template_files_as_data_uri_with_http_info(template_id, opts = {}) # 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. # @param template_id [String] The id of the template files to retrieve. # @param [Hash] opts the optional parameters + # @option opts [Integer] :force_download 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. (default to 1) # @return [FileResponse] def template_files_as_file_url(template_id, opts = {}) data, _status_code, _headers = template_files_as_file_url_with_http_info(template_id, opts) @@ -631,6 +632,7 @@ def template_files_as_file_url(template_id, opts = {}) # 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. # @param template_id [String] The id of the template files to retrieve. # @param [Hash] opts the optional parameters + # @option opts [Integer] :force_download 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. # @return [Array<(FileResponse, Integer, Hash)>] FileResponse data, response status code and response headers def template_files_as_file_url_with_http_info(template_id, opts = {}) if @api_client.config.debugging @@ -645,6 +647,7 @@ def template_files_as_file_url_with_http_info(template_id, opts = {}) # query parameters query_params = opts[:query_params] || {} + query_params[:'force_download'] = opts[:'force_download'] if !opts[:'force_download'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/dropbox-sign/models/template_create_response.rb b/lib/dropbox-sign/models/template_create_response.rb index 617fc56..49354f1 100644 --- a/lib/dropbox-sign/models/template_create_response.rb +++ b/lib/dropbox-sign/models/template_create_response.rb @@ -18,7 +18,7 @@ module Dropbox module Dropbox::Sign class TemplateCreateResponse - # @return [TemplateCreateResponse] + # @return [TemplateCreateResponseTemplate] attr_accessor :template # A list of warnings. @@ -46,7 +46,7 @@ def self.merged_attributes # Attribute type mapping. def self.openapi_types { - :'template' => :'TemplateCreateResponse', + :'template' => :'TemplateCreateResponseTemplate', :'warnings' => :'Array' } end diff --git a/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb b/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb index 3e2c263..8b56830 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb @@ -131,6 +131,10 @@ class UnclaimedDraftCreateEmbeddedWithTemplateRequest # @return [Boolean] attr_accessor :populate_auto_fill_fields + # This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + # @return [Boolean] + attr_accessor :allow_ccs + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -162,7 +166,8 @@ def self.attribute_map :'subject' => :'subject', :'test_mode' => :'test_mode', :'title' => :'title', - :'populate_auto_fill_fields' => :'populate_auto_fill_fields' + :'populate_auto_fill_fields' => :'populate_auto_fill_fields', + :'allow_ccs' => :'allow_ccs' } end @@ -207,7 +212,8 @@ def self.openapi_types :'subject' => :'String', :'test_mode' => :'Boolean', :'title' => :'String', - :'populate_auto_fill_fields' => :'Boolean' + :'populate_auto_fill_fields' => :'Boolean', + :'allow_ccs' => :'Boolean' } end @@ -405,6 +411,12 @@ def initialize(attributes = {}) else self.populate_auto_fill_fields = false end + + if attributes.key?(:'allow_ccs') + self.allow_ccs = attributes[:'allow_ccs'] + else + self.allow_ccs = false + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -519,7 +531,8 @@ def ==(o) subject == o.subject && test_mode == o.test_mode && title == o.title && - populate_auto_fill_fields == o.populate_auto_fill_fields + populate_auto_fill_fields == o.populate_auto_fill_fields && + allow_ccs == o.allow_ccs end # @see the `==` method @@ -531,7 +544,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [client_id, requester_email_address, template_ids, allow_decline, allow_reassign, ccs, custom_fields, editor_options, field_options, files, file_urls, force_signer_roles, force_subject_message, hold_request, is_for_embedded_signing, message, metadata, preview_only, requesting_redirect_url, show_preview, show_progress_stepper, signers, signing_options, signing_redirect_url, skip_me_now, subject, test_mode, title, populate_auto_fill_fields].hash + [client_id, requester_email_address, template_ids, allow_decline, allow_reassign, ccs, custom_fields, editor_options, field_options, files, file_urls, force_signer_roles, force_subject_message, hold_request, is_for_embedded_signing, message, metadata, preview_only, requesting_redirect_url, show_preview, show_progress_stepper, signers, signing_options, signing_redirect_url, skip_me_now, subject, test_mode, title, populate_auto_fill_fields, allow_ccs].hash end # Builds the object from hash diff --git a/lib/dropbox-sign/version.rb b/lib/dropbox-sign/version.rb index ab6fdfe..5b31f4a 100644 --- a/lib/dropbox-sign/version.rb +++ b/lib/dropbox-sign/version.rb @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.2.0' + VERSION = '1.3.0' end diff --git a/openapi-config.yaml b/openapi-config.yaml index a02dadb..9374661 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -9,7 +9,7 @@ additionalProperties: gemName: dropbox-sign gemRequiredRubyVersion: '>= 2.7' moduleName: "Dropbox::Sign" - gemVersion: 1.2.0 + gemVersion: 1.3.0 sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 44642ca..6ef2e00 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -2483,6 +2483,13 @@ paths: 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 responses: 200: description: 'successful operation' @@ -5214,6 +5221,13 @@ paths: 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 responses: 200: description: 'successful operation' @@ -9074,6 +9088,10 @@ components: ⚠️ **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 + allow_ccs: + description: 'This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.' + type: boolean + default: false type: object UnclaimedDraftEditAndResendRequest: required: @@ -9242,20 +9260,6 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object - EventCallbackRequest: - title: EventCallbackRequest - required: - - event - properties: - event: - $ref: '#/components/schemas/EventCallbackRequestEvent' - account: - $ref: '#/components/schemas/AccountResponse' - signature_request: - $ref: '#/components/schemas/SignatureRequestResponse' - template: - $ref: '#/components/schemas/TemplateResponse' - type: object FileResponse: properties: file_url: @@ -9572,69 +9576,6 @@ components: description: 'Name of the error.' type: string type: object - EventCallbackRequestEvent: - description: 'Basic information about the event that occurred.' - required: - - event_time - - event_type - - event_hash - - event_metadata - properties: - event_time: - description: 'Time the event was created (using Unix time).' - type: string - event_type: - description: 'Type of callback event that was triggered.' - type: string - enum: - - account_confirmed - - unknown_error - - file_error - - sign_url_invalid - - signature_request_viewed - - signature_request_signed - - signature_request_sent - - signature_request_all_signed - - signature_request_email_bounce - - signature_request_remind - - signature_request_incomplete_qes - - signature_request_destroyed - - signature_request_canceled - - signature_request_downloadable - - signature_request_declined - - signature_request_reassigned - - signature_request_invalid - - signature_request_prepared - - signature_request_expired - - template_created - - template_error - - callback_test - event_hash: - description: 'Generated hash used to verify source of event data.' - type: string - event_metadata: - $ref: '#/components/schemas/EventCallbackRequestEventMetadata' - type: object - EventCallbackRequestEventMetadata: - description: 'Specific metadata about the event.' - properties: - related_signature_id: - description: 'Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.' - type: string - nullable: true - reported_for_account_id: - description: 'Account ID the event was reported for.' - type: string - nullable: true - reported_for_app_id: - description: 'App ID the event was reported for.' - type: string - nullable: true - event_message: - description: 'Message about a declined or failed (due to error) signature flow.' - type: string - nullable: true - type: object ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11178,7 +11119,7 @@ components: TemplateCreateResponse: properties: template: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TemplateCreateResponseTemplate' warnings: description: 'A list of warnings.' type: array @@ -11247,6 +11188,83 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal: true + EventCallbackRequest: + title: EventCallbackRequest + required: + - event + properties: + event: + $ref: '#/components/schemas/EventCallbackRequestEvent' + account: + $ref: '#/components/schemas/AccountResponse' + signature_request: + $ref: '#/components/schemas/SignatureRequestResponse' + template: + $ref: '#/components/schemas/TemplateResponse' + type: object + EventCallbackRequestEvent: + description: 'Basic information about the event that occurred.' + required: + - event_time + - event_type + - event_hash + - event_metadata + properties: + event_time: + description: 'Time the event was created (using Unix time).' + type: string + event_type: + description: 'Type of callback event that was triggered.' + type: string + enum: + - account_confirmed + - unknown_error + - file_error + - sign_url_invalid + - signature_request_viewed + - signature_request_signed + - signature_request_sent + - signature_request_all_signed + - signature_request_email_bounce + - signature_request_remind + - signature_request_incomplete_qes + - signature_request_destroyed + - signature_request_canceled + - signature_request_downloadable + - signature_request_declined + - signature_request_reassigned + - signature_request_invalid + - signature_request_prepared + - signature_request_expired + - template_created + - template_error + - callback_test + event_hash: + description: 'Generated hash used to verify source of event data.' + type: string + event_metadata: + $ref: '#/components/schemas/EventCallbackRequestEventMetadata' + type: object + EventCallbackRequestEventMetadata: + description: 'Specific metadata about the event.' + properties: + related_signature_id: + description: 'Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.' + type: string + nullable: true + reported_for_account_id: + description: 'Account ID the event was reported for.' + type: string + nullable: true + reported_for_app_id: + description: 'App ID the event was reported for.' + type: string + nullable: true + event_message: + description: 'Message about a declined or failed (due to error) signature flow.' + type: string + nullable: true + type: object responses: EventCallbackResponse: description: 'successful operation' @@ -11560,26 +11578,6 @@ components: summary: 'API App Update' value: $ref: examples/json/ApiAppUpdateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: - summary: 'Example: signature_request_sent' - value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: - summary: 'Example: template_created' - value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: - summary: 'Example: account_confirmed' - value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: - summary: 'Example: signature_request_sent' - value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: - summary: 'Example: template_created' - value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json SignatureRequestCreateEmbeddedResponseExample: summary: 'Create Embedded Signature Request' value: @@ -11708,6 +11706,26 @@ components: summary: 'Unclaimed Draft Create' value: $ref: examples/json/UnclaimedDraftCreateResponseExample.json + EventCallbackAccountSignatureRequestSentExample: + summary: 'Example: signature_request_sent' + value: + $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json + EventCallbackAccountTemplateCreatedExample: + summary: 'Example: template_created' + value: + $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json + EventCallbackAppAccountConfirmedExample: + summary: 'Example: account_confirmed' + value: + $ref: examples/json/EventCallbackAppAccountConfirmedExample.json + EventCallbackAppSignatureRequestSentExample: + summary: 'Example: signature_request_sent' + value: + $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json + EventCallbackAppTemplateCreatedExample: + summary: 'Example: template_created' + value: + $ref: examples/json/EventCallbackAppTemplateCreatedExample.json requestBodies: EventCallbackAccountRequest: description: |- diff --git a/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json b/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json index d59cf95..4a1aafb 100644 --- a/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json +++ b/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json @@ -62,6 +62,7 @@ "61a832ff0d8423f91d503e76bfbcc750f7417c78" ], "test_mode": false, - "title": "NDA with Acme Co." + "title": "NDA with Acme Co.", + "allow_ccs": true } }