diff --git a/.travis.yml b/.travis.yml index 5731dc5..748f026 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.9.0.gem + - gem install ./dropbox-sign-1.10.0.gem diff --git a/Gemfile.lock b/Gemfile.lock index f1b43bb..5b520e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.9.0) + dropbox-sign (1.10.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 1a7027f..370dd5a 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.9.0 +- Package version: 1.10.0 - Generator version: 7.12.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen @@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.9.0.gem +gem install ./dropbox-sign-1.10.0.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.9.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.10.0.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.9.0' + gem 'dropbox-sign', '~> 1.10.0' ### Install from Git diff --git a/VERSION b/VERSION index f8e233b..81c871d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9.0 +1.10.0 diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md index 4bd1757..0980f70 100644 --- a/docs/OAuthTokenRefreshRequest.md +++ b/docs/OAuthTokenRefreshRequest.md @@ -8,6 +8,6 @@ | ---- | ---- | ----------- | ----- | | `grant_type`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```String``` | The token provided when you got the expired access token. | | -| `client_id` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | -| `client_secret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_id` | ```String``` | The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. | | +| `client_secret` | ```String``` | The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. | | diff --git a/docs/TemplateResponseDocumentFormFieldText.md b/docs/TemplateResponseDocumentFormFieldText.md index 7bfe702..f63026a 100644 --- a/docs/TemplateResponseDocumentFormFieldText.md +++ b/docs/TemplateResponseDocumentFormFieldText.md @@ -12,5 +12,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `original_font_size` | ```Integer``` | Original font size used in this form field's text. | | | `font_family` | ```String``` | Font family used in this form field's text. | | | `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. | | +| `validation_custom_regex` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. | | +| `validation_custom_regex_format_label` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. | | | `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/lib/dropbox-sign/models/api_app_create_request.rb b/lib/dropbox-sign/models/api_app_create_request.rb index f37d1a2..c9cf7bf 100644 --- a/lib/dropbox-sign/models/api_app_create_request.rb +++ b/lib/dropbox-sign/models/api_app_create_request.rb @@ -165,8 +165,8 @@ def list_invalid_properties invalid_properties.push('invalid value for "domains", domains cannot be nil.') end - if @domains.length > 2 - invalid_properties.push('invalid value for "domains", number of items must be less than or equal to 2.') + if @domains.length > 10 + invalid_properties.push('invalid value for "domains", number of items must be less than or equal to 10.') end if @domains.length < 1 @@ -184,7 +184,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @domains.nil? - return false if @domains.length > 2 + return false if @domains.length > 10 return false if @domains.length < 1 return false if @name.nil? true @@ -196,8 +196,8 @@ def domains=(domains) if domains.nil? fail ArgumentError, 'domains cannot be nil' end - if domains.length > 2 - fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 2.' + if domains.length > 10 + fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 10.' end if domains.length < 1 diff --git a/lib/dropbox-sign/models/api_app_update_request.rb b/lib/dropbox-sign/models/api_app_update_request.rb index 45b38ce..4e04ba1 100644 --- a/lib/dropbox-sign/models/api_app_update_request.rb +++ b/lib/dropbox-sign/models/api_app_update_request.rb @@ -161,8 +161,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if !@domains.nil? && @domains.length > 2 - invalid_properties.push('invalid value for "domains", number of items must be less than or equal to 2.') + if !@domains.nil? && @domains.length > 10 + invalid_properties.push('invalid value for "domains", number of items must be less than or equal to 10.') end invalid_properties @@ -171,15 +171,15 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if !@domains.nil? && @domains.length > 2 + return false if !@domains.nil? && @domains.length > 10 true end # Custom attribute writer method with validation # @param [Object] domains Value to be assigned def domains=(domains) - if domains.length > 2 - fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 2.' + if domains.length > 10 + fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 10.' end @domains = domains diff --git a/lib/dropbox-sign/models/o_auth_token_refresh_request.rb b/lib/dropbox-sign/models/o_auth_token_refresh_request.rb index 6715762..9fafd8e 100644 --- a/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +++ b/lib/dropbox-sign/models/o_auth_token_refresh_request.rb @@ -26,11 +26,11 @@ class OAuthTokenRefreshRequest # @return [String] attr_accessor :refresh_token - # The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. # @return [String] attr_accessor :client_id - # The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. # @return [String] attr_accessor :client_secret diff --git a/lib/dropbox-sign/models/template_response_document_form_field_text.rb b/lib/dropbox-sign/models/template_response_document_form_field_text.rb index 7028169..11d6178 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_text.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_text.rb @@ -42,6 +42,14 @@ class TemplateResponseDocumentFormFieldText < TemplateResponseDocumentFormFieldB # @return [String, nil] attr_accessor :validation_type + # When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. + # @return [String, nil] + attr_accessor :validation_custom_regex + + # When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. + # @return [String, nil] + attr_accessor :validation_custom_regex_format_label + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. # @return [String, nil] attr_accessor :group @@ -77,6 +85,8 @@ def self.attribute_map :'original_font_size' => :'originalFontSize', :'font_family' => :'fontFamily', :'validation_type' => :'validation_type', + :'validation_custom_regex' => :'validation_custom_regex', + :'validation_custom_regex_format_label' => :'validation_custom_regex_format_label', :'group' => :'group' } end @@ -100,6 +110,8 @@ def self.openapi_types :'original_font_size' => :'Integer', :'font_family' => :'String', :'validation_type' => :'String', + :'validation_custom_regex' => :'String', + :'validation_custom_regex_format_label' => :'String', :'group' => :'String' } end @@ -108,6 +120,8 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'validation_type', + :'validation_custom_regex', + :'validation_custom_regex_format_label', :'group' ]) end @@ -182,6 +196,14 @@ def initialize(attributes = {}) self.validation_type = attributes[:'validation_type'] end + if attributes.key?(:'validation_custom_regex') + self.validation_custom_regex = attributes[:'validation_custom_regex'] + end + + if attributes.key?(:'validation_custom_regex_format_label') + self.validation_custom_regex_format_label = attributes[:'validation_custom_regex_format_label'] + end + if attributes.key?(:'group') self.group = attributes[:'group'] end @@ -238,6 +260,8 @@ def ==(o) original_font_size == o.original_font_size && font_family == o.font_family && validation_type == o.validation_type && + validation_custom_regex == o.validation_custom_regex && + validation_custom_regex_format_label == o.validation_custom_regex_format_label && group == o.group && super(o) end @@ -250,7 +274,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type, group].hash + [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type, validation_custom_regex, validation_custom_regex_format_label, group].hash end # Builds the object from hash diff --git a/lib/dropbox-sign/version.rb b/lib/dropbox-sign/version.rb index bb40a10..e1b2fd3 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.9.0' + VERSION = '1.10.0' end diff --git a/openapi-config.yaml b/openapi-config.yaml index 84f8f50..1176020 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.9.0 + gemVersion: 1.10.0 sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c832450..c123c2e 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -7797,7 +7797,7 @@ components: type: array items: type: string - maxItems: 2 + maxItems: 10 minItems: 1 name: description: 'The name you want to assign to the ApiApp.' @@ -7823,7 +7823,7 @@ components: type: array items: type: string - maxItems: 2 + maxItems: 10 name: description: 'The name you want to assign to the ApiApp.' type: string @@ -8112,10 +8112,10 @@ components: description: 'The token provided when you got the expired access token.' type: string client_id: - description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + description: 'The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.' type: string client_secret: - description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + description: 'The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.' type: string type: object ReportCreateRequest: @@ -8135,6 +8135,7 @@ components: enum: - user_activity - document_status + - sms_activity maxItems: 2 minItems: 1 start_date: @@ -11964,6 +11965,7 @@ components: enum: - user_activity - document_status + - sms_activity type: object x-internal-class: true SignatureRequestResponse: @@ -13130,6 +13132,14 @@ components: - employer_identification_number - custom_regex nullable: true + validation_custom_regex: + description: 'When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field.' + type: string + nullable: true + validation_custom_regex_format_label: + description: 'When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.' + type: string + nullable: true group: description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' type: string diff --git a/spec/api/fax_api_spec.rb b/spec/api/fax_api_spec.rb new file mode 100644 index 0000000..95e673a --- /dev/null +++ b/spec/api/fax_api_spec.rb @@ -0,0 +1,69 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json_spec' +require_relative '../test_utils' + +root_file_path = __dir__ + "/../../test_fixtures" + +describe Dropbox::Sign::FaxApi do + context 'FaxApiTest' do + api = Dropbox::Sign::FaxApi.new + + it 'testFaxSend' do + request_class = 'FaxSendRequest' + request_data = get_fixture_data(request_class)[:default] + + response_class = 'FaxGetResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxGetResponse.init(response_data) + obj = Dropbox::Sign::FaxSendRequest.init(request_data) + obj.files = [File.new("#{root_file_path}/pdf-sample.pdf", "r")] + + result = api.fax_send(obj) + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + + it 'testFaxGet' do + signature_request_id = 'c2e9691c85d9d6fa6ae773842e3680b2b8650f1d' + + response_class = 'FaxGetResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxGetResponse.init(response_data) + + result = api.fax_get(signature_request_id) + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + + it 'testFaxList' do + response_class = 'FaxListResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxListResponse.init(response_data) + + result = api.fax_list() + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + end +end diff --git a/spec/api/fax_line_api_spec.rb b/spec/api/fax_line_api_spec.rb new file mode 100644 index 0000000..a6a6edf --- /dev/null +++ b/spec/api/fax_line_api_spec.rb @@ -0,0 +1,67 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json_spec' +require_relative '../test_utils' + +root_file_path = __dir__ + "/../../test_fixtures" + +describe Dropbox::Sign::FaxApi do + context 'FaxLineApiTest' do + api = Dropbox::Sign::FaxLineApi.new + + it 'testFaxLineCreate' do + request_class = 'FaxLineCreateRequest' + request_data = get_fixture_data(request_class)[:default] + + response_class = 'FaxLineResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxLineResponse.init(response_data) + + result = api.fax_line_create(request_data) + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + + it 'testFaxLineGet' do + fax_line_number = '14155557897' + + response_class = 'FaxLineResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxLineResponse.init(response_data) + + result = api.fax_line_get(fax_line_number) + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + + it 'testFaxLineList' do + response_class = 'FaxLineListResponse' + response_data = get_fixture_data(response_class)[:default] + + set_expected_response(200, JSON.dump(response_data)) + expected = Dropbox::Sign::FaxLineListResponse.init(response_data) + + result = api.fax_line_list() + + expect(result.class.to_s).to eq("Dropbox::Sign::#{response_class}") + expect(result.to_json).to be_json_eql(JSON.dump(expected)) + end + end +end diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json index 2eda936..0d668e0 100644 --- a/test_fixtures/FaxGetResponse.json +++ b/test_fixtures/FaxGetResponse.json @@ -20,12 +20,11 @@ "transmissions": [ { "recipient": "recipient@dropboxsign.com", - "sender": "me@dropboxsign.com", "sent_at": 1723231831, "status_code": "success" } ], - "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" } } } diff --git a/test_fixtures/FaxLineCreateRequest.json b/test_fixtures/FaxLineCreateRequest.json new file mode 100644 index 0000000..91d11c8 --- /dev/null +++ b/test_fixtures/FaxLineCreateRequest.json @@ -0,0 +1,6 @@ +{ + "default": { + "country": "US", + "area_code": 949 + } +} diff --git a/test_fixtures/FaxLineListResponse.json b/test_fixtures/FaxLineListResponse.json new file mode 100644 index 0000000..c241c1b --- /dev/null +++ b/test_fixtures/FaxLineListResponse.json @@ -0,0 +1,26 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "fax_lines": [ + { + "number": "14155557897", + "created_at": 1750196223, + "updated_at": 1750196223, + "accounts": [ + { + "account_id": "a3367a4130f3624687ea7de6f09df951a44923dd", + "email_address": "me@dropboxsign.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": true + } + ] + } + ] + } +} diff --git a/test_fixtures/FaxLineResponse.json b/test_fixtures/FaxLineResponse.json new file mode 100644 index 0000000..3855a8a --- /dev/null +++ b/test_fixtures/FaxLineResponse.json @@ -0,0 +1,18 @@ +{ + "default": { + "fax_line": { + "number": "14155557897", + "created_at": 1750196223, + "updated_at": 1750196223, + "accounts": [ + { + "account_id": "a3367a4130f3624687ea7de6f09df951a44923dd", + "email_address": "me@dropboxsign.com", + "is_locked": false, + "is_paid_hs": false, + "is_paid_hf": true + } + ] + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json index a9ebf63..d0ce7fe 100644 --- a/test_fixtures/FaxListResponse.json +++ b/test_fixtures/FaxListResponse.json @@ -27,12 +27,11 @@ "transmissions": [ { "recipient": "recipient@dropboxsign.com", - "sender": "me@dropboxsign.com", "sent_at": 1723231831, "status_code": "success" } ], - "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" } ] } diff --git a/test_fixtures/FaxResponse.json b/test_fixtures/FaxResponse.json new file mode 100644 index 0000000..32a44d5 --- /dev/null +++ b/test_fixtures/FaxResponse.json @@ -0,0 +1,24 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "metadata": {}, + "created_at": 1750105080, + "sender": "14155557068", + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "final_copy_uri": "/v3/transmission/final_copy/c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "transmissions": [ + { + "recipient": "18005550199", + "status_code": "transmitting" + } + ], + "transmission_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "from": "14155557068", + "test_mode": false + } + } +} + diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json deleted file mode 100644 index b651c78..0000000 --- a/test_fixtures/FaxSendResponse.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default": { - "fax": { - "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", - "title": "example title", - "original_title": "example original title", - "subject": "example subject", - "message": "example message", - "metadata": [ ], - "created_at": 1726774555, - "sender": "me@dropboxsign.com", - "transmissions": [], - "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" - } - } -}