From 637016d869c2a8fdd30ec692175b338833da4522 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 22 Aug 2024 15:18:35 -0500 Subject: [PATCH] Release 1.5.0 --- .gitlab-ci.yml | 26 ++ .openapi-generator/FILES | 5 +- .openapi-generator/VERSION | 2 +- .travis.yml | 7 +- Gemfile.lock | 50 ++-- README.md | 10 +- VERSION | 2 +- docs/AccountResponse.md | 1 + docs/AccountResponseQuotas.md | 1 + docs/AccountResponseUsage.md | 10 + dropbox-sign.gemspec | 3 +- lib/dropbox-sign.rb | 3 +- lib/dropbox-sign/api/account_api.rb | 2 +- lib/dropbox-sign/api/api_app_api.rb | 6 +- lib/dropbox-sign/api/bulk_send_job_api.rb | 10 +- lib/dropbox-sign/api/embedded_api.rb | 2 +- lib/dropbox-sign/api/o_auth_api.rb | 2 +- lib/dropbox-sign/api/report_api.rb | 2 +- lib/dropbox-sign/api/signature_request_api.rb | 10 +- lib/dropbox-sign/api/team_api.rb | 10 +- lib/dropbox-sign/api/template_api.rb | 8 +- lib/dropbox-sign/api/unclaimed_draft_api.rb | 2 +- lib/dropbox-sign/api_client.rb | 51 ++-- lib/dropbox-sign/api_error.rb | 3 +- lib/dropbox-sign/configuration.rb | 48 +++- lib/dropbox-sign/event_callback_helper.rb | 2 +- .../models/account_create_request.rb | 6 +- .../models/account_create_response.rb | 6 +- .../models/account_get_response.rb | 6 +- lib/dropbox-sign/models/account_response.rb | 26 +- .../models/account_response_quotas.rb | 28 +- .../models/account_response_usage.rb | 251 ++++++++++++++++++ .../models/account_update_request.rb | 6 +- .../models/account_verify_request.rb | 6 +- .../models/account_verify_response.rb | 6 +- .../models/account_verify_response_account.rb | 6 +- .../models/api_app_create_request.rb | 6 +- .../models/api_app_get_response.rb | 6 +- .../models/api_app_list_response.rb | 6 +- lib/dropbox-sign/models/api_app_response.rb | 6 +- .../models/api_app_response_o_auth.rb | 6 +- .../models/api_app_response_options.rb | 6 +- .../models/api_app_response_owner_account.rb | 6 +- ...api_app_response_white_labeling_options.rb | 6 +- .../models/api_app_update_request.rb | 8 +- .../models/bulk_send_job_get_response.rb | 6 +- ...end_job_get_response_signature_requests.rb | 6 +- .../models/bulk_send_job_list_response.rb | 6 +- .../models/bulk_send_job_response.rb | 6 +- .../models/bulk_send_job_send_response.rb | 6 +- .../models/embedded_edit_url_request.rb | 6 +- .../models/embedded_edit_url_response.rb | 6 +- .../embedded_edit_url_response_embedded.rb | 6 +- .../models/embedded_sign_url_response.rb | 6 +- .../embedded_sign_url_response_embedded.rb | 6 +- lib/dropbox-sign/models/error_response.rb | 6 +- .../models/error_response_error.rb | 6 +- .../models/event_callback_request.rb | 6 +- .../models/event_callback_request_event.rb | 6 +- .../event_callback_request_event_metadata.rb | 6 +- lib/dropbox-sign/models/file_response.rb | 6 +- .../models/file_response_data_uri.rb | 6 +- lib/dropbox-sign/models/list_info_response.rb | 6 +- .../models/o_auth_token_generate_request.rb | 6 +- .../models/o_auth_token_refresh_request.rb | 6 +- .../models/o_auth_token_response.rb | 6 +- .../models/report_create_request.rb | 6 +- .../models/report_create_response.rb | 6 +- lib/dropbox-sign/models/report_response.rb | 6 +- ...k_create_embedded_with_template_request.rb | 12 +- ...request_bulk_send_with_template_request.rb | 12 +- ...gnature_request_create_embedded_request.rb | 12 +- ...t_create_embedded_with_template_request.rb | 12 +- .../models/signature_request_get_response.rb | 6 +- .../models/signature_request_list_response.rb | 6 +- .../signature_request_remind_request.rb | 6 +- .../models/signature_request_response.rb | 6 +- .../signature_request_response_attachment.rb | 6 +- ...ture_request_response_custom_field_base.rb | 6 +- ..._request_response_custom_field_checkbox.rb | 6 +- ...ture_request_response_custom_field_text.rb | 6 +- ...request_response_custom_field_type_enum.rb | 12 +- .../signature_request_response_data_base.rb | 6 +- ...gnature_request_response_data_type_enum.rb | 12 +- ...re_request_response_data_value_checkbox.rb | 6 +- ...uest_response_data_value_checkbox_merge.rb | 6 +- ...request_response_data_value_date_signed.rb | 6 +- ...re_request_response_data_value_dropdown.rb | 6 +- ...re_request_response_data_value_initials.rb | 6 +- ...ature_request_response_data_value_radio.rb | 6 +- ...e_request_response_data_value_signature.rb | 6 +- ...nature_request_response_data_value_text.rb | 6 +- ..._request_response_data_value_text_merge.rb | 6 +- .../signature_request_response_signatures.rb | 6 +- .../models/signature_request_send_request.rb | 12 +- ...ture_request_send_with_template_request.rb | 13 +- .../signature_request_update_request.rb | 6 +- lib/dropbox-sign/models/sub_attachment.rb | 6 +- .../models/sub_bulk_signer_list.rb | 6 +- .../sub_bulk_signer_list_custom_field.rb | 6 +- lib/dropbox-sign/models/sub_cc.rb | 6 +- lib/dropbox-sign/models/sub_custom_field.rb | 6 +- lib/dropbox-sign/models/sub_editor_options.rb | 6 +- lib/dropbox-sign/models/sub_field_options.rb | 6 +- .../models/sub_form_field_group.rb | 6 +- .../models/sub_form_field_rule.rb | 6 +- .../models/sub_form_field_rule_action.rb | 6 +- .../models/sub_form_field_rule_trigger.rb | 6 +- .../sub_form_fields_per_document_base.rb | 6 +- .../sub_form_fields_per_document_checkbox.rb | 6 +- ...form_fields_per_document_checkbox_merge.rb | 6 +- ...ub_form_fields_per_document_date_signed.rb | 6 +- .../sub_form_fields_per_document_dropdown.rb | 6 +- .../sub_form_fields_per_document_font_enum.rb | 12 +- .../sub_form_fields_per_document_hyperlink.rb | 6 +- .../sub_form_fields_per_document_initials.rb | 6 +- .../sub_form_fields_per_document_radio.rb | 6 +- .../sub_form_fields_per_document_signature.rb | 6 +- .../sub_form_fields_per_document_text.rb | 6 +- ...sub_form_fields_per_document_text_merge.rb | 6 +- .../sub_form_fields_per_document_type_enum.rb | 12 +- lib/dropbox-sign/models/sub_merge_field.rb | 6 +- lib/dropbox-sign/models/sub_o_auth.rb | 6 +- lib/dropbox-sign/models/sub_options.rb | 6 +- .../sub_signature_request_grouped_signers.rb | 6 +- .../models/sub_signature_request_signer.rb | 10 +- .../sub_signature_request_template_signer.rb | 10 +- .../models/sub_signing_options.rb | 6 +- lib/dropbox-sign/models/sub_team_response.rb | 6 +- lib/dropbox-sign/models/sub_template_role.rb | 6 +- .../models/sub_unclaimed_draft_signer.rb | 6 +- .../sub_unclaimed_draft_template_signer.rb | 6 +- .../models/sub_white_labeling_options.rb | 6 +- .../models/team_add_member_request.rb | 6 +- .../models/team_create_request.rb | 6 +- .../models/team_get_info_response.rb | 6 +- lib/dropbox-sign/models/team_get_response.rb | 6 +- lib/dropbox-sign/models/team_info_response.rb | 6 +- .../models/team_invite_response.rb | 6 +- .../models/team_invites_response.rb | 6 +- .../models/team_member_response.rb | 6 +- .../models/team_members_response.rb | 6 +- .../models/team_parent_response.rb | 6 +- .../models/team_remove_member_request.rb | 6 +- lib/dropbox-sign/models/team_response.rb | 6 +- .../models/team_sub_teams_response.rb | 6 +- .../models/team_update_request.rb | 6 +- .../models/template_add_user_request.rb | 6 +- .../template_create_embedded_draft_request.rb | 10 +- ...template_create_embedded_draft_response.rb | 6 +- ...create_embedded_draft_response_template.rb | 6 +- .../models/template_create_request.rb | 10 +- .../models/template_create_response.rb | 6 +- .../template_create_response_template.rb | 6 +- .../models/template_edit_response.rb | 6 +- .../models/template_get_response.rb | 6 +- .../models/template_list_response.rb | 6 +- .../models/template_remove_user_request.rb | 6 +- lib/dropbox-sign/models/template_response.rb | 6 +- .../models/template_response_account.rb | 6 +- .../models/template_response_account_quota.rb | 6 +- .../models/template_response_cc_role.rb | 6 +- .../models/template_response_document.rb | 6 +- ...ate_response_document_custom_field_base.rb | 6 +- ...response_document_custom_field_checkbox.rb | 6 +- ...ate_response_document_custom_field_text.rb | 6 +- .../template_response_document_field_group.rb | 6 +- ...late_response_document_field_group_rule.rb | 6 +- ...plate_response_document_form_field_base.rb | 6 +- ...e_response_document_form_field_checkbox.rb | 6 +- ...esponse_document_form_field_date_signed.rb | 6 +- ...e_response_document_form_field_dropdown.rb | 6 +- ..._response_document_form_field_hyperlink.rb | 6 +- ...e_response_document_form_field_initials.rb | 6 +- ...late_response_document_form_field_radio.rb | 6 +- ..._response_document_form_field_signature.rb | 6 +- ...plate_response_document_form_field_text.rb | 6 +- ...ate_response_document_static_field_base.rb | 6 +- ...response_document_static_field_checkbox.rb | 6 +- ...ponse_document_static_field_date_signed.rb | 6 +- ...response_document_static_field_dropdown.rb | 6 +- ...esponse_document_static_field_hyperlink.rb | 6 +- ...response_document_static_field_initials.rb | 6 +- ...te_response_document_static_field_radio.rb | 6 +- ...esponse_document_static_field_signature.rb | 6 +- ...ate_response_document_static_field_text.rb | 6 +- ...template_response_field_avg_text_length.rb | 6 +- .../models/template_response_signer_role.rb | 6 +- .../models/template_update_files_request.rb | 10 +- .../models/template_update_files_response.rb | 6 +- ...template_update_files_response_template.rb | 6 +- ...unclaimed_draft_create_embedded_request.rb | 11 +- ...t_create_embedded_with_template_request.rb | 12 +- .../models/unclaimed_draft_create_request.rb | 11 +- .../models/unclaimed_draft_create_response.rb | 6 +- ...unclaimed_draft_edit_and_resend_request.rb | 6 +- .../models/unclaimed_draft_response.rb | 6 +- lib/dropbox-sign/models/warning_response.rb | 6 +- lib/dropbox-sign/version.rb | 4 +- openapi-config.yaml | 2 +- openapi-sdk.yaml | 153 ++++++----- run-build | 2 +- spec/api_client_spec.rb | 4 +- spec/configuration_spec.rb | 2 +- spec/spec_helper.rb | 2 +- templates/README.mustache | 1 + templates/api.mustache | 70 ++++- templates/api_client.mustache | 51 ++-- templates/api_client_faraday_partial.mustache | 146 +++++++--- templates/api_client_httpx_partial.mustache | 134 ++++++++++ .../api_client_typhoeus_partial.mustache | 38 +-- templates/api_doc.mustache | 2 +- templates/api_error.mustache | 1 + templates/api_info.mustache | 2 +- templates/api_test.mustache | 2 +- templates/base_object.mustache | 4 +- templates/configuration.mustache | 172 +++++++++--- .../configuration_faraday_partial.mustache | 40 +++ .../configuration_httpx_partial.mustache | 11 + .../configuration_typhoeus_partial.mustache | 41 +++ templates/gem.mustache | 14 + templates/gemspec.mustache | 14 +- templates/model_test.mustache | 5 +- templates/partial_model_enum_class.mustache | 11 +- templates/partial_model_generic.mustache | 14 +- templates/partial_oneof_module.mustache | 8 +- templates/partial_oneof_module_doc.mustache | 1 + templates/travis.mustache | 5 +- 228 files changed, 1575 insertions(+), 1077 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 docs/AccountResponseUsage.md create mode 100644 lib/dropbox-sign/models/account_response_usage.rb create mode 100644 templates/api_client_httpx_partial.mustache create mode 100644 templates/configuration_faraday_partial.mustache create mode 100644 templates/configuration_httpx_partial.mustache create mode 100644 templates/configuration_typhoeus_partial.mustache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..3a253c4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +.ruby: &ruby + variables: + LANG: "C.UTF-8" + before_script: + - ruby -v + - bundle config set --local deployment true + - bundle install -j $(nproc) + parallel: + matrix: + - RUBY_VERSION: ['2.7', '3.0', '3.1'] + image: "ruby:$RUBY_VERSION" + cache: + paths: + - vendor/ruby + key: 'ruby-$RUBY_VERSION' + +gem: + extends: .ruby + script: + - bundle exec rspec + - bundle exec rake build + - bundle exec rake install + artifacts: + paths: + - pkg/*.gem + diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7439cee..f02adf4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.gitlab-ci.yml .rspec .rubocop.yml .travis.yml @@ -12,6 +13,7 @@ docs/AccountCreateResponse.md docs/AccountGetResponse.md docs/AccountResponse.md docs/AccountResponseQuotas.md +docs/AccountResponseUsage.md docs/AccountUpdateRequest.md docs/AccountVerifyRequest.md docs/AccountVerifyResponse.md @@ -208,6 +210,7 @@ lib/dropbox-sign/models/account_create_response.rb lib/dropbox-sign/models/account_get_response.rb lib/dropbox-sign/models/account_response.rb lib/dropbox-sign/models/account_response_quotas.rb +lib/dropbox-sign/models/account_response_usage.rb lib/dropbox-sign/models/account_update_request.rb lib/dropbox-sign/models/account_verify_request.rb lib/dropbox-sign/models/account_verify_response.rb @@ -375,6 +378,4 @@ lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb lib/dropbox-sign/models/unclaimed_draft_response.rb lib/dropbox-sign/models/warning_response.rb lib/dropbox-sign/version.rb -spec/api_client_spec.rb -spec/configuration_spec.rb spec/spec_helper.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index e230c83..1985849 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0 \ No newline at end of file +7.7.0 diff --git a/.travis.yml b/.travis.yml index e44cbea..30cc276 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,11 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.4.1.gem + - gem install ./dropbox-sign-1.5.0.gem diff --git a/Gemfile.lock b/Gemfile.lock index bcc8b88..17efd7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.4.1) + dropbox-sign (1.5.0) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -10,45 +10,47 @@ GEM ast (2.4.2) byebug (11.1.3) coderay (1.1.3) - diff-lcs (1.5.0) + diff-lcs (1.5.1) ethon (0.16.0) ffi (>= 1.15.0) ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-arm64-darwin) ffi (1.17.0-x86_64-darwin) ffi (1.17.0-x86_64-linux-gnu) - jaro_winkler (1.5.4) + jaro_winkler (1.5.6) json_spec (1.1.5) multi_json (~> 1.0) rspec (>= 2.0, < 4.0) - method_source (1.0.0) + method_source (1.1.0) multi_json (1.15.0) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.26.3) + parser (3.3.4.2) ast (~> 2.4.1) - pry (0.13.1) + racc + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) - psych (4.0.3) + pry (>= 0.13, < 0.15) + psych (5.1.2) stringio + racc (1.8.1) rainbow (3.1.1) rake (13.0.6) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) rubocop (0.66.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -57,8 +59,8 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.6) - ruby-progressbar (1.11.0) - stringio (3.0.1) + ruby-progressbar (1.13.0) + stringio (3.1.1) typhoeus (1.4.1) ethon (>= 0.9.0) unicode-display_width (1.5.0) @@ -79,4 +81,4 @@ DEPENDENCIES rubocop (~> 0.66.0) BUNDLED WITH - 2.3.5 + 2.3.26 diff --git a/README.md b/README.md index fc0275b..f5b543f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ 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.4.1 +- Package version: 1.5.0 +- Generator version: 7.7.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -46,14 +47,14 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.4.1.gem +gem install ./dropbox-sign-1.5.0.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.4.1.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.5.0.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.4.1' + gem 'dropbox-sign', '~> 1.5.0' ### Install from Git @@ -172,6 +173,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::AccountGetResponse](docs/AccountGetResponse.md) - [Dropbox::Sign::AccountResponse](docs/AccountResponse.md) - [Dropbox::Sign::AccountResponseQuotas](docs/AccountResponseQuotas.md) + - [Dropbox::Sign::AccountResponseUsage](docs/AccountResponseUsage.md) - [Dropbox::Sign::AccountUpdateRequest](docs/AccountUpdateRequest.md) - [Dropbox::Sign::AccountVerifyRequest](docs/AccountVerifyRequest.md) - [Dropbox::Sign::AccountVerifyResponse](docs/AccountVerifyResponse.md) diff --git a/VERSION b/VERSION index 347f583..bc80560 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.1 +1.5.0 diff --git a/docs/AccountResponse.md b/docs/AccountResponse.md index 07d959b..294f294 100644 --- a/docs/AccountResponse.md +++ b/docs/AccountResponse.md @@ -16,4 +16,5 @@ | `role_code` | ```String``` | The membership role for the team. | | | `team_id` | ```String``` | The id of the team account belongs to. | | | `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | diff --git a/docs/AccountResponseQuotas.md b/docs/AccountResponseQuotas.md index 163aabe..2a6b0c9 100644 --- a/docs/AccountResponseQuotas.md +++ b/docs/AccountResponseQuotas.md @@ -11,4 +11,5 @@ Details concerning remaining monthly quotas. | `templates_total` | ```Integer``` | Total API templates allowed. | | | `templates_left` | ```Integer``` | API templates remaining. | | | `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | +| `num_fax_pages_left` | ```Integer``` | Number of fax pages left | | diff --git a/docs/AccountResponseUsage.md b/docs/AccountResponseUsage.md new file mode 100644 index 0000000..6dc2ddc --- /dev/null +++ b/docs/AccountResponseUsage.md @@ -0,0 +1,10 @@ +# Dropbox::Sign::AccountResponseUsage + +Details concerning monthly usage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_pages_sent` | ```Integer``` | Number of fax pages sent | | + diff --git a/dropbox-sign.gemspec b/dropbox-sign.gemspec index 031f2cb..b0b43f3 100755 --- a/dropbox-sign.gemspec +++ b/dropbox-sign.gemspec @@ -8,7 +8,7 @@ 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 +Generator version: 7.7.0 =end @@ -26,6 +26,7 @@ Gem::Specification.new do |s| s.description = "Official Dropbox Sign APIv3 OpenAPI Ruby SDK" s.license = "MIT" s.required_ruby_version = ">= 2.7" + s.metadata = {} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/lib/dropbox-sign.rb b/lib/dropbox-sign.rb index 1e3f072..9e790e3 100644 --- a/lib/dropbox-sign.rb +++ b/lib/dropbox-sign.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -22,6 +22,7 @@ require 'dropbox-sign/models/account_get_response' require 'dropbox-sign/models/account_response' require 'dropbox-sign/models/account_response_quotas' +require 'dropbox-sign/models/account_response_usage' require 'dropbox-sign/models/account_update_request' require 'dropbox-sign/models/account_verify_request' require 'dropbox-sign/models/account_verify_response' diff --git a/lib/dropbox-sign/api/account_api.rb b/lib/dropbox-sign/api/account_api.rb index 5d18d4d..1a8236d 100644 --- a/lib/dropbox-sign/api/account_api.rb +++ b/lib/dropbox-sign/api/account_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/api/api_app_api.rb b/lib/dropbox-sign/api/api_app_api.rb index 2f57b33..809c7e8 100644 --- a/lib/dropbox-sign/api/api_app_api.rb +++ b/lib/dropbox-sign/api/api_app_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -306,8 +306,8 @@ def api_app_list(opts = {}) # List API Apps # 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. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the API App List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the API App List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(ApiAppListResponse, Integer, Hash)>] ApiAppListResponse data, response status code and response headers def api_app_list_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/dropbox-sign/api/bulk_send_job_api.rb b/lib/dropbox-sign/api/bulk_send_job_api.rb index 3184892..199add7 100644 --- a/lib/dropbox-sign/api/bulk_send_job_api.rb +++ b/lib/dropbox-sign/api/bulk_send_job_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -38,8 +38,8 @@ def bulk_send_job_get(bulk_send_job_id, opts = {}) # Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. # @param bulk_send_job_id [String] The id of the BulkSendJob to retrieve. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + # @option opts [Integer] :page Which page number of the BulkSendJob list to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (default to 20) # @return [Array<(BulkSendJobGetResponse, Integer, Hash)>] BulkSendJobGetResponse data, response status code and response headers def bulk_send_job_get_with_http_info(bulk_send_job_id, opts = {}) if @api_client.config.debugging @@ -136,8 +136,8 @@ def bulk_send_job_list(opts = {}) # List Bulk Send Jobs # Returns a list of BulkSendJob that you can access. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + # @option opts [Integer] :page Which page number of the BulkSendJob List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (default to 20) # @return [Array<(BulkSendJobListResponse, Integer, Hash)>] BulkSendJobListResponse data, response status code and response headers def bulk_send_job_list_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/dropbox-sign/api/embedded_api.rb b/lib/dropbox-sign/api/embedded_api.rb index 2eeb3fc..0d153ae 100644 --- a/lib/dropbox-sign/api/embedded_api.rb +++ b/lib/dropbox-sign/api/embedded_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/api/o_auth_api.rb b/lib/dropbox-sign/api/o_auth_api.rb index 34f3fbb..03926e1 100644 --- a/lib/dropbox-sign/api/o_auth_api.rb +++ b/lib/dropbox-sign/api/o_auth_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/api/report_api.rb b/lib/dropbox-sign/api/report_api.rb index 1c73655..b545d5c 100644 --- a/lib/dropbox-sign/api/report_api.rb +++ b/lib/dropbox-sign/api/report_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/api/signature_request_api.rb b/lib/dropbox-sign/api/signature_request_api.rb index bcfb514..48026cd 100644 --- a/lib/dropbox-sign/api/signature_request_api.rb +++ b/lib/dropbox-sign/api/signature_request_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -540,7 +540,7 @@ def signature_request_files(signature_request_id, opts = {}) # Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. # @param [Hash] opts the optional parameters - # @option opts [String] :file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + # @option opts [String] :file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (default to 'pdf') # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers def signature_request_files_with_http_info(signature_request_id, opts = {}) if @api_client.config.debugging @@ -735,7 +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. + # @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 [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 @@ -928,8 +928,8 @@ def signature_request_list(opts = {}) # Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. - # @option opts [Integer] :page Which page number of the SignatureRequest List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the SignatureRequest List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @option opts [String] :query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. # @return [Array<(SignatureRequestListResponse, Integer, Hash)>] SignatureRequestListResponse data, response status code and response headers def signature_request_list_with_http_info(opts = {}) diff --git a/lib/dropbox-sign/api/team_api.rb b/lib/dropbox-sign/api/team_api.rb index a2ababa..a5de164 100644 --- a/lib/dropbox-sign/api/team_api.rb +++ b/lib/dropbox-sign/api/team_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -590,8 +590,8 @@ def team_members(team_id, opts = {}) # Provides a paginated list of members (and their roles) that belong to a given team. # @param team_id [String] The id of the team that a member list is being requested from. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the team member list to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the team member list to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(TeamMembersResponse, Integer, Hash)>] TeamMembersResponse data, response status code and response headers def team_members_with_http_info(team_id, opts = {}) if @api_client.config.debugging @@ -807,8 +807,8 @@ def team_sub_teams(team_id, opts = {}) # Provides a paginated list of sub teams that belong to a given team. # @param team_id [String] The id of the parent Team. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Which page number of the SubTeam List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the SubTeam List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(TeamSubTeamsResponse, Integer, Hash)>] TeamSubTeamsResponse data, response status code and response headers def team_sub_teams_with_http_info(team_id, opts = {}) if @api_client.config.debugging diff --git a/lib/dropbox-sign/api/template_api.rb b/lib/dropbox-sign/api/template_api.rb index e3f5852..c764bfd 100644 --- a/lib/dropbox-sign/api/template_api.rb +++ b/lib/dropbox-sign/api/template_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -632,7 +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. + # @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 [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 @@ -825,8 +825,8 @@ def template_list(opts = {}) # Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. - # @option opts [Integer] :page Which page number of the Template List to return. Defaults to `1`. - # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + # @option opts [Integer] :page Which page number of the Template List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @option opts [String] :query String that includes search terms and/or fields to be used to filter the Template objects. # @return [Array<(TemplateListResponse, Integer, Hash)>] TemplateListResponse data, response status code and response headers def template_list_with_http_info(opts = {}) diff --git a/lib/dropbox-sign/api/unclaimed_draft_api.rb b/lib/dropbox-sign/api/unclaimed_draft_api.rb index 56065a6..b45e740 100644 --- a/lib/dropbox-sign/api/unclaimed_draft_api.rb +++ b/lib/dropbox-sign/api/unclaimed_draft_api.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/api_client.rb b/lib/dropbox-sign/api_client.rb index bfbf3f1..598c817 100644 --- a/lib/dropbox-sign/api_client.rb +++ b/lib/dropbox-sign/api_client.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -48,9 +48,10 @@ def self.default # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -72,7 +73,9 @@ def call_api(http_method, path, opts = {}) end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -96,6 +99,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -112,7 +116,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided @@ -126,9 +131,7 @@ def build_request(http_method, path, opts = {}) end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -166,6 +169,8 @@ def build_request_body(header_params, form_params, body) # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -180,21 +185,24 @@ def download_file(request) prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) tempfile.write(chunk) end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end + # run the request to ensure the tempfile is created successfully before returning it + request.run + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + else + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") end + + tempfile end # Check if the given MIME is a JSON MIME. @@ -206,7 +214,7 @@ def download_file(request) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -215,15 +223,10 @@ def json_mime?(mime) # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -290,7 +293,7 @@ def convert_to_type(data, return_type) # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/lib/dropbox-sign/api_error.rb b/lib/dropbox-sign/api_error.rb index 50659ba..b914641 100644 --- a/lib/dropbox-sign/api_error.rb +++ b/lib/dropbox-sign/api_error.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -35,6 +35,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/lib/dropbox-sign/configuration.rb b/lib/dropbox-sign/configuration.rb index 497e1c3..3fb654f 100644 --- a/lib/dropbox-sign/configuration.rb +++ b/lib/dropbox-sign/configuration.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -65,6 +65,16 @@ class Configuration # Defines the access token (Bearer) used with OAuth2. attr_accessor :access_token + # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2. + # Overrides the access_token if set + # @return [Proc] + attr_accessor :access_token_getter + + # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) + # HTTP responses with return type `File` will be returned as a stream of binary data. + # Default to false. + attr_accessor :return_binary_data + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -72,6 +82,14 @@ class Configuration # @return [true, false] attr_accessor :debugging + # Set this to ignore operation servers for the API client. This is useful when you need to + # send requests to a different server than the one specified in the OpenAPI document. + # Will default to the base url defined in the spec but can be overridden by setting + # `scheme`, `host`, `base_path` directly. + # Default to false. + # @return [true, false] + attr_accessor :ignore_operation_servers + # Defines the logger used for debugging. # Default to `Rails.logger` (when in Rails) or logging to STDOUT. # @@ -136,6 +154,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -144,7 +163,7 @@ def initialize @scheme = 'https' @host = 'api.hellosign.com' @base_path = '/v3' - @server_index = 0 + @server_index = nil @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -153,11 +172,12 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false + @ignore_operation_servers = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @@ -192,10 +212,13 @@ def base_path=(base_path) # Returns base URL for specified operation based on server settings def base_url(operation = nil) - index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil - - server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers + if operation_server_settings.key?(operation) then + index = server_operation_index.fetch(operation, server_index) + server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + else + server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) + end end # Gets API key (with prefix if set). @@ -210,6 +233,12 @@ def api_key_with_prefix(param_name, param_alias = nil) end end + # Gets access_token using access_token_getter or uses the static access_token + def access_token_with_refresh + return access_token if access_token_getter.nil? + access_token_getter.call + end + # Gets Basic Auth token string def basic_auth_token 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") @@ -273,8 +302,8 @@ def server_url(index, variables = {}, servers = nil) servers = server_settings if servers == nil # check array index out of bound - if (index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + if (index.nil? || index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" end server = servers[index] @@ -299,5 +328,6 @@ def server_url(index, variables = {}, servers = nil) url end + end end diff --git a/lib/dropbox-sign/event_callback_helper.rb b/lib/dropbox-sign/event_callback_helper.rb index eabea4c..57a3b36 100644 --- a/lib/dropbox-sign/event_callback_helper.rb +++ b/lib/dropbox-sign/event_callback_helper.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/lib/dropbox-sign/models/account_create_request.rb b/lib/dropbox-sign/models/account_create_request.rb index 58108bc..ec9e2fa 100644 --- a/lib/dropbox-sign/models/account_create_request.rb +++ b/lib/dropbox-sign/models/account_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -214,8 +214,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -233,7 +231,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_create_response.rb b/lib/dropbox-sign/models/account_create_response.rb index 278df40..4a25632 100644 --- a/lib/dropbox-sign/models/account_create_response.rb +++ b/lib/dropbox-sign/models/account_create_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_get_response.rb b/lib/dropbox-sign/models/account_get_response.rb index c8ad104..9dab132 100644 --- a/lib/dropbox-sign/models/account_get_response.rb +++ b/lib/dropbox-sign/models/account_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_response.rb b/lib/dropbox-sign/models/account_response.rb index 3bde6db..dfef0e1 100644 --- a/lib/dropbox-sign/models/account_response.rb +++ b/lib/dropbox-sign/models/account_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -57,6 +57,9 @@ class AccountResponse # @return [String, nil] attr_accessor :locale + # @return [AccountResponseUsage] + attr_accessor :usage + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -69,7 +72,8 @@ def self.attribute_map :'callback_url' => :'callback_url', :'role_code' => :'role_code', :'team_id' => :'team_id', - :'locale' => :'locale' + :'locale' => :'locale', + :'usage' => :'usage' } end @@ -95,7 +99,8 @@ def self.openapi_types :'callback_url' => :'String', :'role_code' => :'String', :'team_id' => :'String', - :'locale' => :'String' + :'locale' => :'String', + :'usage' => :'AccountResponseUsage' } end @@ -110,7 +115,7 @@ def self.openapi_nullable :'callback_url', :'role_code', :'team_id', - :'locale' + :'locale', ]) end @@ -183,6 +188,10 @@ def initialize(attributes = {}) if attributes.key?(:'locale') self.locale = attributes[:'locale'] end + + if attributes.key?(:'usage') + self.usage = attributes[:'usage'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -212,7 +221,8 @@ def ==(o) callback_url == o.callback_url && role_code == o.role_code && team_id == o.team_id && - locale == o.locale + locale == o.locale && + usage == o.usage end # @see the `==` method @@ -224,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale].hash + [account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale, usage].hash end # Builds the object from hash @@ -278,8 +288,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +305,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_response_quotas.rb b/lib/dropbox-sign/models/account_response_quotas.rb index 8ed7445..e2b9731 100644 --- a/lib/dropbox-sign/models/account_response_quotas.rb +++ b/lib/dropbox-sign/models/account_response_quotas.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -39,6 +39,10 @@ class AccountResponseQuotas # @return [Integer, nil] attr_accessor :sms_verifications_left + # Number of fax pages left + # @return [Integer, nil] + attr_accessor :num_fax_pages_left + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -46,7 +50,8 @@ def self.attribute_map :'documents_left' => :'documents_left', :'templates_total' => :'templates_total', :'templates_left' => :'templates_left', - :'sms_verifications_left' => :'sms_verifications_left' + :'sms_verifications_left' => :'sms_verifications_left', + :'num_fax_pages_left' => :'num_fax_pages_left' } end @@ -67,7 +72,8 @@ def self.openapi_types :'documents_left' => :'Integer', :'templates_total' => :'Integer', :'templates_left' => :'Integer', - :'sms_verifications_left' => :'Integer' + :'sms_verifications_left' => :'Integer', + :'num_fax_pages_left' => :'Integer' } end @@ -83,7 +89,8 @@ def self.openapi_nullable :'documents_left', :'templates_total', :'templates_left', - :'sms_verifications_left' + :'sms_verifications_left', + :'num_fax_pages_left' ]) end @@ -136,6 +143,10 @@ def initialize(attributes = {}) if attributes.key?(:'sms_verifications_left') self.sms_verifications_left = attributes[:'sms_verifications_left'] end + + if attributes.key?(:'num_fax_pages_left') + self.num_fax_pages_left = attributes[:'num_fax_pages_left'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -160,7 +171,8 @@ def ==(o) documents_left == o.documents_left && templates_total == o.templates_total && templates_left == o.templates_left && - sms_verifications_left == o.sms_verifications_left + sms_verifications_left == o.sms_verifications_left && + num_fax_pages_left == o.num_fax_pages_left end # @see the `==` method @@ -172,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left].hash + [api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left, num_fax_pages_left].hash end # Builds the object from hash @@ -226,8 +238,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -245,7 +255,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_response_usage.rb b/lib/dropbox-sign/models/account_response_usage.rb new file mode 100644 index 0000000..ee53f33 --- /dev/null +++ b/lib/dropbox-sign/models/account_response_usage.rb @@ -0,0 +1,251 @@ +=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 +Generator version: 7.7.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # Details concerning monthly usage + class AccountResponseUsage + # Number of fax pages sent + # @return [Integer, nil] + attr_accessor :fax_pages_sent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax_pages_sent' => :'fax_pages_sent' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax_pages_sent' => :'Integer' + } + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'fax_pages_sent' + ]) + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [AccountResponseUsage] + def self.init(data) + return ApiClient.default.convert_to_type( + data, + "AccountResponseUsage" + ) || AccountResponseUsage.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::AccountResponseUsage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fax_pages_sent') + self.fax_pages_sent = attributes[:'fax_pages_sent'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fax_pages_sent == o.fax_pages_sent + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fax_pages_sent].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + + end + +end diff --git a/lib/dropbox-sign/models/account_update_request.rb b/lib/dropbox-sign/models/account_update_request.rb index 0a29741..e493e7d 100644 --- a/lib/dropbox-sign/models/account_update_request.rb +++ b/lib/dropbox-sign/models/account_update_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_verify_request.rb b/lib/dropbox-sign/models/account_verify_request.rb index 4ed50d8..ecc203b 100644 --- a/lib/dropbox-sign/models/account_verify_request.rb +++ b/lib/dropbox-sign/models/account_verify_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -181,8 +181,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -200,7 +198,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_verify_response.rb b/lib/dropbox-sign/models/account_verify_response.rb index 6a6b9ab..fec9993 100644 --- a/lib/dropbox-sign/models/account_verify_response.rb +++ b/lib/dropbox-sign/models/account_verify_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/account_verify_response_account.rb b/lib/dropbox-sign/models/account_verify_response_account.rb index 81acb94..6316b91 100644 --- a/lib/dropbox-sign/models/account_verify_response_account.rb +++ b/lib/dropbox-sign/models/account_verify_response_account.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_create_request.rb b/lib/dropbox-sign/models/api_app_create_request.rb index e107850..12bcc4c 100644 --- a/lib/dropbox-sign/models/api_app_create_request.rb +++ b/lib/dropbox-sign/models/api_app_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -279,8 +279,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -298,7 +296,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_get_response.rb b/lib/dropbox-sign/models/api_app_get_response.rb index 5d32bc2..f0c4397 100644 --- a/lib/dropbox-sign/models/api_app_get_response.rb +++ b/lib/dropbox-sign/models/api_app_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_list_response.rb b/lib/dropbox-sign/models/api_app_list_response.rb index 6c5087e..eb56400 100644 --- a/lib/dropbox-sign/models/api_app_list_response.rb +++ b/lib/dropbox-sign/models/api_app_list_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_response.rb b/lib/dropbox-sign/models/api_app_response.rb index 00866bc..b0f4616 100644 --- a/lib/dropbox-sign/models/api_app_response.rb +++ b/lib/dropbox-sign/models/api_app_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -278,8 +278,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +295,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_response_o_auth.rb b/lib/dropbox-sign/models/api_app_response_o_auth.rb index 7a2b067..a05cef9 100644 --- a/lib/dropbox-sign/models/api_app_response_o_auth.rb +++ b/lib/dropbox-sign/models/api_app_response_o_auth.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_response_options.rb b/lib/dropbox-sign/models/api_app_response_options.rb index 72fb1b6..8cb41c5 100644 --- a/lib/dropbox-sign/models/api_app_response_options.rb +++ b/lib/dropbox-sign/models/api_app_response_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -177,8 +177,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -196,7 +194,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_response_owner_account.rb b/lib/dropbox-sign/models/api_app_response_owner_account.rb index d1db9ca..e7a2c7f 100644 --- a/lib/dropbox-sign/models/api_app_response_owner_account.rb +++ b/lib/dropbox-sign/models/api_app_response_owner_account.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb b/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb index d7915ce..8c421aa 100644 --- a/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb +++ b/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -306,8 +306,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -325,7 +323,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/api_app_update_request.rb b/lib/dropbox-sign/models/api_app_update_request.rb index 6378e72..db9518e 100644 --- a/lib/dropbox-sign/models/api_app_update_request.rb +++ b/lib/dropbox-sign/models/api_app_update_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -172,7 +172,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] domains Value to be assigned def domains=(domains) - if !domains.nil? && domains.length > 2 + if domains.length > 2 fail ArgumentError, 'invalid value for "domains", number of items must be less than or equal to 2.' end @@ -256,8 +256,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -275,7 +273,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/bulk_send_job_get_response.rb b/lib/dropbox-sign/models/bulk_send_job_get_response.rb index b6ebf5d..a4a5e6d 100644 --- a/lib/dropbox-sign/models/bulk_send_job_get_response.rb +++ b/lib/dropbox-sign/models/bulk_send_job_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb b/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb index 2262aac..0deeffd 100644 --- a/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +++ b/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -464,8 +464,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -483,7 +481,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/bulk_send_job_list_response.rb b/lib/dropbox-sign/models/bulk_send_job_list_response.rb index 79522d2..9e63c14 100644 --- a/lib/dropbox-sign/models/bulk_send_job_list_response.rb +++ b/lib/dropbox-sign/models/bulk_send_job_list_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/bulk_send_job_response.rb b/lib/dropbox-sign/models/bulk_send_job_response.rb index 56e4255..1b9532f 100644 --- a/lib/dropbox-sign/models/bulk_send_job_response.rb +++ b/lib/dropbox-sign/models/bulk_send_job_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/bulk_send_job_send_response.rb b/lib/dropbox-sign/models/bulk_send_job_send_response.rb index 2808793..22e2e86 100644 --- a/lib/dropbox-sign/models/bulk_send_job_send_response.rb +++ b/lib/dropbox-sign/models/bulk_send_job_send_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/embedded_edit_url_request.rb b/lib/dropbox-sign/models/embedded_edit_url_request.rb index e7d7db9..1826c0f 100644 --- a/lib/dropbox-sign/models/embedded_edit_url_request.rb +++ b/lib/dropbox-sign/models/embedded_edit_url_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -292,8 +292,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -311,7 +309,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/embedded_edit_url_response.rb b/lib/dropbox-sign/models/embedded_edit_url_response.rb index e41a6e4..1d15ffd 100644 --- a/lib/dropbox-sign/models/embedded_edit_url_response.rb +++ b/lib/dropbox-sign/models/embedded_edit_url_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb b/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb index aeaf127..303b60d 100644 --- a/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb +++ b/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/embedded_sign_url_response.rb b/lib/dropbox-sign/models/embedded_sign_url_response.rb index de165b2..1b17f4e 100644 --- a/lib/dropbox-sign/models/embedded_sign_url_response.rb +++ b/lib/dropbox-sign/models/embedded_sign_url_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb b/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb index 7cbb29c..b21bef9 100644 --- a/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb +++ b/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/error_response.rb b/lib/dropbox-sign/models/error_response.rb index 0b148a8..44ca975 100644 --- a/lib/dropbox-sign/models/error_response.rb +++ b/lib/dropbox-sign/models/error_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -180,8 +180,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -199,7 +197,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/error_response_error.rb b/lib/dropbox-sign/models/error_response_error.rb index 036a020..f9e5c41 100644 --- a/lib/dropbox-sign/models/error_response_error.rb +++ b/lib/dropbox-sign/models/error_response_error.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -209,8 +209,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -228,7 +226,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/event_callback_request.rb b/lib/dropbox-sign/models/event_callback_request.rb index 77d399f..211e322 100644 --- a/lib/dropbox-sign/models/event_callback_request.rb +++ b/lib/dropbox-sign/models/event_callback_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -210,8 +210,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -229,7 +227,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/event_callback_request_event.rb b/lib/dropbox-sign/models/event_callback_request_event.rb index a325688..c1c22c3 100644 --- a/lib/dropbox-sign/models/event_callback_request_event.rb +++ b/lib/dropbox-sign/models/event_callback_request_event.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -258,8 +258,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -277,7 +275,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/event_callback_request_event_metadata.rb b/lib/dropbox-sign/models/event_callback_request_event_metadata.rb index b7b27de..99f0558 100644 --- a/lib/dropbox-sign/models/event_callback_request_event_metadata.rb +++ b/lib/dropbox-sign/models/event_callback_request_event_metadata.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -214,8 +214,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -233,7 +231,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/file_response.rb b/lib/dropbox-sign/models/file_response.rb index 86c6fff..8836237 100644 --- a/lib/dropbox-sign/models/file_response.rb +++ b/lib/dropbox-sign/models/file_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/file_response_data_uri.rb b/lib/dropbox-sign/models/file_response_data_uri.rb index 08f3137..7c11af5 100644 --- a/lib/dropbox-sign/models/file_response_data_uri.rb +++ b/lib/dropbox-sign/models/file_response_data_uri.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/list_info_response.rb b/lib/dropbox-sign/models/list_info_response.rb index 282bbcb..78525c9 100644 --- a/lib/dropbox-sign/models/list_info_response.rb +++ b/lib/dropbox-sign/models/list_info_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/o_auth_token_generate_request.rb b/lib/dropbox-sign/models/o_auth_token_generate_request.rb index e726cd4..65705ac 100644 --- a/lib/dropbox-sign/models/o_auth_token_generate_request.rb +++ b/lib/dropbox-sign/models/o_auth_token_generate_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -247,8 +247,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -266,7 +264,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end 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 421fc12..30b3c9c 100644 --- a/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +++ b/lib/dropbox-sign/models/o_auth_token_refresh_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/o_auth_token_response.rb b/lib/dropbox-sign/models/o_auth_token_response.rb index fb80905..874c417 100644 --- a/lib/dropbox-sign/models/o_auth_token_response.rb +++ b/lib/dropbox-sign/models/o_auth_token_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -217,8 +217,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -236,7 +234,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/report_create_request.rb b/lib/dropbox-sign/models/report_create_request.rb index 84efa4a..906f133 100644 --- a/lib/dropbox-sign/models/report_create_request.rb +++ b/lib/dropbox-sign/models/report_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -247,8 +247,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -266,7 +264,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/report_create_response.rb b/lib/dropbox-sign/models/report_create_response.rb index 0f3957a..e2c8403 100644 --- a/lib/dropbox-sign/models/report_create_response.rb +++ b/lib/dropbox-sign/models/report_create_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/report_response.rb b/lib/dropbox-sign/models/report_response.rb index 5034151..dfc2902 100644 --- a/lib/dropbox-sign/models/report_response.rb +++ b/lib/dropbox-sign/models/report_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -234,8 +234,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -253,7 +251,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb b/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb index 9ef971b..f7bc3b7 100644 --- a/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +++ b/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -267,7 +267,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -283,7 +283,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -293,7 +293,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -383,8 +383,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -402,7 +400,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb b/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb index ba6a243..da98e87 100644 --- a/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +++ b/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -262,7 +262,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -278,7 +278,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -288,7 +288,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -378,8 +378,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -397,7 +395,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_create_embedded_request.rb b/lib/dropbox-sign/models/signature_request_create_embedded_request.rb index b7f0023..842a341 100644 --- a/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +++ b/lib/dropbox-sign/models/signature_request_create_embedded_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -391,7 +391,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -407,7 +407,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -417,7 +417,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -518,8 +518,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -537,7 +535,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb b/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb index 5912d04..2ca96b6 100644 --- a/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +++ b/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -297,7 +297,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -313,7 +313,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -323,7 +323,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -415,8 +415,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -434,7 +432,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_get_response.rb b/lib/dropbox-sign/models/signature_request_get_response.rb index 0f0042d..6b09317 100644 --- a/lib/dropbox-sign/models/signature_request_get_response.rb +++ b/lib/dropbox-sign/models/signature_request_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_list_response.rb b/lib/dropbox-sign/models/signature_request_list_response.rb index 7625b55..11aefe5 100644 --- a/lib/dropbox-sign/models/signature_request_list_response.rb +++ b/lib/dropbox-sign/models/signature_request_list_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_remind_request.rb b/lib/dropbox-sign/models/signature_request_remind_request.rb index 77a41fc..87fa9f1 100644 --- a/lib/dropbox-sign/models/signature_request_remind_request.rb +++ b/lib/dropbox-sign/models/signature_request_remind_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -192,8 +192,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -211,7 +209,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response.rb b/lib/dropbox-sign/models/signature_request_response.rb index 19a7f63..c6c8ff1 100644 --- a/lib/dropbox-sign/models/signature_request_response.rb +++ b/lib/dropbox-sign/models/signature_request_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -466,8 +466,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -485,7 +483,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_attachment.rb b/lib/dropbox-sign/models/signature_request_response_attachment.rb index d522a1d..f442742 100644 --- a/lib/dropbox-sign/models/signature_request_response_attachment.rb +++ b/lib/dropbox-sign/models/signature_request_response_attachment.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -254,8 +254,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -273,7 +271,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb b/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb index 11cd478..8645b25 100644 --- a/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb +++ b/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb b/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb index 4d0303b..cb119c8 100644 --- a/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb +++ b/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb b/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb index debaa67..d614646 100644 --- a/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb +++ b/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -199,8 +199,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -218,7 +216,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb b/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb index 8a40529..38d4cd6 100644 --- a/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb +++ b/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -21,6 +21,10 @@ class SignatureRequestResponseCustomFieldTypeEnum TEXT = "text".freeze CHECKBOX = "checkbox".freeze + def self.all_vars + @all_vars ||= [TEXT, CHECKBOX].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -32,9 +36,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SignatureRequestResponseCustomFieldTypeEnum.constants.select { |c| SignatureRequestResponseCustomFieldTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SignatureRequestResponseCustomFieldTypeEnum" if constantValues.empty? - value + return value if SignatureRequestResponseCustomFieldTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SignatureRequestResponseCustomFieldTypeEnum" end end + end diff --git a/lib/dropbox-sign/models/signature_request_response_data_base.rb b/lib/dropbox-sign/models/signature_request_response_data_base.rb index 96c6ed0..2f6a515 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_base.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -256,8 +256,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -275,7 +273,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb b/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb index c004cb2..a8dcbb7 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -28,6 +28,10 @@ class SignatureRequestResponseDataTypeEnum TEXT_MERGE = "text-merge".freeze CHECKBOX_MERGE = "checkbox-merge".freeze + def self.all_vars + @all_vars ||= [TEXT, CHECKBOX, DATE_SIGNED, DROPDOWN, INITIALS, RADIO, SIGNATURE, TEXT_MERGE, CHECKBOX_MERGE].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -39,9 +43,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SignatureRequestResponseDataTypeEnum.constants.select { |c| SignatureRequestResponseDataTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SignatureRequestResponseDataTypeEnum" if constantValues.empty? - value + return value if SignatureRequestResponseDataTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SignatureRequestResponseDataTypeEnum" end end + end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb b/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb index 6d94ce9..ec714d4 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb b/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb index a168a72..60f6e81 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb b/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb index 5332883..2fb316d 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb b/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb index f260e65..162f875 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb b/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb index 8bf8120..070722e 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb b/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb index dbd7b19..1d68460 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb b/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb index 5124672..18ef029 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_text.rb b/lib/dropbox-sign/models/signature_request_response_data_value_text.rb index ec99cce..ebe3774 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_text.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_text.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb b/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb index 00bd498..3b8f95c 100644 --- a/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb +++ b/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -193,8 +193,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -212,7 +210,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_response_signatures.rb b/lib/dropbox-sign/models/signature_request_response_signatures.rb index 33670a8..c543fcb 100644 --- a/lib/dropbox-sign/models/signature_request_response_signatures.rb +++ b/lib/dropbox-sign/models/signature_request_response_signatures.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -390,8 +390,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -409,7 +407,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_send_request.rb b/lib/dropbox-sign/models/signature_request_send_request.rb index ca93a2d..999fdd3 100644 --- a/lib/dropbox-sign/models/signature_request_send_request.rb +++ b/lib/dropbox-sign/models/signature_request_send_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -408,7 +408,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -424,7 +424,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -434,7 +434,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -537,8 +537,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -556,7 +554,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_send_with_template_request.rb b/lib/dropbox-sign/models/signature_request_send_with_template_request.rb index e7d1295..c6afc65 100644 --- a/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +++ b/lib/dropbox-sign/models/signature_request_send_with_template_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class SignatureRequestSendWithTemplateRequest # Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. # @return [Array] @@ -314,7 +315,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -330,7 +331,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -340,7 +341,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -434,8 +435,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -453,7 +452,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/signature_request_update_request.rb b/lib/dropbox-sign/models/signature_request_update_request.rb index 3caf013..72ce651 100644 --- a/lib/dropbox-sign/models/signature_request_update_request.rb +++ b/lib/dropbox-sign/models/signature_request_update_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_attachment.rb b/lib/dropbox-sign/models/sub_attachment.rb index 46c3e80..a34d703 100644 --- a/lib/dropbox-sign/models/sub_attachment.rb +++ b/lib/dropbox-sign/models/sub_attachment.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -221,8 +221,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -240,7 +238,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_bulk_signer_list.rb b/lib/dropbox-sign/models/sub_bulk_signer_list.rb index 1300e3b..5457753 100644 --- a/lib/dropbox-sign/models/sub_bulk_signer_list.rb +++ b/lib/dropbox-sign/models/sub_bulk_signer_list.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -191,8 +191,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -210,7 +208,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb b/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb index c7f0a69..18162fe 100644 --- a/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb +++ b/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -197,8 +197,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -216,7 +214,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_cc.rb b/lib/dropbox-sign/models/sub_cc.rb index 5f1de6d..36b50fb 100644 --- a/lib/dropbox-sign/models/sub_cc.rb +++ b/lib/dropbox-sign/models/sub_cc.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -197,8 +197,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -216,7 +214,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_custom_field.rb b/lib/dropbox-sign/models/sub_custom_field.rb index 72c531c..d5b7a8e 100644 --- a/lib/dropbox-sign/models/sub_custom_field.rb +++ b/lib/dropbox-sign/models/sub_custom_field.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -217,8 +217,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -236,7 +234,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_editor_options.rb b/lib/dropbox-sign/models/sub_editor_options.rb index febed1f..807df8f 100644 --- a/lib/dropbox-sign/models/sub_editor_options.rb +++ b/lib/dropbox-sign/models/sub_editor_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -192,8 +192,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -211,7 +209,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_field_options.rb b/lib/dropbox-sign/models/sub_field_options.rb index c048644..39b24eb 100644 --- a/lib/dropbox-sign/models/sub_field_options.rb +++ b/lib/dropbox-sign/models/sub_field_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -216,8 +216,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -235,7 +233,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_field_group.rb b/lib/dropbox-sign/models/sub_form_field_group.rb index 3c9f78a..f5228ab 100644 --- a/lib/dropbox-sign/models/sub_form_field_group.rb +++ b/lib/dropbox-sign/models/sub_form_field_group.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -213,8 +213,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -232,7 +230,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_field_rule.rb b/lib/dropbox-sign/models/sub_form_field_rule.rb index 3e5da04..6962f14 100644 --- a/lib/dropbox-sign/models/sub_form_field_rule.rb +++ b/lib/dropbox-sign/models/sub_form_field_rule.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -282,8 +282,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -301,7 +299,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_field_rule_action.rb b/lib/dropbox-sign/models/sub_form_field_rule_action.rb index 8aa485a..c72934c 100644 --- a/lib/dropbox-sign/models/sub_form_field_rule_action.rb +++ b/lib/dropbox-sign/models/sub_form_field_rule_action.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -252,8 +252,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -271,7 +269,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb b/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb index f2e8c3c..d5e041d 100644 --- a/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb +++ b/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -255,8 +255,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -274,7 +272,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb index 34b9c88..9c57bca 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -371,8 +371,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -390,7 +388,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb index 04f8cfb..2587fd3 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb index 1d60d0f..bcfc7bc 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb index f6ef586..4d1d03a 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb index 84967b0..9f3351f 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -294,8 +294,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -313,7 +311,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb index 4fdcb10..a821678 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -35,6 +35,10 @@ class SubFormFieldsPerDocumentFontEnum NOTO_HEBREW_REGULAR = "notoHebrew-Regular".freeze NOTO_SAN_THAI_MERGED = "notoSanThaiMerged".freeze + def self.all_vars + @all_vars ||= [HELVETICA, ARIAL, COURIER, CALIBRI, CAMBRIA, GEORGIA, TIMES, TREBUCHET, VERDANA, ROBOTO, ROBOTO_MONO, NOTO_SANS, NOTO_SERIF, NOTO_CJK_JP_REGULAR, NOTO_HEBREW_REGULAR, NOTO_SAN_THAI_MERGED].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -46,9 +50,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SubFormFieldsPerDocumentFontEnum.constants.select { |c| SubFormFieldsPerDocumentFontEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentFontEnum" if constantValues.empty? - value + return value if SubFormFieldsPerDocumentFontEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentFontEnum" end end + end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb index d55365d..86db89d 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -278,8 +278,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -297,7 +295,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb index 8b6c097..c06271f 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb index a3971ae..17b1a2d 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -220,8 +220,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -239,7 +237,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb index 052fe79..b8d5ee8 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb index b34233a..d6e149e 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -344,8 +344,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -363,7 +361,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb index 6818e2e..3aface5 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -246,8 +246,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -265,7 +263,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb b/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb index a288062..3c7c378 100644 --- a/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb +++ b/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -29,6 +29,10 @@ class SubFormFieldsPerDocumentTypeEnum TEXT = "text".freeze TEXT_MERGE = "text-merge".freeze + def self.all_vars + @all_vars ||= [CHECKBOX, CHECKBOX_MERGE, DATE_SIGNED, DROPDOWN, HYPERLINK, INITIALS, SIGNATURE, RADIO, TEXT, TEXT_MERGE].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -40,9 +44,9 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SubFormFieldsPerDocumentTypeEnum.constants.select { |c| SubFormFieldsPerDocumentTypeEnum::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentTypeEnum" if constantValues.empty? - value + return value if SubFormFieldsPerDocumentTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SubFormFieldsPerDocumentTypeEnum" end end + end diff --git a/lib/dropbox-sign/models/sub_merge_field.rb b/lib/dropbox-sign/models/sub_merge_field.rb index 0beee35..768856c 100644 --- a/lib/dropbox-sign/models/sub_merge_field.rb +++ b/lib/dropbox-sign/models/sub_merge_field.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_o_auth.rb b/lib/dropbox-sign/models/sub_o_auth.rb index 5733f2f..97923c3 100644 --- a/lib/dropbox-sign/models/sub_o_auth.rb +++ b/lib/dropbox-sign/models/sub_o_auth.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_options.rb b/lib/dropbox-sign/models/sub_options.rb index 373e48d..6d1a3de 100644 --- a/lib/dropbox-sign/models/sub_options.rb +++ b/lib/dropbox-sign/models/sub_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -179,8 +179,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -198,7 +196,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb b/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb index 8be1643..06749cf 100644 --- a/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb +++ b/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -211,8 +211,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -230,7 +228,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_signature_request_signer.rb b/lib/dropbox-sign/models/sub_signature_request_signer.rb index d9d01e1..9f76fca 100644 --- a/lib/dropbox-sign/models/sub_signature_request_signer.rb +++ b/lib/dropbox-sign/models/sub_signature_request_signer.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -203,11 +203,11 @@ def valid? # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) - if !pin.nil? && pin.to_s.length > 12 + if pin.to_s.length > 12 fail ArgumentError, 'invalid value for "pin", the character length must be smaller than or equal to 12.' end - if !pin.nil? && pin.to_s.length < 4 + if pin.to_s.length < 4 fail ArgumentError, 'invalid value for "pin", the character length must be great than or equal to 4.' end @@ -300,8 +300,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -319,7 +317,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_signature_request_template_signer.rb b/lib/dropbox-sign/models/sub_signature_request_template_signer.rb index d00222e..3191b62 100644 --- a/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +++ b/lib/dropbox-sign/models/sub_signature_request_template_signer.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -207,11 +207,11 @@ def valid? # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) - if !pin.nil? && pin.to_s.length > 12 + if pin.to_s.length > 12 fail ArgumentError, 'invalid value for "pin", the character length must be smaller than or equal to 12.' end - if !pin.nil? && pin.to_s.length < 4 + if pin.to_s.length < 4 fail ArgumentError, 'invalid value for "pin", the character length must be great than or equal to 4.' end @@ -304,8 +304,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -323,7 +321,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_signing_options.rb b/lib/dropbox-sign/models/sub_signing_options.rb index 704d3b8..4156b03 100644 --- a/lib/dropbox-sign/models/sub_signing_options.rb +++ b/lib/dropbox-sign/models/sub_signing_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -268,8 +268,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -287,7 +285,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_team_response.rb b/lib/dropbox-sign/models/sub_team_response.rb index 89841df..c6fb00d 100644 --- a/lib/dropbox-sign/models/sub_team_response.rb +++ b/lib/dropbox-sign/models/sub_team_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_template_role.rb b/lib/dropbox-sign/models/sub_template_role.rb index d30d3ef..88a43b9 100644 --- a/lib/dropbox-sign/models/sub_template_role.rb +++ b/lib/dropbox-sign/models/sub_template_role.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb b/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb index b503d87..05f8cca 100644 --- a/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb +++ b/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -209,8 +209,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -228,7 +226,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb b/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb index 7a5b462..3bcbee3 100644 --- a/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb +++ b/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -213,8 +213,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -232,7 +230,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/sub_white_labeling_options.rb b/lib/dropbox-sign/models/sub_white_labeling_options.rb index c9a6cbe..4d34636 100644 --- a/lib/dropbox-sign/models/sub_white_labeling_options.rb +++ b/lib/dropbox-sign/models/sub_white_labeling_options.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -379,8 +379,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -398,7 +396,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_add_member_request.rb b/lib/dropbox-sign/models/team_add_member_request.rb index 15278bd..f09af18 100644 --- a/lib/dropbox-sign/models/team_add_member_request.rb +++ b/lib/dropbox-sign/models/team_add_member_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -232,8 +232,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -251,7 +249,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_create_request.rb b/lib/dropbox-sign/models/team_create_request.rb index 2593f4f..ef4d906 100644 --- a/lib/dropbox-sign/models/team_create_request.rb +++ b/lib/dropbox-sign/models/team_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -178,8 +178,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -197,7 +195,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_get_info_response.rb b/lib/dropbox-sign/models/team_get_info_response.rb index bec69c0..b8719b6 100644 --- a/lib/dropbox-sign/models/team_get_info_response.rb +++ b/lib/dropbox-sign/models/team_get_info_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_get_response.rb b/lib/dropbox-sign/models/team_get_response.rb index 5532dd0..409acda 100644 --- a/lib/dropbox-sign/models/team_get_response.rb +++ b/lib/dropbox-sign/models/team_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_info_response.rb b/lib/dropbox-sign/models/team_info_response.rb index f047339..31b39ab 100644 --- a/lib/dropbox-sign/models/team_info_response.rb +++ b/lib/dropbox-sign/models/team_info_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -220,8 +220,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -239,7 +237,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_invite_response.rb b/lib/dropbox-sign/models/team_invite_response.rb index 3aff029..41e022f 100644 --- a/lib/dropbox-sign/models/team_invite_response.rb +++ b/lib/dropbox-sign/models/team_invite_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_invites_response.rb b/lib/dropbox-sign/models/team_invites_response.rb index 0edbe0d..11c138f 100644 --- a/lib/dropbox-sign/models/team_invites_response.rb +++ b/lib/dropbox-sign/models/team_invites_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -190,8 +190,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -209,7 +207,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_member_response.rb b/lib/dropbox-sign/models/team_member_response.rb index e8b4a0b..19549cb 100644 --- a/lib/dropbox-sign/models/team_member_response.rb +++ b/lib/dropbox-sign/models/team_member_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_members_response.rb b/lib/dropbox-sign/models/team_members_response.rb index f22a22e..916000f 100644 --- a/lib/dropbox-sign/models/team_members_response.rb +++ b/lib/dropbox-sign/models/team_members_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_parent_response.rb b/lib/dropbox-sign/models/team_parent_response.rb index 64c8aa6..b16bc6e 100644 --- a/lib/dropbox-sign/models/team_parent_response.rb +++ b/lib/dropbox-sign/models/team_parent_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_remove_member_request.rb b/lib/dropbox-sign/models/team_remove_member_request.rb index 44b5cc5..cf53f5a 100644 --- a/lib/dropbox-sign/models/team_remove_member_request.rb +++ b/lib/dropbox-sign/models/team_remove_member_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -254,8 +254,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -273,7 +271,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_response.rb b/lib/dropbox-sign/models/team_response.rb index 5ffff82..69b48d2 100644 --- a/lib/dropbox-sign/models/team_response.rb +++ b/lib/dropbox-sign/models/team_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -215,8 +215,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -234,7 +232,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_sub_teams_response.rb b/lib/dropbox-sign/models/team_sub_teams_response.rb index 073f2e3..7bf6820 100644 --- a/lib/dropbox-sign/models/team_sub_teams_response.rb +++ b/lib/dropbox-sign/models/team_sub_teams_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/team_update_request.rb b/lib/dropbox-sign/models/team_update_request.rb index 5ded090..2e9095c 100644 --- a/lib/dropbox-sign/models/team_update_request.rb +++ b/lib/dropbox-sign/models/team_update_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_add_user_request.rb b/lib/dropbox-sign/models/template_add_user_request.rb index 75b0919..d158c71 100644 --- a/lib/dropbox-sign/models/template_add_user_request.rb +++ b/lib/dropbox-sign/models/template_add_user_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -200,8 +200,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -219,7 +217,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_embedded_draft_request.rb b/lib/dropbox-sign/models/template_create_embedded_draft_request.rb index 990bd25..267e6a8 100644 --- a/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +++ b/lib/dropbox-sign/models/template_create_embedded_draft_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -399,7 +399,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -415,7 +415,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -517,8 +517,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -536,7 +534,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_embedded_draft_response.rb b/lib/dropbox-sign/models/template_create_embedded_draft_response.rb index 6987f95..21fe695 100644 --- a/lib/dropbox-sign/models/template_create_embedded_draft_response.rb +++ b/lib/dropbox-sign/models/template_create_embedded_draft_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb b/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb index b19cbf7..32f6e4a 100644 --- a/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb +++ b/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -212,8 +212,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -231,7 +229,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_request.rb b/lib/dropbox-sign/models/template_create_request.rb index 90f10a1..ada67c6 100644 --- a/lib/dropbox-sign/models/template_create_request.rb +++ b/lib/dropbox-sign/models/template_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -323,7 +323,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -339,7 +339,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -434,8 +434,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -453,7 +451,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_response.rb b/lib/dropbox-sign/models/template_create_response.rb index 49354f1..fd66215 100644 --- a/lib/dropbox-sign/models/template_create_response.rb +++ b/lib/dropbox-sign/models/template_create_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_create_response_template.rb b/lib/dropbox-sign/models/template_create_response_template.rb index 21c4043..9cc402d 100644 --- a/lib/dropbox-sign/models/template_create_response_template.rb +++ b/lib/dropbox-sign/models/template_create_response_template.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -177,8 +177,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -196,7 +194,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_edit_response.rb b/lib/dropbox-sign/models/template_edit_response.rb index 52f33ba..3232a7a 100644 --- a/lib/dropbox-sign/models/template_edit_response.rb +++ b/lib/dropbox-sign/models/template_edit_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_get_response.rb b/lib/dropbox-sign/models/template_get_response.rb index 05e764a..05b1b12 100644 --- a/lib/dropbox-sign/models/template_get_response.rb +++ b/lib/dropbox-sign/models/template_get_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_list_response.rb b/lib/dropbox-sign/models/template_list_response.rb index 1eeff5f..ac89c14 100644 --- a/lib/dropbox-sign/models/template_list_response.rb +++ b/lib/dropbox-sign/models/template_list_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -201,8 +201,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -220,7 +218,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_remove_user_request.rb b/lib/dropbox-sign/models/template_remove_user_request.rb index 264e3c2..9b25413 100644 --- a/lib/dropbox-sign/models/template_remove_user_request.rb +++ b/lib/dropbox-sign/models/template_remove_user_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response.rb b/lib/dropbox-sign/models/template_response.rb index 2b09f52..8cccc09 100644 --- a/lib/dropbox-sign/models/template_response.rb +++ b/lib/dropbox-sign/models/template_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -350,8 +350,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -369,7 +367,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_account.rb b/lib/dropbox-sign/models/template_response_account.rb index b2dd0a5..a501927 100644 --- a/lib/dropbox-sign/models/template_response_account.rb +++ b/lib/dropbox-sign/models/template_response_account.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -230,8 +230,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -249,7 +247,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_account_quota.rb b/lib/dropbox-sign/models/template_response_account_quota.rb index 64783fa..3158b0e 100644 --- a/lib/dropbox-sign/models/template_response_account_quota.rb +++ b/lib/dropbox-sign/models/template_response_account_quota.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -210,8 +210,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -229,7 +227,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_cc_role.rb b/lib/dropbox-sign/models/template_response_cc_role.rb index 02ee166..a22b6b2 100644 --- a/lib/dropbox-sign/models/template_response_cc_role.rb +++ b/lib/dropbox-sign/models/template_response_cc_role.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -176,8 +176,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -195,7 +193,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document.rb b/lib/dropbox-sign/models/template_response_document.rb index ded906a..3aca3b0 100644 --- a/lib/dropbox-sign/models/template_response_document.rb +++ b/lib/dropbox-sign/models/template_response_document.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -240,8 +240,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -259,7 +257,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_custom_field_base.rb b/lib/dropbox-sign/models/template_response_document_custom_field_base.rb index cfd8180..5c7d099 100644 --- a/lib/dropbox-sign/models/template_response_document_custom_field_base.rb +++ b/lib/dropbox-sign/models/template_response_document_custom_field_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -297,8 +297,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -316,7 +314,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb b/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb index ba2bc04..4740d89 100644 --- a/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +++ b/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_custom_field_text.rb b/lib/dropbox-sign/models/template_response_document_custom_field_text.rb index c6e2390..f1c017e 100644 --- a/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +++ b/lib/dropbox-sign/models/template_response_document_custom_field_text.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_field_group.rb b/lib/dropbox-sign/models/template_response_document_field_group.rb index 81112e9..3762017 100644 --- a/lib/dropbox-sign/models/template_response_document_field_group.rb +++ b/lib/dropbox-sign/models/template_response_document_field_group.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -186,8 +186,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -205,7 +203,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_field_group_rule.rb b/lib/dropbox-sign/models/template_response_document_field_group_rule.rb index cf52175..06cb5cb 100644 --- a/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +++ b/lib/dropbox-sign/models/template_response_document_field_group_rule.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_base.rb b/lib/dropbox-sign/models/template_response_document_form_field_base.rb index 6039585..0b5b6cd 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_base.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -314,8 +314,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -333,7 +331,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb b/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb index e6d6132..15d5e63 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb b/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb index b1a6085..1e29dfb 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb b/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb index 30b1684..7106be3 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb b/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb index 7fd1e1b..1732efe 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -231,8 +231,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -250,7 +248,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_initials.rb b/lib/dropbox-sign/models/template_response_document_form_field_initials.rb index 9182028..798686d 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_initials.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_radio.rb b/lib/dropbox-sign/models/template_response_document_form_field_radio.rb index e3e866f..c5055af 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_radio.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_form_field_signature.rb b/lib/dropbox-sign/models/template_response_document_form_field_signature.rb index 600833d..9bdd4fd 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_signature.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end 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 2dc5e9b..b5c12a2 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 @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -277,8 +277,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -296,7 +294,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_base.rb b/lib/dropbox-sign/models/template_response_document_static_field_base.rb index dc6b26e..37f8085 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_base.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_base.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -316,8 +316,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -335,7 +333,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb b/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb index 3d37704..051f8a7 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb b/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb index 89f5c6f..88ffa8e 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb b/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb index 86f0ccb..a326332 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb b/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb index 3def794..0cbfed7 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_initials.rb b/lib/dropbox-sign/models/template_response_document_static_field_initials.rb index c9aef48..cc058cd 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_initials.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_radio.rb b/lib/dropbox-sign/models/template_response_document_static_field_radio.rb index eb79122..47e993b 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_radio.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_signature.rb b/lib/dropbox-sign/models/template_response_document_static_field_signature.rb index c00b20d..3cfcedf 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_signature.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_document_static_field_text.rb b/lib/dropbox-sign/models/template_response_document_static_field_text.rb index a29b971..44f9456 100644 --- a/lib/dropbox-sign/models/template_response_document_static_field_text.rb +++ b/lib/dropbox-sign/models/template_response_document_static_field_text.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_field_avg_text_length.rb b/lib/dropbox-sign/models/template_response_field_avg_text_length.rb index 0f60e26..14c10f9 100644 --- a/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +++ b/lib/dropbox-sign/models/template_response_field_avg_text_length.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_response_signer_role.rb b/lib/dropbox-sign/models/template_response_signer_role.rb index fcc2a57..36a2a74 100644 --- a/lib/dropbox-sign/models/template_response_signer_role.rb +++ b/lib/dropbox-sign/models/template_response_signer_role.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -187,8 +187,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -206,7 +204,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_update_files_request.rb b/lib/dropbox-sign/models/template_update_files_request.rb index 4955d64..41c951c 100644 --- a/lib/dropbox-sign/models/template_update_files_request.rb +++ b/lib/dropbox-sign/models/template_update_files_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -174,7 +174,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -184,7 +184,7 @@ def message=(message) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 100 + if subject.to_s.length > 100 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 100.' end @@ -267,8 +267,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -286,7 +284,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_update_files_response.rb b/lib/dropbox-sign/models/template_update_files_response.rb index c721dd6..fe17fbd 100644 --- a/lib/dropbox-sign/models/template_update_files_response.rb +++ b/lib/dropbox-sign/models/template_update_files_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -175,8 +175,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -194,7 +192,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/template_update_files_response_template.rb b/lib/dropbox-sign/models/template_update_files_response_template.rb index 555eac4..d2e5926 100644 --- a/lib/dropbox-sign/models/template_update_files_response_template.rb +++ b/lib/dropbox-sign/models/template_update_files_response_template.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -190,8 +190,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -209,7 +207,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb b/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb index 2b61c9d..aedbab5 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class UnclaimedDraftCreateEmbeddedRequest # Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. # @return [String] @@ -550,7 +551,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -566,7 +567,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -689,8 +690,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -708,7 +707,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 a204362..50e7e43 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 @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -465,7 +465,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -481,7 +481,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 255 + if subject.to_s.length > 255 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' end @@ -491,7 +491,7 @@ def subject=(subject) # Custom attribute writer method with validation # @param [Object] title Value to be assigned def title=(title) - if !title.nil? && title.to_s.length > 255 + if title.to_s.length > 255 fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' end @@ -598,8 +598,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -617,7 +615,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/unclaimed_draft_create_request.rb b/lib/dropbox-sign/models/unclaimed_draft_create_request.rb index 560e0e7..4b64c81 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_create_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -17,6 +17,7 @@ module Dropbox end module Dropbox::Sign + # class UnclaimedDraftCreateRequest # The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. # @return [String] @@ -418,7 +419,7 @@ def type=(type) # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) - if !message.nil? && message.to_s.length > 5000 + if message.to_s.length > 5000 fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' end @@ -434,7 +435,7 @@ def metadata=(metadata) # Custom attribute writer method with validation # @param [Object] subject Value to be assigned def subject=(subject) - if !subject.nil? && subject.to_s.length > 200 + if subject.to_s.length > 200 fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 200.' end @@ -535,8 +536,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -554,7 +553,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/unclaimed_draft_create_response.rb b/lib/dropbox-sign/models/unclaimed_draft_create_response.rb index c83bc11..ccb3d71 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_create_response.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_create_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -188,8 +188,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -207,7 +205,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb b/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb index dbb8775..7d56b5e 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -261,8 +261,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -280,7 +278,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/unclaimed_draft_response.rb b/lib/dropbox-sign/models/unclaimed_draft_response.rb index 55a695d..ddcc68f 100644 --- a/lib/dropbox-sign/models/unclaimed_draft_response.rb +++ b/lib/dropbox-sign/models/unclaimed_draft_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -236,8 +236,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -255,7 +253,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/models/warning_response.rb b/lib/dropbox-sign/models/warning_response.rb index 60d28e2..92156f4 100644 --- a/lib/dropbox-sign/models/warning_response.rb +++ b/lib/dropbox-sign/models/warning_response.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -198,8 +198,6 @@ def _deserialize(type, value) else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -217,7 +215,7 @@ def _deserialize(type, value) else # model # models (e.g. Pet) klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/dropbox-sign/version.rb b/lib/dropbox-sign/version.rb index 468eeef..6e39cce 100644 --- a/lib/dropbox-sign/version.rb +++ b/lib/dropbox-sign/version.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.4.1' + VERSION = '1.5.0' end diff --git a/openapi-config.yaml b/openapi-config.yaml index ae2e921..9c75ae9 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.4.1 + gemVersion: 1.5.0 sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 6a2f61a..9bf5a68 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -7918,7 +7918,7 @@ components: initials: '#/components/schemas/SubFormFieldsPerDocumentInitials' text-merge: '#/components/schemas/SubFormFieldsPerDocumentTextMerge' checkbox-merge: '#/components/schemas/SubFormFieldsPerDocumentCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SubSignatureRequestGroupedSigners: required: @@ -9129,7 +9129,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountGetResponse: properties: account: @@ -9140,7 +9140,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountVerifyResponse: properties: account: @@ -9151,7 +9151,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppGetResponse: properties: api_app: @@ -9162,7 +9162,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ApiAppListResponse: properties: api_apps: @@ -9178,7 +9178,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponse: properties: bulk_send_job: @@ -9196,7 +9196,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobListResponse: properties: bulk_send_jobs: @@ -9212,7 +9212,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true BulkSendJobSendResponse: properties: bulk_send_job: @@ -9223,7 +9223,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedEditUrlResponse: properties: embedded: @@ -9234,7 +9234,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponse: properties: embedded: @@ -9245,7 +9245,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true ErrorResponse: required: - error @@ -9262,14 +9262,14 @@ components: description: 'When the link expires.' type: integer type: object - x-internal: true + x-internal-class: true FileResponseDataUri: properties: data_uri: description: 'File as base64 encoded string.' type: string type: object - x-internal: true + x-internal-class: true ReportCreateResponse: properties: report: @@ -9280,7 +9280,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestGetResponse: properties: signature_request: @@ -9291,7 +9291,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true SignatureRequestListResponse: properties: signature_requests: @@ -9307,7 +9307,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true AccountResponse: properties: account_id: @@ -9343,8 +9343,10 @@ components: description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' type: string nullable: true + usage: + $ref: '#/components/schemas/AccountResponseUsage' type: object - x-internal: true + x-internal-class: true OAuthTokenResponse: properties: access_token: @@ -9360,7 +9362,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true AccountResponseQuotas: description: 'Details concerning remaining monthly quotas.' properties: @@ -9384,15 +9386,28 @@ components: description: 'SMS verifications remaining.' type: integer nullable: true + num_fax_pages_left: + description: 'Number of fax pages left' + type: integer + nullable: true + type: object + x-internal-class: true + AccountResponseUsage: + description: 'Details concerning monthly usage' + properties: + fax_pages_sent: + description: 'Number of fax pages sent' + type: integer + nullable: true type: object - x-internal: true + x-internal-class: true AccountVerifyResponseAccount: properties: email_address: description: 'The email address associated with the Account.' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponse: description: 'Contains information about an API App.' properties: @@ -9426,7 +9441,7 @@ components: white_labeling_options: $ref: '#/components/schemas/ApiAppResponseWhiteLabelingOptions' type: object - x-internal: true + x-internal-class: true ApiAppResponseOAuth: description: 'An object describing the app''s OAuth properties, or null if OAuth is not configured for the app.' properties: @@ -9446,7 +9461,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOptions: description: 'An object with options that override account settings.' properties: @@ -9455,7 +9470,7 @@ components: type: boolean type: object nullable: true - x-internal: true + x-internal-class: true ApiAppResponseOwnerAccount: description: 'An object describing the app''s owner' properties: @@ -9466,7 +9481,7 @@ components: description: 'The owner account''s email address' type: string type: object - x-internal: true + x-internal-class: true ApiAppResponseWhiteLabelingOptions: description: 'An object with options to customize the app''s signer page' properties: @@ -9500,7 +9515,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true BulkSendJobResponse: description: 'Contains information about the BulkSendJob such as when it was created and how many signature requests are queued.' properties: @@ -9518,7 +9533,7 @@ components: description: 'Time that the BulkSendJob was created.' type: integer type: object - x-internal: true + x-internal-class: true BulkSendJobGetResponseSignatureRequests: title: BulkSendJobGetResponseSignatureRequests type: object @@ -9530,7 +9545,7 @@ components: bulk_send_job_id: description: 'The id of the BulkSendJob.' type: string - x-internal: true + x-internal-class: true EmbeddedEditUrlResponseEmbedded: description: 'An embedded template object.' properties: @@ -9541,7 +9556,7 @@ components: description: 'The specific time that the the `edit_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true EmbeddedSignUrlResponseEmbedded: description: 'An object that contains necessary information to set up embedded signing.' properties: @@ -9552,7 +9567,7 @@ components: description: 'The specific time that the the `sign_url` link expires, in epoch.' type: integer type: object - x-internal: true + x-internal-class: true ErrorResponseError: description: 'Contains information about an error that occurred.' required: @@ -9586,7 +9601,7 @@ components: description: 'Objects returned per page.' type: integer type: object - x-internal: true + x-internal-class: true ReportResponse: description: 'Contains information about the report request.' properties: @@ -9607,7 +9622,7 @@ components: - user_activity - document_status type: object - x-internal: true + x-internal-class: true SignatureRequestResponse: description: 'Contains information about a signature request.' properties: @@ -9715,7 +9730,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseAttachment: description: 'Signer attachments.' required: @@ -9745,7 +9760,7 @@ components: type: integer nullable: true type: object - x-internal: true + x-internal-class: true SignatureRequestResponseCustomFieldBase: description: |- An array of Custom Field objects containing the name and type of each custom field. @@ -9777,7 +9792,7 @@ components: mapping: text: '#/components/schemas/SignatureRequestResponseCustomFieldText' checkbox: '#/components/schemas/SignatureRequestResponseCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseCustomFieldCheckbox: description: 'This class extends `SignatureRequestResponseCustomFieldBase`.' @@ -9850,7 +9865,7 @@ components: initials: '#/components/schemas/SignatureRequestResponseDataValueInitials' text-merge: '#/components/schemas/SignatureRequestResponseDataValueTextMerge' checkbox-merge: '#/components/schemas/SignatureRequestResponseDataValueCheckboxMerge' - x-internal: true + x-internal-class: true x-base-class: true SignatureRequestResponseDataTypeEnum: type: string @@ -10066,7 +10081,7 @@ components: type: string nullable: true type: object - x-internal: true + x-internal-class: true TeamResponse: description: 'Contains information about your team and its members' properties: @@ -10088,7 +10103,7 @@ components: items: type: string type: object - x-internal: true + x-internal-class: true TeamInfoResponse: properties: team_id: @@ -10106,7 +10121,7 @@ components: description: 'Number of sub teams within a team' type: integer type: object - x-internal: true + x-internal-class: true TeamInviteResponse: properties: email_address: @@ -10128,7 +10143,7 @@ components: description: 'Timestamp when the invitation is expiring.' type: integer type: object - x-internal: true + x-internal-class: true TeamMemberResponse: properties: account_id: @@ -10141,7 +10156,7 @@ components: description: 'The specific role a member has on the team.' type: string type: object - x-internal: true + x-internal-class: true TeamParentResponse: description: 'Information about the parent team if a team has one, set to `null` otherwise.' properties: @@ -10153,7 +10168,7 @@ components: type: string type: object nullable: true - x-internal: true + x-internal-class: true SubTeamResponse: properties: team_id: @@ -10163,7 +10178,7 @@ components: description: 'The name of a team' type: string type: object - x-internal: true + x-internal-class: true TemplateResponse: description: 'Contains information about the templates you and your team have created.' properties: @@ -10237,7 +10252,7 @@ components: $ref: '#/components/schemas/TemplateResponseAccount' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseAccount: properties: account_id: @@ -10258,7 +10273,7 @@ components: quotas: $ref: '#/components/schemas/TemplateResponseAccountQuota' type: object - x-internal: true + x-internal-class: true TemplateResponseAccountQuota: description: 'An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.' properties: @@ -10275,14 +10290,14 @@ components: description: 'SMS verifications remaining.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseCCRole: properties: name: description: 'The name of the Role.' type: string type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponseTemplate: description: 'Template object with parameters: `template_id`, `edit_url`, `expires_at`.' properties: @@ -10302,7 +10317,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true TemplateCreateResponseTemplate: description: 'Template object with parameters: `template_id`.' properties: @@ -10310,7 +10325,7 @@ components: description: 'The id of the Template.' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocument: properties: name: @@ -10341,7 +10356,7 @@ components: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' nullable: true type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentCustomFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10384,7 +10399,7 @@ components: mapping: text: '#/components/schemas/TemplateResponseDocumentCustomFieldText' checkbox: '#/components/schemas/TemplateResponseDocumentCustomFieldCheckbox' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentCustomFieldCheckbox: description: 'This class extends `TemplateResponseDocumentCustomFieldBase`' @@ -10441,7 +10456,7 @@ components: rule: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroupRule' type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFieldGroupRule: description: 'The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping).' properties: @@ -10457,7 +10472,7 @@ components: description: 'Name of the group' type: string type: object - x-internal: true + x-internal-class: true TemplateResponseDocumentFormFieldBase: description: 'An array of Form Field objects containing the name and type of each named field.' required: @@ -10505,7 +10520,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentFormFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentFormFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentFormFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -10799,7 +10814,7 @@ components: signature: '#/components/schemas/TemplateResponseDocumentStaticFieldSignature' date_signed: '#/components/schemas/TemplateResponseDocumentStaticFieldDateSigned' initials: '#/components/schemas/TemplateResponseDocumentStaticFieldInitials' - x-internal: true + x-internal-class: true x-base-class: true TemplateResponseDocumentStaticFieldCheckbox: description: 'This class extends `TemplateResponseDocumentStaticFieldBase`' @@ -11019,7 +11034,7 @@ components: description: 'Number of characters per line.' type: integer type: object - x-internal: true + x-internal-class: true TemplateResponseSignerRole: properties: name: @@ -11029,7 +11044,7 @@ components: description: 'If signer order is assigned this is the 0-based index for this role.' type: integer type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponseTemplate: description: 'Contains template id' properties: @@ -11043,7 +11058,7 @@ components: $ref: '#/components/schemas/WarningResponse' deprecated: true type: object - x-internal: true + x-internal-class: true UnclaimedDraftResponse: description: 'A group of documents that a user can take ownership of via the claim URL.' properties: @@ -11070,7 +11085,7 @@ components: description: 'Whether this is a test draft. Signature requests made from test drafts have no legal value.' type: boolean type: object - x-internal: true + x-internal-class: true WarningResponse: description: 'A list of warnings.' required: @@ -11094,7 +11109,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamGetInfoResponse: properties: team: @@ -11105,7 +11120,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamInvitesResponse: properties: team_invites: @@ -11118,7 +11133,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamMembersResponse: properties: team_members: @@ -11133,7 +11148,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TeamSubTeamsResponse: properties: sub_teams: @@ -11148,7 +11163,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateResponse: properties: template: @@ -11159,7 +11174,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateCreateEmbeddedDraftResponse: properties: template: @@ -11170,7 +11185,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateEditResponse: properties: template_id: @@ -11187,7 +11202,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateListResponse: properties: templates: @@ -11203,13 +11218,13 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true TemplateUpdateFilesResponse: properties: template: $ref: '#/components/schemas/TemplateUpdateFilesResponseTemplate' type: object - x-internal: true + x-internal-class: true UnclaimedDraftCreateResponse: properties: unclaimed_draft: @@ -11220,7 +11235,7 @@ components: items: $ref: '#/components/schemas/WarningResponse' type: object - x-internal: true + x-internal-class: true EventCallbackRequest: title: EventCallbackRequest required: diff --git a/run-build b/run-build index 5346431..8639977 100755 --- a/run-build +++ b/run-build @@ -9,7 +9,7 @@ WORKING_DIR="/app/ruby" docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v5.3.0 generate \ + openapitools/openapi-generator-cli:v7.7.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 209b855..20e0ef8 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -6,7 +6,7 @@ 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 +Generator version: 6.6.0 =end @@ -89,6 +89,8 @@ end end + + describe '#deserialize' do it "handles Array" do api_client = Dropbox::Sign::ApiClient.new diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 09c3746..eab18ff 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -6,7 +6,7 @@ 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 +Generator version: 6.6.0 =end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9a25a1f..59e8c7e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,7 +6,7 @@ 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 +Generator version: 7.7.0 =end diff --git a/templates/README.mustache b/templates/README.mustache index 25f3ef4..0c47d5c 100644 --- a/templates/README.mustache +++ b/templates/README.mustache @@ -31,6 +31,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} - Build package: {{generatorClass}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) diff --git a/templates/api.mustache b/templates/api.mustache index 4cd7b83..2519dd5 100644 --- a/templates/api.mustache +++ b/templates/api.mustache @@ -22,12 +22,30 @@ module {{moduleName}} {{#notes}} # {{{.}}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] - def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) - {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] + def {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) + {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts) {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}} end @@ -37,14 +55,42 @@ module {{moduleName}} {{#notes}} # {{.}} {{/notes}} -{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} -{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters -{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers - def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) +{{#vendorExtensions.x-group-parameters}} + # @param [Hash] opts the parameters +{{#allParams}} +{{#required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required) +{{/required}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#required}} + # @param {{paramName}} [{{{dataType}}}] {{description}} +{{/required}} +{{/allParams}} + # @param [Hash] opts the optional parameters +{{/vendorExtensions.x-group-parameters}} +{{#allParams}} +{{^required}} + # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/required}} +{{/allParams}} + # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers + def {{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...' end + {{#vendorExtensions.x-group-parameters}} + # unbox the parameters from the hash + {{#allParams}} + {{^isNullable}} + {{#required}} + {{{paramName}}} = opts[:'{{{paramName}}}'] + {{/required}} + {{/isNullable}} + {{/allParams}} + {{/vendorExtensions.x-group-parameters}} {{#allParams}} {{^isNullable}} {{#required}} @@ -161,7 +207,7 @@ module {{moduleName}} {{/headerParams}} {{#headerParams}} {{^required}} - header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil? + header_params[{{#lambdaFixHeaderKey}}:'{{{baseName}}}'{{/lambdaFixHeaderKey}}] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil? {{/required}} {{/headerParams}} diff --git a/templates/api_client.mustache b/templates/api_client.mustache index ebd3ab5..cba9c7c 100644 --- a/templates/api_client.mustache +++ b/templates/api_client.mustache @@ -7,12 +7,18 @@ require 'json' require 'logger' require 'tempfile' require 'time' -{{^isFaraday}} +{{#isTyphoeus}} require 'typhoeus' -{{/isFaraday}} +{{/isTyphoeus}} {{#isFaraday}} require 'faraday' +require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') +require 'marcel' {{/isFaraday}} +{{#isHttpx}} +require 'httpx' +require 'net/http/status' +{{/isHttpx}} module Dropbox end @@ -42,12 +48,15 @@ module {{moduleName}} @@default ||= ApiClient.new end -{{^isFaraday}} +{{#isTyphoeus}} {{> api_client_typhoeus_partial}} -{{/isFaraday}} +{{/isTyphoeus}} {{#isFaraday}} {{> api_client_faraday_partial}} {{/isFaraday}} +{{#isHttpx}} +{{> api_client_httpx_partial}} +{{/isHttpx}} # Check if the given MIME is a JSON MIME. # JSON MIME examples: # application/json @@ -57,7 +66,7 @@ module {{moduleName}} # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -66,38 +75,10 @@ module {{moduleName}} # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - {{^isFaraday}} - return @tempfile if return_type == 'File' - {{/isFaraday}} - {{#isFaraday}} - if return_type == 'File' - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = body.encoding - @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile.write(@stream.join.force_encoding(encoding)) - @tempfile.close - @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - return @tempfile - end - {{/isFaraday}} - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -164,7 +145,7 @@ module {{moduleName}} # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/templates/api_client_faraday_partial.mustache b/templates/api_client_faraday_partial.mustache index a32b6ab..1a85fc6 100644 --- a/templates/api_client_faraday_partial.mustache +++ b/templates/api_client_faraday_partial.mustache @@ -3,50 +3,38 @@ # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: # the data deserialized from response body (could be nil), response status code and response headers. def call_api(http_method, path, opts = {}) - ssl_options = { - :ca_file => @config.ssl_ca_file, - :verify => @config.ssl_verify, - :verify_mode => @config.ssl_verify_mode, - :client_cert => @config.ssl_client_cert, - :client_key => @config.ssl_client_key - } - - connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn| - conn.request(:basic_auth, config.username, config.password) - @config.configure_middleware(conn) - if opts[:header_params]["Content-Type"] == "multipart/form-data" - conn.request :multipart - conn.request :url_encoded - end - conn.adapter(Faraday.default_adapter) - end - + stream = nil begin - response = connection.public_send(http_method.to_sym.downcase) do |req| - build_request(http_method, path, req, opts) + response = connection(opts).public_send(http_method.to_sym.downcase) do |req| + request = build_request(http_method, path, req, opts) + stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' end - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" end unless response.success? - if response.status == 0 + if response.status == 0 && response.respond_to?(:return_message) # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) + fail ApiError.new(code: 0, + message: response.return_message) else - fail ApiError.new(:code => response.status, - :response_headers => response.headers, - :response_body => response.body), + fail ApiError.new(code: response.status, + response_headers: response.headers, + response_body: response.body), response.reason_phrase end end rescue Faraday::TimeoutError fail ApiError.new('Connection timed out') + rescue Faraday::ConnectionFailed + fail ApiError.new('Connection failed') end - if opts[:return_type] + if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' + data = deserialize_file(response, stream) + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -62,7 +50,7 @@ # @option opts [Hash] :query_params Query parameters # @option opts [Hash] :form_params Query parameters # @option opts [Object] :body HTTP body (JSON/XML) - # @return [Typhoeus::Request] A Typhoeus Request + # @return [Faraday::Request] A Faraday Request def build_request(http_method, path, request, opts = {}) url = build_request_url(path, opts) http_method = http_method.to_sym.downcase @@ -73,24 +61,21 @@ update_params_for_auth! header_params, query_params, opts[:auth_names] - req_opts = { - :params_encoding => @config.params_encoding, - :timeout => @config.timeout, - :verbose => @config.debugging - } - if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request.headers = header_params request.body = req_body - request.options = OpenStruct.new(req_opts) + + # Overload default options only if provided + request.options.params_encoder = config.params_encoder if config.params_encoder + request.options.timeout = config.timeout if config.timeout + request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' request end @@ -109,8 +94,7 @@ form_params.each do |key, value| case value when ::File, ::Tempfile - # TODO hardcode to application/octet-stream, need better way to detect content type - data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path) + data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path))) when ::Array, nil # let Faraday handle Array and nil parameters data[key] = value @@ -127,10 +111,84 @@ end def download_file(request) - @stream = [] + stream = [] # handle streaming Responses request.options.on_data = Proc.new do |chunk, overall_received_bytes| - @stream << chunk + stream << chunk + end + stream + end + + def deserialize_file(response, stream) + body = response.body + if @config.return_binary_data == true + # return byte stream + encoding = body.encoding + stream.join.force_encoding(encoding) + else + # return file instead of binary data + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + tempfile.write(stream.join.force_encoding(encoding)) + tempfile.close + config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + tempfile + end + end + + def connection(opts) + opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular + end + + def connection_multipart + @connection_multipart ||= build_connection do |conn| + conn.request :multipart + conn.request :url_encoded + end + end + + def connection_regular + @connection_regular ||= build_connection + end + + def build_connection + Faraday.new(url: config.base_url, ssl: ssl_options, proxy: config.proxy) do |conn| + basic_auth(conn) + config.configure_middleware(conn) + yield(conn) if block_given? + conn.adapter(Faraday.default_adapter) + config.configure_connection(conn) + end + end + + def ssl_options + { + ca_file: config.ssl_ca_file, + verify: config.ssl_verify, + verify_mode: config.ssl_verify_mode, + client_cert: config.ssl_client_cert, + client_key: config.ssl_client_key + } + end + + def basic_auth(conn) + if config.username && config.password + if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') + conn.request(:authorization, :basic, config.username, config.password) + else + conn.request(:basic_auth, config.username, config.password) + end end end diff --git a/templates/api_client_httpx_partial.mustache b/templates/api_client_httpx_partial.mustache new file mode 100644 index 0000000..7dd5221 --- /dev/null +++ b/templates/api_client_httpx_partial.mustache @@ -0,0 +1,134 @@ + # Call an API with given options. + # + # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: + # the data deserialized from response body (could be nil), response status code and response headers. + def call_api(http_method, path, opts = {}) + begin + response = build_request(http_method.to_s, path, opts) + + if config.debugging + config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" + end + + response.raise_for_status + + rescue HTTPX::HTTPError + fail ApiError.new(code: response.status, + response_headers: response.headers.to_h, + response_body: response.body.to_s), + Net::HTTP::STATUS_CODES.fetch(response.status, "HTTP Error (#{response.status})") + rescue HTTPX::TimeoutError + fail ApiError.new('Connection timed out') + rescue HTTPX::ConnectionError, HTTPX::ResolveError + fail ApiError.new('Connection failed') + end + + if opts[:return_type] == 'File' + data = deserialize_file(response) + elsif opts[:return_type] + data = deserialize(response, opts[:return_type]) + else + data = nil + end + return data, response.status, response.headers.to_h + end + + # Builds the HTTP request + # + # @param [String] http_method HTTP method/verb (e.g. POST) + # @param [String] path URL path (e.g. /account/new) + # @option opts [Hash] :header_params Header parameters + # @option opts [Hash] :query_params Query parameters + # @option opts [Hash] :form_params Query parameters + # @option opts [Object] :body HTTP body (JSON/XML) + # @return [HTTPX::Request] A Request object + def build_request(http_method, path, opts = {}) + url = build_request_url(path, opts) + + header_params = @default_headers.merge(opts[:header_params] || {}) + query_params = opts[:query_params] || {} + form_params = opts[:form_params] || {} + + update_params_for_auth! header_params, query_params, opts[:auth_names] + + if %w[POST PATCH PUT DELETE].include?(http_method) + body_params = build_request_body(header_params, form_params, opts[:body]) + if config.debugging + config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" + end + end + req_opts = { + :headers => HTTPX::Headers.new(header_params) + } + req_opts.merge!(body_params) if body_params + req_opts[:params] = query_params if query_params && !query_params.empty? + session.request(http_method, url, **req_opts) + end + + # Builds the HTTP request body + # + # @param [Hash] header_params Header parameters + # @param [Hash] form_params Query parameters + # @param [Object] body HTTP body (JSON/XML) + # @return [Hash{Symbol => Object}] body options as HTTPX handles them + def build_request_body(header_params, form_params, body) + # http form + if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || + header_params['Content-Type'] == 'multipart/form-data' + header_params.delete('Content-Type') # httpx takes care of this + { form: form_params } + elsif body + body.is_a?(String) ? { body: body } : { json: body } + end + end + + def deserialize_file(response) + body = response.body + if @config.return_binary_data == true + # TODO: force response encoding + body.to_s + else + content_disposition = response.headers['content-disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = response.body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + response.copy_to(tempfile) + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + + tempfile + end + end + + def session + return @session if defined?(@session) + + session = HTTPX.with( + ssl: @config.ssl, + timeout: ({ request_timeout: @config.timeout } if @config.timeout && @config.timeout.positive?), + origin: "#{@config.scheme}://#{@config.host}", + base_path: (@config.base_path.sub(/\/+\z/, '') if @config.base_path) + ) + + if @config.proxy + session = session.plugin(:proxy, proxy: @config.proxy) + end + + if @config.username && @config.password + session = session.plugin(:basic_auth).basic_auth(@config.username, @config.password) + end + + session = @config.configure(session) + + @session = session + + end diff --git a/templates/api_client_typhoeus_partial.mustache b/templates/api_client_typhoeus_partial.mustache index e0c9e7c..e8162ac 100644 --- a/templates/api_client_typhoeus_partial.mustache +++ b/templates/api_client_typhoeus_partial.mustache @@ -1,9 +1,10 @@ # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -25,7 +26,9 @@ end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -49,6 +52,7 @@ header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true {{#hasAuthMethods}} update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -67,7 +71,8 @@ :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided @@ -81,9 +86,7 @@ end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -121,6 +124,8 @@ # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -135,19 +140,22 @@ prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) tempfile.write(chunk) end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end + # run the request to ensure the tempfile is created successfully before returning it + request.run + if tempfile + tempfile.close + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + else + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") end + + tempfile end diff --git a/templates/api_doc.mustache b/templates/api_doc.mustache index e1c4ab6..e967752 100644 --- a/templates/api_doc.mustache +++ b/templates/api_doc.mustache @@ -38,7 +38,7 @@ This returns an Array which contains the response data{{^returnType}} (`nil` in ```ruby begin {{#summary}}# {{{.}}}{{/summary}} - data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}){{/hasParams}} + data, status_code, headers = api_instance.{{{operationId}}}_with_http_info{{#hasParams}}({{^vendorExtensions.x-group-parameters}}{{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}opts{{/vendorExtensions.x-group-parameters}}){{/hasParams}} p status_code # => 2xx p headers # => { ... } p data # => {{#returnType}}{{#returnTypeIsPrimitive}}{{returnType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}<{{{returnType}}}>{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}nil{{/returnType}} diff --git a/templates/api_error.mustache b/templates/api_error.mustache index 79abab6..ef2e6df 100644 --- a/templates/api_error.mustache +++ b/templates/api_error.mustache @@ -27,6 +27,7 @@ module {{moduleName}} end else super arg + @message = arg end end diff --git a/templates/api_info.mustache b/templates/api_info.mustache index 272f726..be6dda9 100644 --- a/templates/api_info.mustache +++ b/templates/api_info.mustache @@ -9,4 +9,4 @@ {{#version}}The version of the OpenAPI document: {{.}}{{/version}} {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech -OpenAPI Generator version: {{{generatorVersion}}} +Generator version: {{{generatorVersion}}} diff --git a/templates/api_test.mustache b/templates/api_test.mustache index 2ab6515..7079f97 100644 --- a/templates/api_test.mustache +++ b/templates/api_test.mustache @@ -38,7 +38,7 @@ require 'json' {{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] describe '{{operationId}} test' do it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end diff --git a/templates/base_object.mustache b/templates/base_object.mustache index ce5f199..03ea141 100644 --- a/templates/base_object.mustache +++ b/templates/base_object.mustache @@ -61,8 +61,6 @@ else false end - when :File - value when :Object # generic object (usually a Hash), return directly value @@ -80,7 +78,7 @@ else # model # models (e.g. Pet) klass = {{moduleName}}.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/templates/configuration.mustache b/templates/configuration.mustache index b020785..7a32362 100644 --- a/templates/configuration.mustache +++ b/templates/configuration.mustache @@ -57,6 +57,16 @@ module {{moduleName}} # Defines the access token (Bearer) used with OAuth2. attr_accessor :access_token + # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2. + # Overrides the access_token if set + # @return [Proc] + attr_accessor :access_token_getter + + # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) + # HTTP responses with return type `File` will be returned as a stream of binary data. + # Default to false. + attr_accessor :return_binary_data + # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -64,6 +74,14 @@ module {{moduleName}} # @return [true, false] attr_accessor :debugging + # Set this to ignore operation servers for the API client. This is useful when you need to + # send requests to a different server than the one specified in the OpenAPI document. + # Will default to the base url defined in the spec but can be overridden by setting + # `scheme`, `host`, `base_path` directly. + # Default to false. + # @return [true, false] + attr_accessor :ignore_operation_servers + # Defines the logger used for debugging. # Default to `Rails.logger` (when in Rails) or logging to STDOUT. # @@ -86,18 +104,15 @@ module {{moduleName}} # @return [true, false] attr_accessor :client_side_validation -{{^isFaraday}} -{{> configuration_tls_typhoeus_partial}} -{{/isFaraday}} +{{#isTyphoeus}} +{{> configuration_typhoeus_partial}} +{{/isTyphoeus}} {{#isFaraday}} -{{> configuration_tls_faraday_partial}} +{{> configuration_faraday_partial}} {{/isFaraday}} - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding +{{#isHttpx}} +{{> configuration_httpx_partial}} +{{/isHttpx}} attr_accessor :inject_format @@ -107,7 +122,7 @@ module {{moduleName}} @scheme = '{{scheme}}' @host = '{{host}}{{#port}}:{{{.}}}{{/port}}' @base_path = '{{contextPath}}' - @server_index = 0 + @server_index = nil @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -120,20 +135,29 @@ module {{moduleName}} @ssl_ca_file = nil @ssl_client_cert = nil @ssl_client_key = nil - @middlewares = [] - @request_middlewares = [] - @response_middlewares = [] + @middlewares = Hash.new { |h, k| h[k] = [] } + @configure_connection_blocks = [] @timeout = 60 + # return data as binary instead of file + @return_binary_data = false + @params_encoder = nil {{/isFaraday}} - {{^isFaraday}} + {{#isTyphoeus}} @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 - {{/isFaraday}} + @params_encoding = nil + {{/isTyphoeus}} + {{#isHttpx}} + @ssl = nil + @proxy = nil + @timeout = 60 + @configure_session_blocks = [] + {{/isHttpx}} @debugging = false + @ignore_operation_servers = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @@ -168,10 +192,13 @@ module {{moduleName}} # Returns base URL for specified operation based on server settings def base_url(operation = nil) - index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil - - server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers + if operation_server_settings.key?(operation) then + index = server_operation_index.fetch(operation, server_index) + server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + else + server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) + end end # Gets API key (with prefix if set). @@ -186,6 +213,12 @@ module {{moduleName}} end end + # Gets access_token using access_token_getter or uses the static access_token + def access_token_with_refresh + return access_token if access_token_getter.nil? + access_token_getter.call + end + # Gets Basic Auth token string def basic_auth_token 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") @@ -311,8 +344,8 @@ module {{moduleName}} servers = server_settings if servers == nil # check array index out of bound - if (index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + if (index.nil? || index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" end server = servers[index] @@ -338,35 +371,108 @@ module {{moduleName}} end {{#isFaraday}} + # Configure Faraday connection directly. + # + # ``` + # c.configure_faraday_connection do |conn| + # conn.use Faraday::HttpCache, shared_cache: false, logger: logger + # conn.response :logger, nil, headers: true, bodies: true, log_level: :debug do |logger| + # logger.filter(/(Authorization: )(.*)/, '\1[REDACTED]') + # end + # end + # + # c.configure_faraday_connection do |conn| + # conn.adapter :typhoeus + # end + # ``` + # + # @param block [Proc] `#call`able object that takes one arg, the connection + def configure_faraday_connection(&block) + @configure_connection_blocks << block + end + + def configure_connection(conn) + @configure_connection_blocks.each do |block| + block.call(conn) + end + end + # Adds middleware to the stack def use(*middleware) - @middlewares << middleware + set_faraday_middleware(:use, *middleware) end # Adds request middleware to the stack def request(*middleware) - @request_middlewares << middleware + set_faraday_middleware(:request, *middleware) end # Adds response middleware to the stack def response(*middleware) - @response_middlewares << middleware + set_faraday_middleware(:response, *middleware) end + # Adds Faraday middleware setting information to the stack + # + # @example Use the `set_faraday_middleware` method to set middleware information + # config.set_faraday_middleware(:request, :retry, max: 3, methods: [:get, :post], retry_statuses: [503]) + # config.set_faraday_middleware(:response, :logger, nil, { bodies: true, log_level: :debug }) + # config.set_faraday_middleware(:use, Faraday::HttpCache, store: Rails.cache, shared_cache: false) + # config.set_faraday_middleware(:insert, 0, FaradayMiddleware::FollowRedirects, { standards_compliant: true, limit: 1 }) + # config.set_faraday_middleware(:swap, 0, Faraday::Response::Logger) + # config.set_faraday_middleware(:delete, Faraday::Multipart::Middleware) + # + # @see https://github.com/lostisland/faraday/blob/v2.3.0/lib/faraday/rack_builder.rb#L92-L143 + def set_faraday_middleware(operation, key, *args, &block) + unless [:request, :response, :use, :insert, :insert_before, :insert_after, :swap, :delete].include?(operation) + fail ArgumentError, "Invalid faraday middleware operation #{operation}. Must be" \ + " :request, :response, :use, :insert, :insert_before, :insert_after, :swap or :delete." + end + + @middlewares[operation] << [key, args, block] + end + ruby2_keywords(:set_faraday_middleware) if respond_to?(:ruby2_keywords, true) + # Set up middleware on the connection def configure_middleware(connection) - @middlewares.each do |middleware| - connection.use(*middleware) - end + return if @middlewares.empty? + + [:request, :response, :use, :insert, :insert_before, :insert_after, :swap].each do |operation| + next unless @middlewares.key?(operation) - @request_middlewares.each do |middleware| - connection.request(*middleware) + @middlewares[operation].each do |key, args, block| + connection.builder.send(operation, key, *args, &block) + end end - @response_middlewares.each do |middleware| - connection.response(*middleware) + if @middlewares.key?(:delete) + @middlewares[:delete].each do |key, _args, _block| + connection.builder.delete(key) + end end end {{/isFaraday}} + + {{#isHttpx}} + # Configure Httpx session directly. + # + # ``` + # c.configure_session do |http| + # http.plugin(:follow_redirects).with(debug: STDOUT, debug_level: 1) + # end + # ``` + # + # @param block [Proc] `#call`able object that takes one arg, the connection + def configure_session(&block) + @configure_session_blocks << block + end + + + def configure(session) + @configure_session_blocks.reduce(session) do |configured_sess, block| + block.call(configured_sess) + end + end + {{/isHttpx}} end end diff --git a/templates/configuration_faraday_partial.mustache b/templates/configuration_faraday_partial.mustache new file mode 100644 index 0000000..83cbf96 --- /dev/null +++ b/templates/configuration_faraday_partial.mustache @@ -0,0 +1,40 @@ + ### TLS/SSL setting + # Set this to false to skip verifying SSL certificate when calling API from https server. + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :ssl_verify + + ### TLS/SSL setting + # Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + attr_accessor :ssl_verify_mode + + ### TLS/SSL setting + # Set this to customize the certificate file to verify the peer. + # + # @return [String] the path to the certificate file + attr_accessor :ssl_ca_file + + ### TLS/SSL setting + # Client certificate file (for client certificate) + attr_accessor :ssl_client_cert + + ### TLS/SSL setting + # Client private key file (for client certificate) + attr_accessor :ssl_client_key + + ### Proxy setting + # HTTP Proxy settings + attr_accessor :proxy + + # Set this to customize parameters encoder of array parameter. + # Default to nil. Faraday uses NestedParamsEncoder when nil. + # + # @see The params_encoder option of Faraday. Related source code: + # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders + attr_accessor :params_encoder diff --git a/templates/configuration_httpx_partial.mustache b/templates/configuration_httpx_partial.mustache new file mode 100644 index 0000000..807a30d --- /dev/null +++ b/templates/configuration_httpx_partial.mustache @@ -0,0 +1,11 @@ + ### TLS/SSL setting + # You can use this to customize SSL Context settings (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html + # to know which ones). + # + # @return [Hash{Symbol => Object}, OpenSSL::SSL::SSLContext, nil] + attr_accessor :ssl + + ### Proxy setting + # HTTP Proxy settings (see https://honeyryderchuck.gitlab.io/httpx/wiki/Proxy#options) + # @return [Hash{Symbol => Object}, nil] + attr_accessor :proxy diff --git a/templates/configuration_typhoeus_partial.mustache b/templates/configuration_typhoeus_partial.mustache new file mode 100644 index 0000000..b117e20 --- /dev/null +++ b/templates/configuration_typhoeus_partial.mustache @@ -0,0 +1,41 @@ + ### TLS/SSL setting + # Set this to false to skip verifying SSL certificate when calling API from https server. + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl + + ### TLS/SSL setting + # Set this to false to skip verifying SSL host name + # Default to true. + # + # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. + # + # @return [true, false] + attr_accessor :verify_ssl_host + + ### TLS/SSL setting + # Set this to customize the certificate file to verify the peer. + # + # @return [String] the path to the certificate file + # + # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: + # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 + attr_accessor :ssl_ca_cert + + ### TLS/SSL setting + # Client certificate file (for client certificate) + attr_accessor :cert_file + + ### TLS/SSL setting + # Client private key file (for client certificate) + attr_accessor :key_file + + # Set this to customize parameters encoding of array parameter with multi collectionFormat. + # Default to nil. + # + # @see The params_encoding option of Ethon. Related source code: + # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 + attr_accessor :params_encoding diff --git a/templates/gem.mustache b/templates/gem.mustache index 958fbff..9b5e313 100644 --- a/templates/gem.mustache +++ b/templates/gem.mustache @@ -9,6 +9,7 @@ require '{{gemName}}/version' require '{{gemName}}/configuration' # Models +{{^useAutoload}} {{#models}} {{#model}} {{^parent}} @@ -23,11 +24,24 @@ require '{{gemName}}/{{modelPackage}}/{{classFilename}}' {{/parent}} {{/model}} {{/models}} +{{/useAutoload}} +{{#useAutoload}} +{{#models}} +{{#model}} +{{moduleName}}.autoload :{{classname}}, '{{gemName}}/{{modelPackage}}/{{classFilename}}' +{{/model}} +{{/models}} +{{/useAutoload}} # APIs {{#apiInfo}} {{#apis}} +{{^useAutoload}} require '{{importPath}}' +{{/useAutoload}} +{{#useAutoload}} +{{moduleName}}.autoload :{{classname}}, '{{importPath}}' +{{/useAutoload}} {{/apis}} {{/apiInfo}} diff --git a/templates/gemspec.mustache b/templates/gemspec.mustache index ea84291..ea1cf2f 100644 --- a/templates/gemspec.mustache +++ b/templates/gemspec.mustache @@ -17,14 +17,20 @@ Gem::Specification.new do |s| s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}" s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}" s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}" - s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.4{{/gemRequiredRubyVersion}}" + s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}" + s.metadata = {{{gemMetadata}}}{{^gemMetadata}}{}{{/gemMetadata}} {{#isFaraday}} - s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' + s.add_runtime_dependency 'faraday-multipart' + s.add_runtime_dependency 'marcel' {{/isFaraday}} - {{^isFaraday}} + {{#isTyphoeus}} s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - {{/isFaraday}} + {{/isTyphoeus}} + {{#isHttpx}} + s.add_runtime_dependency 'httpx', '~> 1.0', '>= 1.0.0' + {{/isHttpx}} s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/templates/model_test.mustache b/templates/model_test.mustache index 86e5438..b6b078d 100644 --- a/templates/model_test.mustache +++ b/templates/model_test.mustache @@ -24,14 +24,14 @@ describe {{moduleName}}::{{classname}} do describe 'test attribute "{{{name}}}"' do it 'should work' do {{#isEnum}} - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ # validator = Petstore::EnumTest::EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]) # validator.allowable_values.each do |value| # expect { instance.{{name}} = value }.not_to raise_error # end {{/isEnum}} {{^isEnum}} - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ {{/isEnum}} end end @@ -68,6 +68,7 @@ describe {{moduleName}}::{{classname}} do {{/discriminator}} describe '.build' do it 'returns the correct model' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end {{/-first}} diff --git a/templates/partial_model_enum_class.mustache b/templates/partial_model_enum_class.mustache index 4b8b5a0..3880ae8 100644 --- a/templates/partial_model_enum_class.mustache +++ b/templates/partial_model_enum_class.mustache @@ -2,6 +2,10 @@ {{{name}}} = {{{value}}}.freeze{{/enumVars}} {{/allowableValues}} + def self.all_vars + @all_vars ||= [{{#allowableValues}}{{#enumVars}}{{{name}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}].freeze + end + # Builds the enum from string # @param [String] The enum value in the form of the string # @return [String] The enum value @@ -13,8 +17,7 @@ # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = {{classname}}.constants.select { |c| {{classname}}::const_get(c) == value } - raise "Invalid ENUM value #{value} for class #{{{classname}}}" if constantValues.empty? - value + return value if {{classname}}.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #{{{classname}}}" end - end \ No newline at end of file + end diff --git a/templates/partial_model_generic.mustache b/templates/partial_model_generic.mustache index 87998bb..497a3d3 100644 --- a/templates/partial_model_generic.mustache +++ b/templates/partial_model_generic.mustache @@ -343,44 +343,44 @@ {{/required}} {{/isNullable}} {{#maxLength}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length > {{{maxLength}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length > {{{maxLength}}} fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be smaller than or equal to {{{maxLength}}}.' end {{/maxLength}} {{#minLength}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length < {{{minLength}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.to_s.length < {{{minLength}}} fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.' end {{/minLength}} {{#maximum}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}} fail ArgumentError, 'invalid value for "{{{name}}}", must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}.' end {{/maximum}} {{#minimum}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}} fail ArgumentError, 'invalid value for "{{{name}}}", must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}.' end {{/minimum}} {{#pattern}} pattern = Regexp.new({{{pattern}}}) - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} !~ pattern + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}} !~ pattern fail ArgumentError, "invalid value for \"{{{name}}}\", must conform to the pattern #{pattern}." end {{/pattern}} {{#maxItems}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length > {{{maxItems}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.length > {{{maxItems}}} fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.' end {{/maxItems}} {{#minItems}} - if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length < {{{minItems}}} + if {{#isNullable}}!{{{name}}}.nil? && {{/isNullable}}{{{name}}}.length < {{{minItems}}} fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.' end diff --git a/templates/partial_oneof_module.mustache b/templates/partial_oneof_module.mustache index 50655f4..d3a25f6 100644 --- a/templates/partial_oneof_module.mustache +++ b/templates/partial_oneof_module.mustache @@ -44,11 +44,11 @@ def build(data) {{#discriminator}} discriminator_value = data[openapi_discriminator_name] - return nil unless discriminator_value + return nil if discriminator_value.nil? {{#mappedModels}} {{#-first}} - klass = openapi_discriminator_mapping[discriminator_value.to_sym] + klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym] return nil unless klass {{moduleName}}.const_get(klass).build_from_hash(data) @@ -121,9 +121,9 @@ return model if model else # raise if data contains keys that are not known to the model - raise unless (data.keys - const.acceptable_attributes).empty? + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? model = const.build_from_hash(data) - return model if model && model.valid? + return model if model end end end diff --git a/templates/partial_oneof_module_doc.mustache b/templates/partial_oneof_module_doc.mustache index 64a6c32..f86cefe 100644 --- a/templates/partial_oneof_module_doc.mustache +++ b/templates/partial_oneof_module_doc.mustache @@ -60,6 +60,7 @@ require '{{{gemName}}}' # } {{/-last}} {{/mappedModels}} +``` {{/discriminator}} ### build diff --git a/templates/travis.mustache b/templates/travis.mustache index 0d1ed38..ed7f55c 100644 --- a/templates/travis.mustache +++ b/templates/travis.mustache @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec