From 905d8ccc19d6a74eba0a7e5da5e48c4bd38985ef Mon Sep 17 00:00:00 2001 From: Juan Treminio <50673996+jtreminio-dropbox@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:27:53 -0500 Subject: [PATCH] Release 1.7.0 (#15) * Release 1.7.0 * Fix FaxFiles.rb formatting --- .github/workflows/github-actions.yml | 3 + .travis.yml | 2 +- Gemfile.lock | 2 +- README.md | 20 +- VERSION | 2 +- docs/AccountResponseQuotas.md | 2 +- docs/FaxApi.md | 364 +++++++ docs/FaxGetResponse.md | 11 + docs/FaxListResponse.md | 11 + docs/FaxResponse.md | 19 + docs/FaxResponseTransmission.md | 13 + docs/FaxSendRequest.md | 18 + docs/OAuthTokenRefreshRequest.md | 2 + docs/SignatureRequestApi.md | 2 +- docs/SubWhiteLabelingOptions.md | 24 +- docs/TemplateApi.md | 6 +- docs/TemplateResponse.md | 3 +- docs/TemplateResponseDocumentFormFieldBase.md | 1 - ...mplateResponseDocumentFormFieldCheckbox.md | 1 + ...lateResponseDocumentFormFieldDateSigned.md | 1 + ...mplateResponseDocumentFormFieldDropdown.md | 1 + ...plateResponseDocumentFormFieldHyperlink.md | 1 + ...mplateResponseDocumentFormFieldInitials.md | 1 + .../TemplateResponseDocumentFormFieldRadio.md | 1 + ...plateResponseDocumentFormFieldSignature.md | 1 + docs/TemplateResponseDocumentFormFieldText.md | 1 + examples/FaxDelete.rb | 14 + examples/FaxFiles.rb | 17 + examples/FaxGet.rb | 17 + examples/FaxList.rb | 18 + examples/FaxSend.rb | 25 + lib/dropbox-sign.rb | 6 + lib/dropbox-sign/api/fax_api.rb | 495 ++++++++++ lib/dropbox-sign/api/o_auth_api.rb | 28 + lib/dropbox-sign/api/signature_request_api.rb | 4 +- lib/dropbox-sign/api/template_api.rb | 4 +- .../models/account_response_quotas.rb | 2 +- .../models/api_app_response_o_auth.rb | 3 +- lib/dropbox-sign/models/fax_get_response.rb | 263 +++++ lib/dropbox-sign/models/fax_list_response.rb | 267 +++++ lib/dropbox-sign/models/fax_response.rb | 399 ++++++++ .../models/fax_response_transmission.rb | 328 ++++++ lib/dropbox-sign/models/fax_send_request.rb | 345 +++++++ .../models/o_auth_token_refresh_request.rb | 30 +- .../models/sub_white_labeling_options.rb | 24 +- lib/dropbox-sign/models/template_response.rb | 35 +- .../models/template_response_document.rb | 3 +- ...plate_response_document_form_field_base.rb | 20 +- ...e_response_document_form_field_checkbox.rb | 20 +- ...esponse_document_form_field_date_signed.rb | 20 +- ...e_response_document_form_field_dropdown.rb | 20 +- ..._response_document_form_field_hyperlink.rb | 20 +- ...e_response_document_form_field_initials.rb | 20 +- ...late_response_document_form_field_radio.rb | 24 +- ..._response_document_form_field_signature.rb | 20 +- ...plate_response_document_form_field_text.rb | 22 +- lib/dropbox-sign/version.rb | 2 +- openapi-config.yaml | 2 +- openapi-sdk.yaml | 933 +++++++++++++++--- run-build | 9 + test_fixtures/ApiAppCreateRequest.json | 20 +- test_fixtures/ApiAppGetResponse.json | 21 +- test_fixtures/ApiAppListResponse.json | 8 +- test_fixtures/ApiAppUpdateRequest.json | 22 +- test_fixtures/FaxGetResponse.json | 23 + test_fixtures/FaxListResponse.json | 31 + test_fixtures/FaxSendRequest.json | 14 + test_fixtures/FaxSendResponse.json | 16 + test_fixtures/TeamGetResponse.json | 5 + test_fixtures/TemplateGetResponse.json | 503 +--------- test_fixtures/TemplateListResponse.json | 39 +- 71 files changed, 3939 insertions(+), 735 deletions(-) create mode 100644 docs/FaxApi.md create mode 100644 docs/FaxGetResponse.md create mode 100644 docs/FaxListResponse.md create mode 100644 docs/FaxResponse.md create mode 100644 docs/FaxResponseTransmission.md create mode 100644 docs/FaxSendRequest.md create mode 100644 examples/FaxDelete.rb create mode 100644 examples/FaxFiles.rb create mode 100644 examples/FaxGet.rb create mode 100644 examples/FaxList.rb create mode 100644 examples/FaxSend.rb create mode 100644 lib/dropbox-sign/api/fax_api.rb create mode 100644 lib/dropbox-sign/models/fax_get_response.rb create mode 100644 lib/dropbox-sign/models/fax_list_response.rb create mode 100644 lib/dropbox-sign/models/fax_response.rb create mode 100644 lib/dropbox-sign/models/fax_response_transmission.rb create mode 100644 lib/dropbox-sign/models/fax_send_request.rb create mode 100644 test_fixtures/FaxGetResponse.json create mode 100644 test_fixtures/FaxListResponse.json create mode 100644 test_fixtures/FaxSendRequest.json create mode 100644 test_fixtures/FaxSendResponse.json diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 0e56ede..0c9590e 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -19,6 +19,9 @@ jobs: - name: Build SDK run: ./run-build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status diff --git a/.travis.yml b/.travis.yml index 1153d92..b6e958d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.6.1.gem + - gem install ./dropbox-sign-1.7.0.gem diff --git a/Gemfile.lock b/Gemfile.lock index a8c88a4..d902a82 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.6.1) + dropbox-sign (1.7.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 717025e..f48a702 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ directory that corresponds to the file you want updated. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.6.1 +- Package version: 1.7.0 - Generator version: 7.8.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen @@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.6.1.gem +gem install ./dropbox-sign-1.7.0.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.6.1.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.7.0.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.6.1' + gem 'dropbox-sign', '~> 1.7.0' ### Install from Git @@ -121,6 +121,11 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::BulkSendJobApi* | [**bulk_send_job_list**](docs/BulkSendJobApi.md#bulk_send_job_list) | **GET** /bulk_send_job/list | List Bulk Send Jobs | |*Dropbox::Sign::EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | |*Dropbox::Sign::EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | +|*Dropbox::Sign::FaxApi* | [**fax_delete**](docs/FaxApi.md#fax_delete) | **DELETE** /fax/{fax_id} | Delete Fax | +|*Dropbox::Sign::FaxApi* | [**fax_files**](docs/FaxApi.md#fax_files) | **GET** /fax/files/{fax_id} | List Fax Files | +|*Dropbox::Sign::FaxApi* | [**fax_get**](docs/FaxApi.md#fax_get) | **GET** /fax/{fax_id} | Get Fax | +|*Dropbox::Sign::FaxApi* | [**fax_list**](docs/FaxApi.md#fax_list) | **GET** /fax/list | Lists Faxes | +|*Dropbox::Sign::FaxApi* | [**fax_send**](docs/FaxApi.md#fax_send) | **POST** /fax/send | Send Fax | |*Dropbox::Sign::FaxLineApi* | [**fax_line_add_user**](docs/FaxLineApi.md#fax_line_add_user) | **PUT** /fax_line/add_user | Add Fax Line User | |*Dropbox::Sign::FaxLineApi* | [**fax_line_area_code_get**](docs/FaxLineApi.md#fax_line_area_code_get) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes | |*Dropbox::Sign::FaxLineApi* | [**fax_line_create**](docs/FaxLineApi.md#fax_line_create) | **POST** /fax_line/create | Purchase Fax Line | @@ -158,7 +163,7 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::TeamApi* | [**team_sub_teams**](docs/TeamApi.md#team_sub_teams) | **GET** /team/sub_teams/{team_id} | List Sub Teams | |*Dropbox::Sign::TeamApi* | [**team_update**](docs/TeamApi.md#team_update) | **PUT** /team | Update Team | |*Dropbox::Sign::TemplateApi* | [**template_add_user**](docs/TemplateApi.md#template_add_user) | **POST** /template/add_user/{template_id} | Add User to Template | -|*Dropbox::Sign::TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template | +|*Dropbox::Sign::TemplateApi* | [**template_create**](docs/TemplateApi.md#template_create) | **POST** /template/create | Create Template | |*Dropbox::Sign::TemplateApi* | [**template_create_embedded_draft**](docs/TemplateApi.md#template_create_embedded_draft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft | |*Dropbox::Sign::TemplateApi* | [**template_delete**](docs/TemplateApi.md#template_delete) | **POST** /template/delete/{template_id} | Delete Template | |*Dropbox::Sign::TemplateApi* | [**template_files**](docs/TemplateApi.md#template_files) | **GET** /template/files/{template_id} | Get Template Files | @@ -210,6 +215,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::EventCallbackRequest](docs/EventCallbackRequest.md) - [Dropbox::Sign::EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [Dropbox::Sign::EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [Dropbox::Sign::FaxGetResponse](docs/FaxGetResponse.md) - [Dropbox::Sign::FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [Dropbox::Sign::FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [Dropbox::Sign::FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -221,6 +227,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [Dropbox::Sign::FaxLineResponse](docs/FaxLineResponse.md) - [Dropbox::Sign::FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [Dropbox::Sign::FaxListResponse](docs/FaxListResponse.md) + - [Dropbox::Sign::FaxResponse](docs/FaxResponse.md) + - [Dropbox::Sign::FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [Dropbox::Sign::FaxSendRequest](docs/FaxSendRequest.md) - [Dropbox::Sign::FileResponse](docs/FileResponse.md) - [Dropbox::Sign::FileResponseDataUri](docs/FileResponseDataUri.md) - [Dropbox::Sign::ListInfoResponse](docs/ListInfoResponse.md) diff --git a/VERSION b/VERSION index 9c6d629..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.7.0 diff --git a/docs/AccountResponseQuotas.md b/docs/AccountResponseQuotas.md index 2a6b0c9..2b96ba9 100644 --- a/docs/AccountResponseQuotas.md +++ b/docs/AccountResponseQuotas.md @@ -10,6 +10,6 @@ Details concerning remaining monthly quotas. | `documents_left` | ```Integer``` | Signature requests remaining. | | | `templates_total` | ```Integer``` | Total API templates allowed. | | | `templates_left` | ```Integer``` | API templates remaining. | | -| `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | +| `sms_verifications_left` | ```Integer``` | SMS verifications remaining. | | | `num_fax_pages_left` | ```Integer``` | Number of fax pages left | | diff --git a/docs/FaxApi.md b/docs/FaxApi.md new file mode 100644 index 0000000..23129b6 --- /dev/null +++ b/docs/FaxApi.md @@ -0,0 +1,364 @@ +# Dropbox::Sign::FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [`fax_delete`](FaxApi.md#fax_delete) | **DELETE** `/fax/{fax_id}` | Delete Fax | +| [`fax_files`](FaxApi.md#fax_files) | **GET** `/fax/files/{fax_id}` | List Fax Files | +| [`fax_get`](FaxApi.md#fax_get) | **GET** `/fax/{fax_id}` | Get Fax | +| [`fax_list`](FaxApi.md#fax_list) | **GET** `/fax/list` | Lists Faxes | +| [`fax_send`](FaxApi.md#fax_send) | **POST** `/fax/send` | Send Fax | + + +## `fax_delete` + +> `fax_delete(fax_id)` + +Delete Fax + +Deletes the specified Fax from the system. + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +begin + fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_delete_with_http_info` variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> ` fax_delete_with_http_info(fax_id)` + +```ruby +begin + # Delete Fax + data, status_code, headers = api_instance.fax_delete_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_delete_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +nil (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_files` + +> `File fax_files(fax_id)` + +List Fax Files + +Returns list of fax files + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + +begin + file_bin = fax_api.fax_files(data) + FileUtils.cp(file_bin.path, "path/to/file.pdf") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_files_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> ` fax_files_with_http_info(fax_id)` + +```ruby +begin + # List Fax Files + data, status_code, headers = api_instance.fax_files_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => File +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_files_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +**File** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + + +## `fax_get` + +> ` fax_get(fax_id)` + +Get Fax + +Returns information about fax + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + +begin + result = fax_api.fax_get(fax_id) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_get_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_get_with_http_info(fax_id)` + +```ruby +begin + # Get Fax + data, status_code, headers = api_instance.fax_get_with_http_info(fax_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id` | **String** | Fax ID | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_list` + +> ` fax_list(opts)` + +Lists Faxes + +Returns properties of multiple faxes + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +page = 1 +page_size = 2 + +begin + result = fax_api.fax_list({ page: page, page_size: page_size }) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_list_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_list_with_http_info(opts)` + +```ruby +begin + # Lists Faxes + data, status_code, headers = api_instance.fax_list_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_list_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `page` | **Integer** | Page | [optional][default to 1] | +| `page_size` | **Integer** | Page size | [optional][default to 20] | + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## `fax_send` + +> ` fax_send(fax_send_request)` + +Send Fax + +Action to prepare and send a fax + +### Examples + +```ruby +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +data = Dropbox::Sign::FaxSendRequest.new +data.files = [File.new("example_signature_request.pdf", "r")] +data.test_mode = true +data.recipient = "16690000001" +data.sender = "16690000000" +data.cover_page_to = "Jill Fax" +data.cover_page_message = "I'm sending you a fax!" +data.cover_page_from = "Faxer Faxerson" +data.title = "This is what the fax is about!" + +begin + result = fax_api.fax_send(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end + +``` + +#### Using the `fax_send_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> fax_send_with_http_info(fax_send_request)` + +```ruby +begin + # Send Fax + data, status_code, headers = api_instance.fax_send_with_http_info(fax_send_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling FaxApi->fax_send_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_send_request` | [**FaxSendRequest**](FaxSendRequest.md) | | | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + diff --git a/docs/FaxGetResponse.md b/docs/FaxGetResponse.md new file mode 100644 index 0000000..3973226 --- /dev/null +++ b/docs/FaxGetResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```Array```](WarningResponse.md) | A list of warnings. | | + diff --git a/docs/FaxListResponse.md b/docs/FaxListResponse.md new file mode 100644 index 0000000..4ad86e4 --- /dev/null +++ b/docs/FaxListResponse.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `faxes`*_required_ | [```Array```](FaxResponse.md) | | | +| `list_info`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + diff --git a/docs/FaxResponse.md b/docs/FaxResponse.md new file mode 100644 index 0000000..68c864b --- /dev/null +++ b/docs/FaxResponse.md @@ -0,0 +1,19 @@ +# Dropbox::Sign::FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `fax_id`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `original_title`*_required_ | ```String``` | Fax Original Title | | +| `subject`*_required_ | ```String``` | Fax Subject | | +| `message`*_required_ | ```String``` | Fax Message | | +| `metadata`*_required_ | ```Hash``` | Fax Metadata | | +| `created_at`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `transmissions`*_required_ | [```Array```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `files_url`*_required_ | ```String``` | Fax Files URL | | + diff --git a/docs/FaxResponseTransmission.md b/docs/FaxResponseTransmission.md new file mode 100644 index 0000000..5ec3946 --- /dev/null +++ b/docs/FaxResponseTransmission.md @@ -0,0 +1,13 @@ +# Dropbox::Sign::FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```String``` | Fax Transmission Sender | | +| `status_code`*_required_ | ```String``` | Fax Transmission Status Code | | +| `sent_at` | ```Integer``` | Fax Transmission Sent Timestamp | | + diff --git a/docs/FaxSendRequest.md b/docs/FaxSendRequest.md new file mode 100644 index 0000000..6217af9 --- /dev/null +++ b/docs/FaxSendRequest.md @@ -0,0 +1,18 @@ +# Dropbox::Sign::FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```Array``` | Fax File to Send | | +| `file_urls` | ```Array``` | Fax File URL to Send | | +| `test_mode` | ```Boolean``` | API Test Mode Setting | [default to false] | +| `cover_page_to` | ```String``` | Fax Cover Page for Recipient | | +| `cover_page_from` | ```String``` | Fax Cover Page for Sender | | +| `cover_page_message` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md index fe729fe..4bd1757 100644 --- a/docs/OAuthTokenRefreshRequest.md +++ b/docs/OAuthTokenRefreshRequest.md @@ -8,4 +8,6 @@ | ---- | ---- | ----------- | ----- | | `grant_type`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | [default to 'refresh_token'] | | `refresh_token`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `client_id` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `client_secret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index 7bc3482..0261ffa 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -249,7 +249,7 @@ end Cancel Incomplete Signature Request -Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. +Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. ### Examples diff --git a/docs/SubWhiteLabelingOptions.md b/docs/SubWhiteLabelingOptions.md index cf92be6..5be083c 100644 --- a/docs/SubWhiteLabelingOptions.md +++ b/docs/SubWhiteLabelingOptions.md @@ -8,19 +8,19 @@ Take a look at our [white labeling guide](https://developers.hellosign.com/api/r | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `header_background_color` | ```String``` | | [default to '#1A1A1A'] | +| `header_background_color` | ```String``` | | [default to '#1a1a1a'] | | `legal_version` | ```String``` | | [default to 'terms1'] | -| `link_color` | ```String``` | | [default to '#00B3E6'] | -| `page_background_color` | ```String``` | | [default to '#F7F8F9'] | -| `primary_button_color` | ```String``` | | [default to '#00B3E6'] | -| `primary_button_color_hover` | ```String``` | | [default to '#00B3E6'] | -| `primary_button_text_color` | ```String``` | | [default to '#FFFFFF'] | -| `primary_button_text_color_hover` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_color` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_color_hover` | ```String``` | | [default to '#FFFFFF'] | -| `secondary_button_text_color` | ```String``` | | [default to '#00B3E6'] | -| `secondary_button_text_color_hover` | ```String``` | | [default to '#00B3E6'] | +| `link_color` | ```String``` | | [default to '#0061FE'] | +| `page_background_color` | ```String``` | | [default to '#f7f8f9'] | +| `primary_button_color` | ```String``` | | [default to '#0061FE'] | +| `primary_button_color_hover` | ```String``` | | [default to '#0061FE'] | +| `primary_button_text_color` | ```String``` | | [default to '#ffffff'] | +| `primary_button_text_color_hover` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_color` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_color_hover` | ```String``` | | [default to '#ffffff'] | +| `secondary_button_text_color` | ```String``` | | [default to '#0061FE'] | +| `secondary_button_text_color_hover` | ```String``` | | [default to '#0061FE'] | | `text_color1` | ```String``` | | [default to '#808080'] | -| `text_color2` | ```String``` | | [default to '#FFFFFF'] | +| `text_color2` | ```String``` | | [default to '#ffffff'] | | `reset_to_default` | ```Boolean``` | Resets white labeling options to defaults. Only useful when updating an API App. | | diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index 3e9361b..bcd27fa 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [`template_add_user`](TemplateApi.md#template_add_user) | **POST** `/template/add_user/{template_id}` | Add User to Template | -| [`template_create`](TemplateApi.md#template_create) | **POST** `/template/create` | Create Template | +| [`template_create`](TemplateApi.md#template_create) | **POST** `/template/create` | Create Template | | [`template_create_embedded_draft`](TemplateApi.md#template_create_embedded_draft) | **POST** `/template/create_embedded_draft` | Create Embedded Template Draft | | [`template_delete`](TemplateApi.md#template_delete) | **POST** `/template/delete/{template_id}` | Delete Template | | [`template_files`](TemplateApi.md#template_files) | **GET** `/template/files/{template_id}` | Get Template Files | @@ -97,7 +97,7 @@ end > ` template_create(template_create_request)` -Create Template +Create Template Creates a template that can then be used. @@ -164,7 +164,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Create Template + # Create Template data, status_code, headers = api_instance.template_create_with_http_info(template_create_request) p status_code # => 2xx p headers # => { ... } diff --git a/docs/TemplateResponse.md b/docs/TemplateResponse.md index 18c191b..792e16a 100644 --- a/docs/TemplateResponse.md +++ b/docs/TemplateResponse.md @@ -10,7 +10,7 @@ Contains information about the templates you and your team have created. | `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updated_at` | ```Integer``` | Time the template was last updated. | | -| `is_embedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `is_embedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `is_creator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `can_edit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `is_locked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -21,4 +21,5 @@ Contains information about the templates you and your team have created. | `custom_fields` | [```Array```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `named_form_fields` | [```Array```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```Array```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```Array```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/docs/TemplateResponseDocumentFormFieldBase.md b/docs/TemplateResponseDocumentFormFieldBase.md index 52620dc..381c481 100644 --- a/docs/TemplateResponseDocumentFormFieldBase.md +++ b/docs/TemplateResponseDocumentFormFieldBase.md @@ -15,5 +15,4 @@ An array of Form Field objects containing the name and type of each named field. | `width` | ```Integer``` | The width in pixels of this form field. | | | `height` | ```Integer``` | The height in pixels of this form field. | | | `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldCheckbox.md b/docs/TemplateResponseDocumentFormFieldCheckbox.md index 9eb4d6e..13dd5cb 100644 --- a/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'checkbox'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldDateSigned.md b/docs/TemplateResponseDocumentFormFieldDateSigned.md index 3c1a452..253d8b4 100644 --- a/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'date_signed'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldDropdown.md b/docs/TemplateResponseDocumentFormFieldDropdown.md index adf242b..b224d10 100644 --- a/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'dropdown'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldHyperlink.md b/docs/TemplateResponseDocumentFormFieldHyperlink.md index 7c6059a..2bf06c0 100644 --- a/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -11,4 +11,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `is_multiline` | ```Boolean``` | Whether this form field is multiline text. | | | `original_font_size` | ```Integer``` | Original font size used in this form field's text. | | | `font_family` | ```String``` | Font family used in this form field's text. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldInitials.md b/docs/TemplateResponseDocumentFormFieldInitials.md index de0250a..63387d3 100644 --- a/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/docs/TemplateResponseDocumentFormFieldInitials.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'initials'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldRadio.md b/docs/TemplateResponseDocumentFormFieldRadio.md index ef2728b..fcdc459 100644 --- a/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/docs/TemplateResponseDocumentFormFieldRadio.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'radio'] | +| `group`*_required_ | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldSignature.md b/docs/TemplateResponseDocumentFormFieldSignature.md index fd9e2b2..552a3c8 100644 --- a/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/docs/TemplateResponseDocumentFormFieldSignature.md @@ -7,4 +7,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to 'signature'] | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldText.md b/docs/TemplateResponseDocumentFormFieldText.md index c35a1e3..7bfe702 100644 --- a/docs/TemplateResponseDocumentFormFieldText.md +++ b/docs/TemplateResponseDocumentFormFieldText.md @@ -12,4 +12,5 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `original_font_size` | ```Integer``` | Original font size used in this form field's text. | | | `font_family` | ```String``` | Font family used in this form field's text. | | | `validation_type` | ```String``` | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/examples/FaxDelete.rb b/examples/FaxDelete.rb new file mode 100644 index 0000000..f68be34 --- /dev/null +++ b/examples/FaxDelete.rb @@ -0,0 +1,14 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +begin + fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxFiles.rb b/examples/FaxFiles.rb new file mode 100644 index 0000000..8f4955d --- /dev/null +++ b/examples/FaxFiles.rb @@ -0,0 +1,17 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + +begin + file_bin = fax_api.fax_files(data) + FileUtils.cp(file_bin.path, "path/to/file.pdf") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxGet.rb b/examples/FaxGet.rb new file mode 100644 index 0000000..64dc1c0 --- /dev/null +++ b/examples/FaxGet.rb @@ -0,0 +1,17 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" + +begin + result = fax_api.fax_get(fax_id) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxList.rb b/examples/FaxList.rb new file mode 100644 index 0000000..3f37a71 --- /dev/null +++ b/examples/FaxList.rb @@ -0,0 +1,18 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +page = 1 +page_size = 2 + +begin + result = fax_api.fax_list({ page: page, page_size: page_size }) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/examples/FaxSend.rb b/examples/FaxSend.rb new file mode 100644 index 0000000..c37cbbd --- /dev/null +++ b/examples/FaxSend.rb @@ -0,0 +1,25 @@ +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + # Configure HTTP basic authorization: api_key + config.username = "YOUR_API_KEY" +end + +fax_api = Dropbox::Sign::FaxApi.new + +data = Dropbox::Sign::FaxSendRequest.new +data.files = [File.new("example_signature_request.pdf", "r")] +data.test_mode = true +data.recipient = "16690000001" +data.sender = "16690000000" +data.cover_page_to = "Jill Fax" +data.cover_page_message = "I'm sending you a fax!" +data.cover_page_from = "Faxer Faxerson" +data.title = "This is what the fax is about!" + +begin + result = fax_api.fax_send(data) + p result +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling Dropbox Sign API: #{e}" +end diff --git a/lib/dropbox-sign.rb b/lib/dropbox-sign.rb index 147b296..0921573 100644 --- a/lib/dropbox-sign.rb +++ b/lib/dropbox-sign.rb @@ -51,6 +51,7 @@ require 'dropbox-sign/models/event_callback_request' require 'dropbox-sign/models/event_callback_request_event' require 'dropbox-sign/models/event_callback_request_event_metadata' +require 'dropbox-sign/models/fax_get_response' require 'dropbox-sign/models/fax_line_add_user_request' require 'dropbox-sign/models/fax_line_area_code_get_country_enum' require 'dropbox-sign/models/fax_line_area_code_get_province_enum' @@ -62,6 +63,10 @@ require 'dropbox-sign/models/fax_line_remove_user_request' require 'dropbox-sign/models/fax_line_response' require 'dropbox-sign/models/fax_line_response_fax_line' +require 'dropbox-sign/models/fax_list_response' +require 'dropbox-sign/models/fax_response' +require 'dropbox-sign/models/fax_response_transmission' +require 'dropbox-sign/models/fax_send_request' require 'dropbox-sign/models/file_response' require 'dropbox-sign/models/file_response_data_uri' require 'dropbox-sign/models/list_info_response' @@ -206,6 +211,7 @@ require 'dropbox-sign/api/api_app_api' require 'dropbox-sign/api/bulk_send_job_api' require 'dropbox-sign/api/embedded_api' +require 'dropbox-sign/api/fax_api' require 'dropbox-sign/api/fax_line_api' require 'dropbox-sign/api/o_auth_api' require 'dropbox-sign/api/report_api' diff --git a/lib/dropbox-sign/api/fax_api.rb b/lib/dropbox-sign/api/fax_api.rb new file mode 100644 index 0000000..17fca79 --- /dev/null +++ b/lib/dropbox-sign/api/fax_api.rb @@ -0,0 +1,495 @@ +=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.8.0 + +=end + +require 'cgi' + +module Dropbox +end + +module Dropbox::Sign + class FaxApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Delete Fax + # Deletes the specified Fax from the system. + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [nil] + def fax_delete(fax_id, opts = {}) + fax_delete_with_http_info(fax_id, opts) + nil + end + + # Delete Fax + # Deletes the specified Fax from the system. + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def fax_delete_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_delete ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_delete" + end + # resource path + local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_delete", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Fax Files + # Returns list of fax files + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [File] + def fax_files(fax_id, opts = {}) + data, _status_code, _headers = fax_files_with_http_info(fax_id, opts) + data + end + + # List Fax Files + # Returns list of fax files + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def fax_files_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_files ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_files" + end + # resource path + local_var_path = '/fax/files/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_files", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::File" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Fax + # Returns information about fax + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [FaxGetResponse] + def fax_get(fax_id, opts = {}) + data, _status_code, _headers = fax_get_with_http_info(fax_id, opts) + data + end + + # Get Fax + # Returns information about fax + # @param fax_id [String] Fax ID + # @param [Hash] opts the optional parameters + # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers + def fax_get_with_http_info(fax_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_get ...' + end + # verify the required parameter 'fax_id' is set + if @api_client.config.client_side_validation && fax_id.nil? + fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_get" + end + # resource path + local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Lists Faxes + # Returns properties of multiple faxes + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page (default to 1) + # @option opts [Integer] :page_size Page size (default to 20) + # @return [FaxListResponse] + def fax_list(opts = {}) + data, _status_code, _headers = fax_list_with_http_info(opts) + data + end + + # Lists Faxes + # Returns properties of multiple faxes + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page (default to 1) + # @option opts [Integer] :page_size Page size (default to 20) + # @return [Array<(FaxListResponse, Integer, Hash)>] FaxListResponse data, response status code and response headers + def fax_list_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_list ...' + end + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FaxApi.fax_list, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/fax/list' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + post_body = {} + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FaxListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_list", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxListResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Send Fax + # Action to prepare and send a fax + # @param fax_send_request [FaxSendRequest] + # @param [Hash] opts the optional parameters + # @return [FaxGetResponse] + def fax_send(fax_send_request, opts = {}) + data, _status_code, _headers = fax_send_with_http_info(fax_send_request, opts) + data + end + + # Send Fax + # Action to prepare and send a fax + # @param fax_send_request [FaxSendRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers + def fax_send_with_http_info(fax_send_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FaxApi.fax_send ...' + end + # verify the required parameter 'fax_send_request' is set + if @api_client.config.client_side_validation && fax_send_request.nil? + fail ArgumentError, "Missing the required parameter 'fax_send_request' when calling FaxApi.fax_send" + end + # resource path + local_var_path = '/fax/send' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + fax_send_request, + Dropbox::Sign::FaxSendRequest.openapi_types + ) + + # form parameters + if result[:has_file] + form_params = opts[:form_params] || result[:params] + header_params['Content-Type'] = 'multipart/form-data' + else + # http body (model) + post_body = opts[:debug_body] || result[:params] + end + + # return_type + return_type = opts[:debug_return_type] || 'FaxGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"FaxApi.fax_send", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::FaxGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FaxApi#fax_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/dropbox-sign/api/o_auth_api.rb b/lib/dropbox-sign/api/o_auth_api.rb index eb0c677..6e9d748 100644 --- a/lib/dropbox-sign/api/o_auth_api.rb +++ b/lib/dropbox-sign/api/o_auth_api.rb @@ -108,6 +108,20 @@ def oauth_token_generate_with_http_info(o_auth_token_generate_request, opts = {} e.message end + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end end @@ -203,6 +217,20 @@ def oauth_token_refresh_with_http_info(o_auth_token_refresh_request, opts = {}) e.message end + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end end diff --git a/lib/dropbox-sign/api/signature_request_api.rb b/lib/dropbox-sign/api/signature_request_api.rb index 4389409..d61d27b 100644 --- a/lib/dropbox-sign/api/signature_request_api.rb +++ b/lib/dropbox-sign/api/signature_request_api.rb @@ -241,7 +241,7 @@ def signature_request_bulk_send_with_template_with_http_info(signature_request_b end # Cancel Incomplete Signature Request - # Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + # Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. # @param signature_request_id [String] The id of the incomplete SignatureRequest to cancel. # @param [Hash] opts the optional parameters # @return [nil] @@ -251,7 +251,7 @@ def signature_request_cancel(signature_request_id, opts = {}) end # Cancel Incomplete Signature Request - # Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + # Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. # @param signature_request_id [String] The id of the incomplete SignatureRequest to cancel. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers diff --git a/lib/dropbox-sign/api/template_api.rb b/lib/dropbox-sign/api/template_api.rb index 445ee2b..7b6e4ac 100644 --- a/lib/dropbox-sign/api/template_api.rb +++ b/lib/dropbox-sign/api/template_api.rb @@ -137,7 +137,7 @@ def template_add_user_with_http_info(template_id, template_add_user_request, opt return data, status_code, headers end - # Create Template + # Create Template # Creates a template that can then be used. # @param template_create_request [TemplateCreateRequest] # @param [Hash] opts the optional parameters @@ -147,7 +147,7 @@ def template_create(template_create_request, opts = {}) data end - # Create Template + # Create Template # Creates a template that can then be used. # @param template_create_request [TemplateCreateRequest] # @param [Hash] opts the optional parameters diff --git a/lib/dropbox-sign/models/account_response_quotas.rb b/lib/dropbox-sign/models/account_response_quotas.rb index 03ac489..fd718d6 100644 --- a/lib/dropbox-sign/models/account_response_quotas.rb +++ b/lib/dropbox-sign/models/account_response_quotas.rb @@ -35,7 +35,7 @@ class AccountResponseQuotas # @return [Integer, nil] attr_accessor :templates_left - # SMS verifications remaining. + # SMS verifications remaining. # @return [Integer, nil] attr_accessor :sms_verifications_left 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 c17650a..c861200 100644 --- a/lib/dropbox-sign/models/api_app_response_o_auth.rb +++ b/lib/dropbox-sign/models/api_app_response_o_auth.rb @@ -24,7 +24,7 @@ class ApiAppResponseOAuth attr_accessor :callback_url # The app's OAuth secret, or null if the app does not belong to user. - # @return [String] + # @return [String, nil] attr_accessor :secret # Array of OAuth scopes used by the app. @@ -63,6 +63,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'secret', ]) end diff --git a/lib/dropbox-sign/models/fax_get_response.rb b/lib/dropbox-sign/models/fax_get_response.rb new file mode 100644 index 0000000..a774af3 --- /dev/null +++ b/lib/dropbox-sign/models/fax_get_response.rb @@ -0,0 +1,263 @@ +=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.8.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxGetResponse + # @return [FaxResponse] + attr_accessor :fax + + # A list of warnings. + # @return [Array] + attr_accessor :warnings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax' => :'fax', + :'warnings' => :'warnings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax' => :'FaxResponse', + :'warnings' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + 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 [FaxGetResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxGetResponse" + ) || FaxGetResponse.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::FaxGetResponse` 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::FaxGetResponse`. 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') + self.fax = attributes[:'fax'] + end + + if attributes.key?(:'warnings') + if (value = attributes[:'warnings']).is_a?(Array) + self.warnings = value + end + 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 + if @fax.nil? + invalid_properties.push('invalid value for "fax", fax cannot be nil.') + end + + 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? + return false if @fax.nil? + 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 == o.fax && + warnings == o.warnings + 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, warnings].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 + 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/fax_list_response.rb b/lib/dropbox-sign/models/fax_list_response.rb new file mode 100644 index 0000000..a06e7fe --- /dev/null +++ b/lib/dropbox-sign/models/fax_list_response.rb @@ -0,0 +1,267 @@ +=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.8.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxListResponse + # @return [Array] + attr_accessor :faxes + + # @return [ListInfoResponse] + attr_accessor :list_info + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'faxes' => :'faxes', + :'list_info' => :'list_info' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'faxes' => :'Array', + :'list_info' => :'ListInfoResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + 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 [FaxListResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxListResponse" + ) || FaxListResponse.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::FaxListResponse` 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::FaxListResponse`. 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?(:'faxes') + if (value = attributes[:'faxes']).is_a?(Array) + self.faxes = value + end + end + + if attributes.key?(:'list_info') + self.list_info = attributes[:'list_info'] + 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 + if @faxes.nil? + invalid_properties.push('invalid value for "faxes", faxes cannot be nil.') + end + + if @list_info.nil? + invalid_properties.push('invalid value for "list_info", list_info cannot be nil.') + end + + 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? + return false if @faxes.nil? + return false if @list_info.nil? + 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 && + faxes == o.faxes && + list_info == o.list_info + 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 + [faxes, list_info].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 + 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/fax_response.rb b/lib/dropbox-sign/models/fax_response.rb new file mode 100644 index 0000000..a7c8847 --- /dev/null +++ b/lib/dropbox-sign/models/fax_response.rb @@ -0,0 +1,399 @@ +=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.8.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxResponse + # Fax ID + # @return [String] + attr_accessor :fax_id + + # Fax Title + # @return [String] + attr_accessor :title + + # Fax Original Title + # @return [String] + attr_accessor :original_title + + # Fax Subject + # @return [String] + attr_accessor :subject + + # Fax Message + # @return [String] + attr_accessor :message + + # Fax Metadata + # @return [Hash] + attr_accessor :metadata + + # Fax Created At Timestamp + # @return [Integer] + attr_accessor :created_at + + # Fax Sender Email + # @return [String] + attr_accessor :sender + + # Fax Transmissions List + # @return [Array] + attr_accessor :transmissions + + # Fax Files URL + # @return [String] + attr_accessor :files_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fax_id' => :'fax_id', + :'title' => :'title', + :'original_title' => :'original_title', + :'subject' => :'subject', + :'message' => :'message', + :'metadata' => :'metadata', + :'created_at' => :'created_at', + :'sender' => :'sender', + :'transmissions' => :'transmissions', + :'files_url' => :'files_url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'fax_id' => :'String', + :'title' => :'String', + :'original_title' => :'String', + :'subject' => :'String', + :'message' => :'String', + :'metadata' => :'Hash', + :'created_at' => :'Integer', + :'sender' => :'String', + :'transmissions' => :'Array', + :'files_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + 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 [FaxResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxResponse" + ) || FaxResponse.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::FaxResponse` 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::FaxResponse`. 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_id') + self.fax_id = attributes[:'fax_id'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'original_title') + self.original_title = attributes[:'original_title'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + end + + if attributes.key?(:'transmissions') + if (value = attributes[:'transmissions']).is_a?(Array) + self.transmissions = value + end + end + + if attributes.key?(:'files_url') + self.files_url = attributes[:'files_url'] + 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 + if @fax_id.nil? + invalid_properties.push('invalid value for "fax_id", fax_id cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @original_title.nil? + invalid_properties.push('invalid value for "original_title", original_title cannot be nil.') + end + + if @subject.nil? + invalid_properties.push('invalid value for "subject", subject cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @metadata.nil? + invalid_properties.push('invalid value for "metadata", metadata cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @sender.nil? + invalid_properties.push('invalid value for "sender", sender cannot be nil.') + end + + if @transmissions.nil? + invalid_properties.push('invalid value for "transmissions", transmissions cannot be nil.') + end + + if @files_url.nil? + invalid_properties.push('invalid value for "files_url", files_url cannot be nil.') + end + + 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? + return false if @fax_id.nil? + return false if @title.nil? + return false if @original_title.nil? + return false if @subject.nil? + return false if @message.nil? + return false if @metadata.nil? + return false if @created_at.nil? + return false if @sender.nil? + return false if @transmissions.nil? + return false if @files_url.nil? + 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_id == o.fax_id && + title == o.title && + original_title == o.original_title && + subject == o.subject && + message == o.message && + metadata == o.metadata && + created_at == o.created_at && + sender == o.sender && + transmissions == o.transmissions && + files_url == o.files_url + 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_id, title, original_title, subject, message, metadata, created_at, sender, transmissions, files_url].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 + 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/fax_response_transmission.rb b/lib/dropbox-sign/models/fax_response_transmission.rb new file mode 100644 index 0000000..a6c49bb --- /dev/null +++ b/lib/dropbox-sign/models/fax_response_transmission.rb @@ -0,0 +1,328 @@ +=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.8.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxResponseTransmission + # Fax Transmission Recipient + # @return [String] + attr_accessor :recipient + + # Fax Transmission Sender + # @return [String] + attr_accessor :sender + + # Fax Transmission Status Code + # @return [String] + attr_accessor :status_code + + # Fax Transmission Sent Timestamp + # @return [Integer] + attr_accessor :sent_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recipient' => :'recipient', + :'sender' => :'sender', + :'status_code' => :'status_code', + :'sent_at' => :'sent_at' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recipient' => :'String', + :'sender' => :'String', + :'status_code' => :'String', + :'sent_at' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + 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 [FaxResponseTransmission] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxResponseTransmission" + ) || FaxResponseTransmission.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::FaxResponseTransmission` 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::FaxResponseTransmission`. 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?(:'recipient') + self.recipient = attributes[:'recipient'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'sent_at') + self.sent_at = attributes[:'sent_at'] + 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 + if @recipient.nil? + invalid_properties.push('invalid value for "recipient", recipient cannot be nil.') + end + + if @sender.nil? + invalid_properties.push('invalid value for "sender", sender cannot be nil.') + end + + if @status_code.nil? + invalid_properties.push('invalid value for "status_code", status_code cannot be nil.') + end + + 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? + return false if @recipient.nil? + return false if @sender.nil? + return false if @status_code.nil? + status_code_validator = EnumAttributeValidator.new('String', ["success", "transmitting", "error_could_not_fax", "error_unknown", "error_busy", "error_no_answer", "error_disconnected", "error_bad_destination"]) + return false unless status_code_validator.valid?(@status_code) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status_code Object to be assigned + def status_code=(status_code) + validator = EnumAttributeValidator.new('String', ["success", "transmitting", "error_could_not_fax", "error_unknown", "error_busy", "error_no_answer", "error_disconnected", "error_bad_destination"]) + unless validator.valid?(status_code) + fail ArgumentError, "invalid value for \"status_code\", must be one of #{validator.allowable_values}." + end + @status_code = status_code + 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 && + recipient == o.recipient && + sender == o.sender && + status_code == o.status_code && + sent_at == o.sent_at + 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 + [recipient, sender, status_code, sent_at].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 + 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/fax_send_request.rb b/lib/dropbox-sign/models/fax_send_request.rb new file mode 100644 index 0000000..18616ce --- /dev/null +++ b/lib/dropbox-sign/models/fax_send_request.rb @@ -0,0 +1,345 @@ +=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.8.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class FaxSendRequest + # Fax Send To Recipient + # @return [String] + attr_accessor :recipient + + # Fax Send From Sender (used only with fax number) + # @return [String] + attr_accessor :sender + + # Fax File to Send + # @return [Array] + attr_accessor :files + + # Fax File URL to Send + # @return [Array] + attr_accessor :file_urls + + # API Test Mode Setting + # @return [Boolean] + attr_accessor :test_mode + + # Fax Cover Page for Recipient + # @return [String] + attr_accessor :cover_page_to + + # Fax Cover Page for Sender + # @return [String] + attr_accessor :cover_page_from + + # Fax Cover Page Message + # @return [String] + attr_accessor :cover_page_message + + # Fax Title + # @return [String] + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recipient' => :'recipient', + :'sender' => :'sender', + :'files' => :'files', + :'file_urls' => :'file_urls', + :'test_mode' => :'test_mode', + :'cover_page_to' => :'cover_page_to', + :'cover_page_from' => :'cover_page_from', + :'cover_page_message' => :'cover_page_message', + :'title' => :'title' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recipient' => :'String', + :'sender' => :'String', + :'files' => :'Array', + :'file_urls' => :'Array', + :'test_mode' => :'Boolean', + :'cover_page_to' => :'String', + :'cover_page_from' => :'String', + :'cover_page_message' => :'String', + :'title' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + 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 [FaxSendRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "FaxSendRequest" + ) || FaxSendRequest.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::FaxSendRequest` 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::FaxSendRequest`. 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?(:'recipient') + self.recipient = attributes[:'recipient'] + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'file_urls') + if (value = attributes[:'file_urls']).is_a?(Array) + self.file_urls = value + end + end + + if attributes.key?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'cover_page_to') + self.cover_page_to = attributes[:'cover_page_to'] + end + + if attributes.key?(:'cover_page_from') + self.cover_page_from = attributes[:'cover_page_from'] + end + + if attributes.key?(:'cover_page_message') + self.cover_page_message = attributes[:'cover_page_message'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + 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 + if @recipient.nil? + invalid_properties.push('invalid value for "recipient", recipient cannot be nil.') + end + + 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? + return false if @recipient.nil? + 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 && + recipient == o.recipient && + sender == o.sender && + files == o.files && + file_urls == o.file_urls && + test_mode == o.test_mode && + cover_page_to == o.cover_page_to && + cover_page_from == o.cover_page_from && + cover_page_message == o.cover_page_message && + title == o.title + 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 + [recipient, sender, files, file_urls, test_mode, cover_page_to, cover_page_from, cover_page_message, title].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 + 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/o_auth_token_refresh_request.rb b/lib/dropbox-sign/models/o_auth_token_refresh_request.rb index 7628e0b..3ac7321 100644 --- a/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +++ b/lib/dropbox-sign/models/o_auth_token_refresh_request.rb @@ -26,11 +26,21 @@ class OAuthTokenRefreshRequest # @return [String] attr_accessor :refresh_token + # The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # @return [String] + attr_accessor :client_id + + # The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the \"Client Credentials Required\" setting is enabled for token refresh; optional if disabled. + # @return [String] + attr_accessor :client_secret + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'grant_type' => :'grant_type', - :'refresh_token' => :'refresh_token' + :'refresh_token' => :'refresh_token', + :'client_id' => :'client_id', + :'client_secret' => :'client_secret' } end @@ -43,7 +53,9 @@ def self.acceptable_attributes def self.openapi_types { :'grant_type' => :'String', - :'refresh_token' => :'String' + :'refresh_token' => :'String', + :'client_id' => :'String', + :'client_secret' => :'String' } end @@ -102,6 +114,14 @@ def initialize(attributes = {}) if attributes.key?(:'refresh_token') self.refresh_token = attributes[:'refresh_token'] end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -133,7 +153,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && grant_type == o.grant_type && - refresh_token == o.refresh_token + refresh_token == o.refresh_token && + client_id == o.client_id && + client_secret == o.client_secret end # @see the `==` method @@ -145,7 +167,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [grant_type, refresh_token].hash + [grant_type, refresh_token, client_id, client_secret].hash end # Builds the object from hash diff --git a/lib/dropbox-sign/models/sub_white_labeling_options.rb b/lib/dropbox-sign/models/sub_white_labeling_options.rb index 023a552..d6c25e2 100644 --- a/lib/dropbox-sign/models/sub_white_labeling_options.rb +++ b/lib/dropbox-sign/models/sub_white_labeling_options.rb @@ -183,7 +183,7 @@ def initialize(attributes = {}) if attributes.key?(:'header_background_color') self.header_background_color = attributes[:'header_background_color'] else - self.header_background_color = '#1A1A1A' + self.header_background_color = '#1a1a1a' end if attributes.key?(:'legal_version') @@ -195,61 +195,61 @@ def initialize(attributes = {}) if attributes.key?(:'link_color') self.link_color = attributes[:'link_color'] else - self.link_color = '#00B3E6' + self.link_color = '#0061FE' end if attributes.key?(:'page_background_color') self.page_background_color = attributes[:'page_background_color'] else - self.page_background_color = '#F7F8F9' + self.page_background_color = '#f7f8f9' end if attributes.key?(:'primary_button_color') self.primary_button_color = attributes[:'primary_button_color'] else - self.primary_button_color = '#00B3E6' + self.primary_button_color = '#0061FE' end if attributes.key?(:'primary_button_color_hover') self.primary_button_color_hover = attributes[:'primary_button_color_hover'] else - self.primary_button_color_hover = '#00B3E6' + self.primary_button_color_hover = '#0061FE' end if attributes.key?(:'primary_button_text_color') self.primary_button_text_color = attributes[:'primary_button_text_color'] else - self.primary_button_text_color = '#FFFFFF' + self.primary_button_text_color = '#ffffff' end if attributes.key?(:'primary_button_text_color_hover') self.primary_button_text_color_hover = attributes[:'primary_button_text_color_hover'] else - self.primary_button_text_color_hover = '#FFFFFF' + self.primary_button_text_color_hover = '#ffffff' end if attributes.key?(:'secondary_button_color') self.secondary_button_color = attributes[:'secondary_button_color'] else - self.secondary_button_color = '#FFFFFF' + self.secondary_button_color = '#ffffff' end if attributes.key?(:'secondary_button_color_hover') self.secondary_button_color_hover = attributes[:'secondary_button_color_hover'] else - self.secondary_button_color_hover = '#FFFFFF' + self.secondary_button_color_hover = '#ffffff' end if attributes.key?(:'secondary_button_text_color') self.secondary_button_text_color = attributes[:'secondary_button_text_color'] else - self.secondary_button_text_color = '#00B3E6' + self.secondary_button_text_color = '#0061FE' end if attributes.key?(:'secondary_button_text_color_hover') self.secondary_button_text_color_hover = attributes[:'secondary_button_text_color_hover'] else - self.secondary_button_text_color_hover = '#00B3E6' + self.secondary_button_text_color_hover = '#0061FE' end if attributes.key?(:'text_color1') @@ -261,7 +261,7 @@ def initialize(attributes = {}) if attributes.key?(:'text_color2') self.text_color2 = attributes[:'text_color2'] else - self.text_color2 = '#FFFFFF' + self.text_color2 = '#ffffff' end if attributes.key?(:'reset_to_default') diff --git a/lib/dropbox-sign/models/template_response.rb b/lib/dropbox-sign/models/template_response.rb index 7d14e8a..51450dd 100644 --- a/lib/dropbox-sign/models/template_response.rb +++ b/lib/dropbox-sign/models/template_response.rb @@ -35,20 +35,20 @@ class TemplateResponse # @return [Integer] attr_accessor :updated_at - # `true` if this template was created using an embedded flow, `false` if it was created on our website. + # `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. # @return [Boolean, nil] attr_accessor :is_embedded # `true` if you are the owner of this template, `false` if it's been shared with you by a team member. - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :is_creator # Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :can_edit # Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. - # @return [Boolean, nil] + # @return [Boolean] attr_accessor :is_locked # The metadata attached to the template. @@ -76,9 +76,13 @@ class TemplateResponse attr_accessor :named_form_fields # An array of the Accounts that can use this Template. - # @return [Array, nil] + # @return [Array] attr_accessor :accounts + # Signer attachments. + # @return [Array] + attr_accessor :attachments + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -96,7 +100,8 @@ def self.attribute_map :'documents' => :'documents', :'custom_fields' => :'custom_fields', :'named_form_fields' => :'named_form_fields', - :'accounts' => :'accounts' + :'accounts' => :'accounts', + :'attachments' => :'attachments' } end @@ -122,7 +127,8 @@ def self.openapi_types :'documents' => :'Array', :'custom_fields' => :'Array', :'named_form_fields' => :'Array', - :'accounts' => :'Array' + :'accounts' => :'Array', + :'attachments' => :'Array' } end @@ -130,12 +136,8 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'is_embedded', - :'is_creator', - :'can_edit', - :'is_locked', :'custom_fields', :'named_form_fields', - :'accounts' ]) end @@ -250,6 +252,12 @@ def initialize(attributes = {}) self.accounts = value end end + + if attributes.key?(:'attachments') + if (value = attributes[:'attachments']).is_a?(Array) + self.attachments = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -284,7 +292,8 @@ def ==(o) documents == o.documents && custom_fields == o.custom_fields && named_form_fields == o.named_form_fields && - accounts == o.accounts + accounts == o.accounts && + attachments == o.attachments end # @see the `==` method @@ -296,7 +305,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [template_id, title, message, updated_at, is_embedded, is_creator, can_edit, is_locked, metadata, signer_roles, cc_roles, documents, custom_fields, named_form_fields, accounts].hash + [template_id, title, message, updated_at, is_embedded, is_creator, can_edit, is_locked, metadata, signer_roles, cc_roles, documents, custom_fields, named_form_fields, accounts, attachments].hash end # Builds the object from hash diff --git a/lib/dropbox-sign/models/template_response_document.rb b/lib/dropbox-sign/models/template_response_document.rb index 6d23cb3..49eaf4f 100644 --- a/lib/dropbox-sign/models/template_response_document.rb +++ b/lib/dropbox-sign/models/template_response_document.rb @@ -39,7 +39,7 @@ class TemplateResponseDocument attr_accessor :custom_fields # An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. - # @return [Array, nil] + # @return [Array] attr_accessor :static_fields # Attribute mapping from ruby-style variable name to JSON key. @@ -74,7 +74,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'static_fields' ]) 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 f991755..bc91770 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 @@ -54,10 +54,6 @@ class TemplateResponseDocumentFormFieldBase # @return [Boolean] attr_accessor :required - # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. - # @return [String, nil] - attr_accessor :group - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -69,8 +65,7 @@ def self.attribute_map :'y' => :'y', :'width' => :'width', :'height' => :'height', - :'required' => :'required', - :'group' => :'group' + :'required' => :'required' } end @@ -90,15 +85,13 @@ def self.openapi_types :'y' => :'Integer', :'width' => :'Integer', :'height' => :'Integer', - :'required' => :'Boolean', - :'group' => :'String' + :'required' => :'Boolean' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'group' ]) end @@ -203,10 +196,6 @@ def initialize(attributes = {}) if attributes.key?(:'required') self.required = attributes[:'required'] end - - if attributes.key?(:'group') - self.group = attributes[:'group'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -240,8 +229,7 @@ def ==(o) y == o.y && width == o.width && height == o.height && - required == o.required && - group == o.group + required == o.required end # @see the `==` method @@ -253,7 +241,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, api_id, name, signer, x, y, width, height, required, group].hash + [type, api_id, name, signer, x, y, width, height, required].hash end # Builds the object from hash 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 c888138..a4c759c 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldCheckbox < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'checkbox' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 94ec5f6..f20f04c 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldDateSigned < TemplateResponseDocumentForm # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'date_signed' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 0291303..c6ad1b3 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldDropdown < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'dropdown' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 7c8992f..f2f8631 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 @@ -38,6 +38,10 @@ class TemplateResponseDocumentFormFieldHyperlink < TemplateResponseDocumentFormF # @return [String] attr_accessor :font_family + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -45,7 +49,8 @@ def self.attribute_map :'avg_text_length' => :'avg_text_length', :'is_multiline' => :'isMultiline', :'original_font_size' => :'originalFontSize', - :'font_family' => :'fontFamily' + :'font_family' => :'fontFamily', + :'group' => :'group' } end @@ -61,13 +66,15 @@ def self.openapi_types :'avg_text_length' => :'TemplateResponseFieldAvgTextLength', :'is_multiline' => :'Boolean', :'original_font_size' => :'Integer', - :'font_family' => :'String' + :'font_family' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -135,6 +142,10 @@ def initialize(attributes = {}) if attributes.key?(:'font_family') self.font_family = attributes[:'font_family'] end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -164,7 +175,8 @@ def ==(o) avg_text_length == o.avg_text_length && is_multiline == o.is_multiline && original_font_size == o.original_font_size && - font_family == o.font_family && super(o) + font_family == o.font_family && + group == o.group && super(o) end # @see the `==` method @@ -176,7 +188,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, avg_text_length, is_multiline, original_font_size, font_family].hash + [type, avg_text_length, is_multiline, original_font_size, font_family, group].hash end # Builds the object from hash 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 70f5ed5..3ff48a7 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldInitials < TemplateResponseDocumentFormFi # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'initials' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 2412dc9..6af0b07 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldRadio < TemplateResponseDocumentFormField # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,7 +43,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end @@ -96,6 +102,10 @@ def initialize(attributes = {}) else self.type = 'radio' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -106,6 +116,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "type", type cannot be nil.') end + if @group.nil? + invalid_properties.push('invalid value for "group", group cannot be nil.') + end + invalid_properties end @@ -113,6 +127,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? + return false if @group.nil? true && super end @@ -121,7 +136,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +149,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 49fdbbb..c48d157 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 @@ -23,10 +23,15 @@ class TemplateResponseDocumentFormFieldSignature < TemplateResponseDocumentFormF # @return [String] attr_accessor :type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'type' + :'type' => :'type', + :'group' => :'group' } end @@ -38,13 +43,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'group' ]) end @@ -96,6 +103,10 @@ def initialize(attributes = {}) else self.type = 'signature' end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +132,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type && super(o) + type == o.type && + group == o.group && super(o) end # @see the `==` method @@ -133,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [type, group].hash end # Builds the object from hash 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 6a11d8a..51ed8bc 100644 --- a/lib/dropbox-sign/models/template_response_document_form_field_text.rb +++ b/lib/dropbox-sign/models/template_response_document_form_field_text.rb @@ -42,6 +42,10 @@ class TemplateResponseDocumentFormFieldText < TemplateResponseDocumentFormFieldB # @return [String, nil] attr_accessor :validation_type + # The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. + # @return [String, nil] + attr_accessor :group + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -72,7 +76,8 @@ def self.attribute_map :'is_multiline' => :'isMultiline', :'original_font_size' => :'originalFontSize', :'font_family' => :'fontFamily', - :'validation_type' => :'validation_type' + :'validation_type' => :'validation_type', + :'group' => :'group' } end @@ -89,14 +94,16 @@ def self.openapi_types :'is_multiline' => :'Boolean', :'original_font_size' => :'Integer', :'font_family' => :'String', - :'validation_type' => :'String' + :'validation_type' => :'String', + :'group' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'validation_type' + :'validation_type', + :'group' ]) end @@ -168,6 +175,10 @@ def initialize(attributes = {}) if attributes.key?(:'validation_type') self.validation_type = attributes[:'validation_type'] end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -210,7 +221,8 @@ def ==(o) is_multiline == o.is_multiline && original_font_size == o.original_font_size && font_family == o.font_family && - validation_type == o.validation_type && super(o) + validation_type == o.validation_type && + group == o.group && super(o) end # @see the `==` method @@ -222,7 +234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type].hash + [type, avg_text_length, is_multiline, original_font_size, font_family, validation_type, group].hash end # Builds the object from hash diff --git a/lib/dropbox-sign/version.rb b/lib/dropbox-sign/version.rb index 412da42..c1274fd 100644 --- a/lib/dropbox-sign/version.rb +++ b/lib/dropbox-sign/version.rb @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.6.1' + VERSION = '1.7.0' end diff --git a/openapi-config.yaml b/openapi-config.yaml index 74b05f8..5f7f717 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.6.1 + gemVersion: 1.7.0 sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c7189fd..fe81aca 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9091,7 +9687,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9100,40 +9696,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10211,6 +10807,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10246,6 +10855,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10388,7 +11010,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10456,6 +11078,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10589,6 +11212,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10606,6 +11277,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11218,24 +11918,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11273,7 +11970,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11377,7 +12078,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11529,10 +12229,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11549,12 +12245,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11570,6 +12266,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11579,8 +12279,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11596,6 +12294,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11605,8 +12307,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11622,6 +12322,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11631,8 +12335,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11659,6 +12361,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11668,8 +12374,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11685,6 +12389,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11695,8 +12403,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11712,6 +12418,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11721,8 +12430,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11738,6 +12445,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11747,8 +12458,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11790,6 +12499,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11849,8 +12562,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11875,8 +12586,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11901,8 +12610,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11927,8 +12634,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11953,8 +12658,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11979,8 +12682,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12005,8 +12706,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12031,8 +12730,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12418,6 +13115,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12662,6 +13363,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12674,6 +13379,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/run-build b/run-build index bf772d8..7127d64 100755 --- a/run-build +++ b/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/ruby" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/lib/dropbox-sign/api/"*.rb +rm -f "${DIR}/lib/dropbox-sign/models/"*.rb + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/test_fixtures/ApiAppCreateRequest.json b/test_fixtures/ApiAppCreateRequest.json index ac9729d..2ee8e41 100644 --- a/test_fixtures/ApiAppCreateRequest.json +++ b/test_fixtures/ApiAppCreateRequest.json @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppGetResponse.json b/test_fixtures/ApiAppGetResponse.json index 07843c3..f7d799f 100644 --- a/test_fixtures/ApiAppGetResponse.json +++ b/test_fixtures/ApiAppGetResponse.json @@ -7,7 +7,7 @@ "is_approved": false, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -15,13 +15,28 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" }, "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" + "header_background_color": "#1A1A1A", + "legal_version": "terms1", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", + "primary_button_text_color": "#ffffff", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", + "text_color1": "#808080", + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppListResponse.json b/test_fixtures/ApiAppListResponse.json index 6bbacb4..cc17d45 100644 --- a/test_fixtures/ApiAppListResponse.json +++ b/test_fixtures/ApiAppListResponse.json @@ -8,7 +8,7 @@ "is_approved": true, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -16,6 +16,9 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" @@ -27,6 +30,9 @@ "domains": ["example.com"], "is_approved": false, "name": "My Other App", + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" diff --git a/test_fixtures/ApiAppUpdateRequest.json b/test_fixtures/ApiAppUpdateRequest.json index 4744e05..ee4e9ff 100644 --- a/test_fixtures/ApiAppUpdateRequest.json +++ b/test_fixtures/ApiAppUpdateRequest.json @@ -4,7 +4,7 @@ "domains": [ "example.com" ], - "callback_url": "http://example.com/dropboxsign", + "callback_url": "https://example.com/dropboxsign", "oauth": { "callback_url": "https://example.com/oauth", "scopes": [ @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json new file mode 100644 index 0000000..5892719 --- /dev/null +++ b/test_fixtures/FaxGetResponse.json @@ -0,0 +1,23 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json new file mode 100644 index 0000000..bfa69cd --- /dev/null +++ b/test_fixtures/FaxListResponse.json @@ -0,0 +1,31 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] + } +} diff --git a/test_fixtures/FaxSendRequest.json b/test_fixtures/FaxSendRequest.json new file mode 100644 index 0000000..4c418cb --- /dev/null +++ b/test_fixtures/FaxSendRequest.json @@ -0,0 +1,14 @@ +{ + "default": { + "file_url": [ + "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + ], + "test_mode": "true", + "recipient": "16690000001", + "sender": "16690000000", + "cover_page_to": "Jill Fax", + "cover_page_message": "I'm sending you a fax!", + "cover_page_from": "Faxer Faxerson", + "title": "This is what the fax is about!" + } +} diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json new file mode 100644 index 0000000..b651c78 --- /dev/null +++ b/test_fixtures/FaxSendResponse.json @@ -0,0 +1,16 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [ ], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + } + } +} diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16..327d26c 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } } diff --git a/test_fixtures/TemplateGetResponse.json b/test_fixtures/TemplateGetResponse.json index 52ff622..b025913 100644 --- a/test_fixtures/TemplateGetResponse.json +++ b/test_fixtures/TemplateGetResponse.json @@ -5,7 +5,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -566,496 +569,40 @@ ] } ], - "custom_fields": [ - { - "name": "merge_field_1", - "type": "text", - "x": 417, - "y": 219, - "width": 72, - "height": 15, - "required": false, - "api_id": "967c3e5f-2912-4f53-8ea3-c750652d29fc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "merge_field_2", - "type": "checkbox", - "x": 515, - "y": 346, - "width": 18, - "height": 18, - "required": false, - "api_id": "5e8fe02f-51cf-4f0b-b1d9-2b1e4f6ad07f" - } - ], - "named_form_fields": [ - { - "name": "Signature1", - "type": "signature", - "signer": "1", - "x": 136, - "y": 17, - "width": 108, - "height": 27, - "required": true, - "api_id": "8b6d78a5-0870-4f46-af9c-b78b54a49348" - }, - { - "name": "Textbox1", - "type": "text", - "signer": "1", - "x": 328, - "y": 17, - "width": 144, - "height": 14, - "required": true, - "api_id": "7ec10d80-53c9-433b-b252-0b8daa90a8e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox2", - "type": "text", - "signer": "1", - "x": 328, - "y": 48, - "width": 144, - "height": 14, - "required": true, - "api_id": "6574e6ad-7dac-49a2-9d56-650d7c5ade6e", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Initial1", - "type": "initials", - "signer": "1", - "x": 148, - "y": 66, - "width": 72, - "height": 27, - "required": true, - "api_id": "30f41f54-c7f3-46c3-a29a-bb76ec40b552" - }, - { - "name": "Checkbox1", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 111, - "width": 18, - "height": 18, - "required": false, - "api_id": "d4d6ada9-e1dc-419e-bc0d-1478da694449", - "group": "75a6e4b5fea47" - }, - { - "name": "Dropdown1", - "type": "dropdown", - "signer": "1", - "x": 423, - "y": 108, - "width": 70, - "height": 14, - "required": true, - "api_id": "5863be5e-ce5a-4c9d-aabe-c221914d73c2" - }, - { - "name": "DateSigned1", - "type": "date_signed", - "signer": "1", - "x": 150, - "y": 119, - "width": 105, - "height": 18, - "required": true, - "api_id": "9f6d3722-6db7-46da-8fac-3bc09f510262" - }, - { - "name": "Checkbox2", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 135, - "width": 18, - "height": 18, - "required": false, - "api_id": "edd732b8-b158-4714-a87b-503637d09ded", - "group": "75a6e4b5fea47" - }, - { - "name": "FullName1", - "type": "text", - "signer": "1", - "x": 144, - "y": 158, - "width": 72, - "height": 14, - "required": true, - "api_id": "62fd3f85-4808-4011-8eae-a14ebe9105ef", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Email1", - "type": "text", - "signer": "1", - "x": 133, - "y": 191, - "width": 144, - "height": 14, - "required": true, - "api_id": "a1c9bc6b-d498-4787-86e0-30ea779f06a7", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "RadioItem1", - "type": "radio", - "signer": "1", - "x": 307, - "y": 211, - "width": 18, - "height": 18, - "required": false, - "api_id": "fc8a1277-f757-47a2-aeea-5113fa81f2d5", - "group": "0831822584086" - }, - { - "name": "Company1", - "type": "text", - "signer": "1", - "x": 128, - "y": 221, - "width": 144, - "height": 14, - "required": true, - "api_id": "279b4e7f-e71f-426d-845c-6308cddde379", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Title1", - "type": "text", - "signer": "1", - "x": 127, - "y": 250, - "width": 144, - "height": 14, - "required": true, - "api_id": "8809e39a-a46c-4dae-aaf9-06fc6355d80f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "RadioItem2", - "type": "radio", - "signer": "1", - "x": 307, - "y": 253, - "width": 18, - "height": 18, - "required": false, - "api_id": "f7b6b70d-0522-4ab7-bfec-b86f147c8be3", - "group": "0831822584086" - }, - { - "name": "Textbox3", - "type": "text", - "signer": "1", - "x": 410, - "y": 279, - "width": 144, - "height": 14, - "required": true, - "api_id": "bad7512a-e22b-46ed-ba03-123db0eda932", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox4", - "type": "text", - "signer": "1", - "x": 101, - "y": 314, - "width": 72, - "height": 14, - "required": true, - "api_id": "368ed029-bc93-4f92-8f7a-14c3bf8109b5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "custom_regex" - }, - { - "name": "Textbox8", - "type": "text", - "signer": "1", - "x": 218, - "y": 313, - "width": 72, - "height": 14, - "required": true, - "api_id": "ecf2ae95-d2e6-41b2-819a-836a6fa8c7c5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_routing_number" - }, - { - "name": "Textbox12", - "type": "text", - "signer": "1", - "x": 339, - "y": 315, - "width": 72, - "height": 14, - "required": true, - "api_id": "3cb90a0a-a433-4f30-8af8-8fb4c747b704", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "social_security_number" - }, - { - "name": "Textbox9", - "type": "text", - "signer": "1", - "x": 224, - "y": 343, - "width": 72, - "height": 14, - "required": true, - "api_id": "5b9eb331-c97d-435b-a563-d936a9b930c0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_account_number" - }, - { - "name": "Textbox13", - "type": "text", - "signer": "1", - "x": 339, - "y": 345, - "width": 72, - "height": 14, - "required": true, - "api_id": "2b98ce7e-e53a-4cf8-a9f3-d7fb18d88631", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "employer_identification_number" - }, - { - "name": "Textbox5", - "type": "text", - "signer": "1", - "x": 113, - "y": 350, - "width": 72, - "height": 14, - "required": true, - "api_id": "5f52c011-2c5f-4143-bf04-4694fb4a0d3f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "numbers_only" - }, - { - "name": "Textbox6", - "type": "text", - "signer": "1", - "x": 122, - "y": 374, - "width": 72, - "height": 14, - "required": true, - "api_id": "47457b7d-b1e8-41a0-93ad-60ba30e64bb1", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "letters_only" - }, - { - "name": "Textbox10", - "type": "text", - "signer": "1", - "x": 234, - "y": 373, - "width": 72, - "height": 14, - "required": true, - "api_id": "18e3f994-1675-4d58-9b4a-4f92a2614551", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "Textbox14", - "type": "text", - "signer": "1", - "x": 339, - "y": 376, - "width": 72, - "height": 14, - "required": true, - "api_id": "9ad4b8cc-bac9-432b-8836-9f80f86fc7e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox7", - "type": "text", - "signer": "1", - "x": 130, - "y": 401, - "width": 72, - "height": 14, - "required": true, - "api_id": "58c5f942-04fb-45f1-9703-5e8411f3a3bb", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "phone_number" - }, - { - "name": "me_now_hyperlink_1", - "type": "hyperlink", - "signer": "me_now", - "x": 434, - "y": 400, - "width": 112, - "height": 14, - "required": false, - "api_id": "fd928b56-cf59-40a4-9a90-62f97ffd0ddc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 30 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "helvetica" - }, - { - "name": "Textbox11", - "type": "text", - "signer": "1", - "x": 237, - "y": 405, - "width": 72, - "height": 14, - "required": true, - "api_id": "e48c388d-8c26-4f20-848e-f8587a631746", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "zip_code" - } - ], "accounts": [ { "account_id": "5008b25c7f67153e57d5a357b1687968068fb465", "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } }, { "account_id": "", "email_address": "teammate@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] } diff --git a/test_fixtures/TemplateListResponse.json b/test_fixtures/TemplateListResponse.json index 7c4768b..caa5e6d 100644 --- a/test_fixtures/TemplateListResponse.json +++ b/test_fixtures/TemplateListResponse.json @@ -12,7 +12,10 @@ "title": "Purchase order", "message": "", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -49,7 +52,8 @@ "originalFontSize": 12, "fontFamily": "arial" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -58,7 +62,21 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] }, @@ -67,7 +85,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1329478947, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -564,7 +585,8 @@ "fontFamily": "arial", "validation_type": "zip_code" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -573,9 +595,16 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } } - ] + ], + "attachments": [] } ] }