dropbox-sign 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +26 -24
- data/README.md +6 -4
- data/VERSION +1 -1
- data/docs/AccountResponse.md +1 -0
- data/docs/AccountResponseQuotas.md +1 -0
- data/docs/AccountResponseUsage.md +10 -0
- data/dropbox-sign.gemspec +2 -1
- data/lib/dropbox-sign/api/account_api.rb +1 -1
- data/lib/dropbox-sign/api/api_app_api.rb +3 -3
- data/lib/dropbox-sign/api/bulk_send_job_api.rb +5 -5
- data/lib/dropbox-sign/api/embedded_api.rb +1 -1
- data/lib/dropbox-sign/api/o_auth_api.rb +1 -1
- data/lib/dropbox-sign/api/report_api.rb +1 -1
- data/lib/dropbox-sign/api/signature_request_api.rb +5 -5
- data/lib/dropbox-sign/api/team_api.rb +5 -5
- data/lib/dropbox-sign/api/template_api.rb +4 -4
- data/lib/dropbox-sign/api/unclaimed_draft_api.rb +1 -1
- data/lib/dropbox-sign/api_client.rb +27 -24
- data/lib/dropbox-sign/api_error.rb +2 -1
- data/lib/dropbox-sign/configuration.rb +39 -9
- data/lib/dropbox-sign/event_callback_helper.rb +1 -1
- data/lib/dropbox-sign/models/account_create_request.rb +2 -4
- data/lib/dropbox-sign/models/account_create_response.rb +2 -4
- data/lib/dropbox-sign/models/account_get_response.rb +2 -4
- data/lib/dropbox-sign/models/account_response.rb +17 -9
- data/lib/dropbox-sign/models/account_response_quotas.rb +19 -9
- data/lib/dropbox-sign/models/account_response_usage.rb +251 -0
- data/lib/dropbox-sign/models/account_update_request.rb +2 -4
- data/lib/dropbox-sign/models/account_verify_request.rb +2 -4
- data/lib/dropbox-sign/models/account_verify_response.rb +2 -4
- data/lib/dropbox-sign/models/account_verify_response_account.rb +2 -4
- data/lib/dropbox-sign/models/api_app_create_request.rb +2 -4
- data/lib/dropbox-sign/models/api_app_get_response.rb +2 -4
- data/lib/dropbox-sign/models/api_app_list_response.rb +2 -4
- data/lib/dropbox-sign/models/api_app_response.rb +2 -4
- data/lib/dropbox-sign/models/api_app_response_o_auth.rb +2 -4
- data/lib/dropbox-sign/models/api_app_response_options.rb +2 -4
- data/lib/dropbox-sign/models/api_app_response_owner_account.rb +2 -4
- data/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb +2 -4
- data/lib/dropbox-sign/models/api_app_update_request.rb +3 -5
- data/lib/dropbox-sign/models/bulk_send_job_get_response.rb +2 -4
- data/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +2 -4
- data/lib/dropbox-sign/models/bulk_send_job_list_response.rb +2 -4
- data/lib/dropbox-sign/models/bulk_send_job_response.rb +2 -4
- data/lib/dropbox-sign/models/bulk_send_job_send_response.rb +2 -4
- data/lib/dropbox-sign/models/embedded_edit_url_request.rb +2 -4
- data/lib/dropbox-sign/models/embedded_edit_url_response.rb +2 -4
- data/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb +2 -4
- data/lib/dropbox-sign/models/embedded_sign_url_response.rb +2 -4
- data/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb +2 -4
- data/lib/dropbox-sign/models/error_response.rb +2 -4
- data/lib/dropbox-sign/models/error_response_error.rb +2 -4
- data/lib/dropbox-sign/models/event_callback_request.rb +2 -4
- data/lib/dropbox-sign/models/event_callback_request_event.rb +2 -4
- data/lib/dropbox-sign/models/event_callback_request_event_metadata.rb +2 -4
- data/lib/dropbox-sign/models/file_response.rb +2 -4
- data/lib/dropbox-sign/models/file_response_data_uri.rb +2 -4
- data/lib/dropbox-sign/models/list_info_response.rb +2 -4
- data/lib/dropbox-sign/models/o_auth_token_generate_request.rb +2 -4
- data/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +2 -4
- data/lib/dropbox-sign/models/o_auth_token_response.rb +2 -4
- data/lib/dropbox-sign/models/report_create_request.rb +2 -4
- data/lib/dropbox-sign/models/report_create_response.rb +2 -4
- data/lib/dropbox-sign/models/report_response.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +5 -7
- data/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +5 -7
- data/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +5 -7
- data/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +5 -7
- data/lib/dropbox-sign/models/signature_request_get_response.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_list_response.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_remind_request.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_attachment.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb +8 -4
- data/lib/dropbox-sign/models/signature_request_response_data_base.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb +8 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_text.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_response_signatures.rb +2 -4
- data/lib/dropbox-sign/models/signature_request_send_request.rb +5 -7
- data/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +6 -7
- data/lib/dropbox-sign/models/signature_request_update_request.rb +2 -4
- data/lib/dropbox-sign/models/sub_attachment.rb +2 -4
- data/lib/dropbox-sign/models/sub_bulk_signer_list.rb +2 -4
- data/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb +2 -4
- data/lib/dropbox-sign/models/sub_cc.rb +2 -4
- data/lib/dropbox-sign/models/sub_custom_field.rb +2 -4
- data/lib/dropbox-sign/models/sub_editor_options.rb +2 -4
- data/lib/dropbox-sign/models/sub_field_options.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_field_group.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_field_rule.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_field_rule_action.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +8 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +2 -4
- data/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb +8 -4
- data/lib/dropbox-sign/models/sub_merge_field.rb +2 -4
- data/lib/dropbox-sign/models/sub_o_auth.rb +2 -4
- data/lib/dropbox-sign/models/sub_options.rb +2 -4
- data/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb +2 -4
- data/lib/dropbox-sign/models/sub_signature_request_signer.rb +4 -6
- data/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +4 -6
- data/lib/dropbox-sign/models/sub_signing_options.rb +2 -4
- data/lib/dropbox-sign/models/sub_team_response.rb +2 -4
- data/lib/dropbox-sign/models/sub_template_role.rb +2 -4
- data/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb +2 -4
- data/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb +2 -4
- data/lib/dropbox-sign/models/sub_white_labeling_options.rb +2 -4
- data/lib/dropbox-sign/models/team_add_member_request.rb +2 -4
- data/lib/dropbox-sign/models/team_create_request.rb +2 -4
- data/lib/dropbox-sign/models/team_get_info_response.rb +2 -4
- data/lib/dropbox-sign/models/team_get_response.rb +2 -4
- data/lib/dropbox-sign/models/team_info_response.rb +2 -4
- data/lib/dropbox-sign/models/team_invite_response.rb +2 -4
- data/lib/dropbox-sign/models/team_invites_response.rb +2 -4
- data/lib/dropbox-sign/models/team_member_response.rb +2 -4
- data/lib/dropbox-sign/models/team_members_response.rb +2 -4
- data/lib/dropbox-sign/models/team_parent_response.rb +2 -4
- data/lib/dropbox-sign/models/team_remove_member_request.rb +2 -4
- data/lib/dropbox-sign/models/team_response.rb +2 -4
- data/lib/dropbox-sign/models/team_sub_teams_response.rb +2 -4
- data/lib/dropbox-sign/models/team_update_request.rb +2 -4
- data/lib/dropbox-sign/models/template_add_user_request.rb +2 -4
- data/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +4 -6
- data/lib/dropbox-sign/models/template_create_embedded_draft_response.rb +2 -4
- data/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb +2 -4
- data/lib/dropbox-sign/models/template_create_request.rb +4 -6
- data/lib/dropbox-sign/models/template_create_response.rb +2 -4
- data/lib/dropbox-sign/models/template_create_response_template.rb +2 -4
- data/lib/dropbox-sign/models/template_edit_response.rb +2 -4
- data/lib/dropbox-sign/models/template_get_response.rb +2 -4
- data/lib/dropbox-sign/models/template_list_response.rb +2 -4
- data/lib/dropbox-sign/models/template_remove_user_request.rb +2 -4
- data/lib/dropbox-sign/models/template_response.rb +2 -4
- data/lib/dropbox-sign/models/template_response_account.rb +2 -4
- data/lib/dropbox-sign/models/template_response_account_quota.rb +2 -4
- data/lib/dropbox-sign/models/template_response_cc_role.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_custom_field_base.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_field_group.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_base.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_form_field_text.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_base.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +2 -4
- data/lib/dropbox-sign/models/template_response_document_static_field_text.rb +2 -4
- data/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +2 -4
- data/lib/dropbox-sign/models/template_response_signer_role.rb +2 -4
- data/lib/dropbox-sign/models/template_update_files_request.rb +4 -6
- data/lib/dropbox-sign/models/template_update_files_response.rb +2 -4
- data/lib/dropbox-sign/models/template_update_files_response_template.rb +2 -4
- data/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +5 -6
- data/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb +5 -7
- data/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +5 -6
- data/lib/dropbox-sign/models/unclaimed_draft_create_response.rb +2 -4
- data/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb +2 -4
- data/lib/dropbox-sign/models/unclaimed_draft_response.rb +2 -4
- data/lib/dropbox-sign/models/warning_response.rb +2 -4
- data/lib/dropbox-sign/version.rb +2 -2
- data/lib/dropbox-sign.rb +2 -1
- data/openapi-config.yaml +1 -1
- data/openapi-sdk.yaml +84 -69
- data/run-build +1 -1
- data/spec/api_client_spec.rb +3 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/templates/README.mustache +1 -0
- data/templates/api.mustache +58 -12
- data/templates/api_client.mustache +16 -35
- data/templates/api_client_faraday_partial.mustache +102 -44
- data/templates/api_client_httpx_partial.mustache +134 -0
- data/templates/api_client_typhoeus_partial.mustache +23 -15
- data/templates/api_doc.mustache +1 -1
- data/templates/api_error.mustache +1 -0
- data/templates/api_info.mustache +1 -1
- data/templates/api_test.mustache +1 -1
- data/templates/base_object.mustache +1 -3
- data/templates/configuration.mustache +139 -33
- data/templates/configuration_faraday_partial.mustache +40 -0
- data/templates/configuration_httpx_partial.mustache +11 -0
- data/templates/configuration_typhoeus_partial.mustache +41 -0
- data/templates/gem.mustache +14 -0
- data/templates/gemspec.mustache +10 -4
- data/templates/model_test.mustache +3 -2
- data/templates/partial_model_enum_class.mustache +7 -4
- data/templates/partial_model_generic.mustache +7 -7
- data/templates/partial_oneof_module.mustache +4 -4
- data/templates/partial_oneof_module_doc.mustache +1 -0
- data/templates/travis.mustache +1 -4
- metadata +13 -7
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -65,6 +65,16 @@ module Dropbox::Sign
|
|
65
65
|
# Defines the access token (Bearer) used with OAuth2.
|
66
66
|
attr_accessor :access_token
|
67
67
|
|
68
|
+
# Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
|
69
|
+
# Overrides the access_token if set
|
70
|
+
# @return [Proc]
|
71
|
+
attr_accessor :access_token_getter
|
72
|
+
|
73
|
+
# Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
|
74
|
+
# HTTP responses with return type `File` will be returned as a stream of binary data.
|
75
|
+
# Default to false.
|
76
|
+
attr_accessor :return_binary_data
|
77
|
+
|
68
78
|
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
69
79
|
# details will be logged with `logger.debug` (see the `logger` attribute).
|
70
80
|
# Default to false.
|
@@ -72,6 +82,14 @@ module Dropbox::Sign
|
|
72
82
|
# @return [true, false]
|
73
83
|
attr_accessor :debugging
|
74
84
|
|
85
|
+
# Set this to ignore operation servers for the API client. This is useful when you need to
|
86
|
+
# send requests to a different server than the one specified in the OpenAPI document.
|
87
|
+
# Will default to the base url defined in the spec but can be overridden by setting
|
88
|
+
# `scheme`, `host`, `base_path` directly.
|
89
|
+
# Default to false.
|
90
|
+
# @return [true, false]
|
91
|
+
attr_accessor :ignore_operation_servers
|
92
|
+
|
75
93
|
# Defines the logger used for debugging.
|
76
94
|
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
77
95
|
#
|
@@ -136,6 +154,7 @@ module Dropbox::Sign
|
|
136
154
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
137
155
|
attr_accessor :params_encoding
|
138
156
|
|
157
|
+
|
139
158
|
attr_accessor :inject_format
|
140
159
|
|
141
160
|
attr_accessor :force_ending_format
|
@@ -144,7 +163,7 @@ module Dropbox::Sign
|
|
144
163
|
@scheme = 'https'
|
145
164
|
@host = 'api.hellosign.com'
|
146
165
|
@base_path = '/v3'
|
147
|
-
@server_index =
|
166
|
+
@server_index = nil
|
148
167
|
@server_operation_index = {}
|
149
168
|
@server_variables = {}
|
150
169
|
@server_operation_variables = {}
|
@@ -153,11 +172,12 @@ module Dropbox::Sign
|
|
153
172
|
@client_side_validation = true
|
154
173
|
@verify_ssl = true
|
155
174
|
@verify_ssl_host = true
|
156
|
-
@params_encoding = nil
|
157
175
|
@cert_file = nil
|
158
176
|
@key_file = nil
|
159
177
|
@timeout = 0
|
178
|
+
@params_encoding = nil
|
160
179
|
@debugging = false
|
180
|
+
@ignore_operation_servers = false
|
161
181
|
@inject_format = false
|
162
182
|
@force_ending_format = false
|
163
183
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
@@ -192,10 +212,13 @@ module Dropbox::Sign
|
|
192
212
|
|
193
213
|
# Returns base URL for specified operation based on server settings
|
194
214
|
def base_url(operation = nil)
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
215
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
|
216
|
+
if operation_server_settings.key?(operation) then
|
217
|
+
index = server_operation_index.fetch(operation, server_index)
|
218
|
+
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
219
|
+
else
|
220
|
+
server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
|
221
|
+
end
|
199
222
|
end
|
200
223
|
|
201
224
|
# Gets API key (with prefix if set).
|
@@ -210,6 +233,12 @@ module Dropbox::Sign
|
|
210
233
|
end
|
211
234
|
end
|
212
235
|
|
236
|
+
# Gets access_token using access_token_getter or uses the static access_token
|
237
|
+
def access_token_with_refresh
|
238
|
+
return access_token if access_token_getter.nil?
|
239
|
+
access_token_getter.call
|
240
|
+
end
|
241
|
+
|
213
242
|
# Gets Basic Auth token string
|
214
243
|
def basic_auth_token
|
215
244
|
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
@@ -273,8 +302,8 @@ module Dropbox::Sign
|
|
273
302
|
servers = server_settings if servers == nil
|
274
303
|
|
275
304
|
# check array index out of bound
|
276
|
-
if (index < 0 || index >= servers.size)
|
277
|
-
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
305
|
+
if (index.nil? || index < 0 || index >= servers.size)
|
306
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
|
278
307
|
end
|
279
308
|
|
280
309
|
server = servers[index]
|
@@ -299,5 +328,6 @@ module Dropbox::Sign
|
|
299
328
|
url
|
300
329
|
end
|
301
330
|
|
331
|
+
|
302
332
|
end
|
303
333
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -214,8 +214,6 @@ module Dropbox::Sign
|
|
214
214
|
else
|
215
215
|
false
|
216
216
|
end
|
217
|
-
when :File
|
218
|
-
value
|
219
217
|
when :Object
|
220
218
|
# generic object (usually a Hash), return directly
|
221
219
|
value
|
@@ -233,7 +231,7 @@ module Dropbox::Sign
|
|
233
231
|
else # model
|
234
232
|
# models (e.g. Pet)
|
235
233
|
klass = Dropbox::Sign.const_get(type)
|
236
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
234
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
235
|
end
|
238
236
|
end
|
239
237
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -198,8 +198,6 @@ module Dropbox::Sign
|
|
198
198
|
else
|
199
199
|
false
|
200
200
|
end
|
201
|
-
when :File
|
202
|
-
value
|
203
201
|
when :Object
|
204
202
|
# generic object (usually a Hash), return directly
|
205
203
|
value
|
@@ -217,7 +215,7 @@ module Dropbox::Sign
|
|
217
215
|
else # model
|
218
216
|
# models (e.g. Pet)
|
219
217
|
klass = Dropbox::Sign.const_get(type)
|
220
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
221
219
|
end
|
222
220
|
end
|
223
221
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -188,8 +188,6 @@ module Dropbox::Sign
|
|
188
188
|
else
|
189
189
|
false
|
190
190
|
end
|
191
|
-
when :File
|
192
|
-
value
|
193
191
|
when :Object
|
194
192
|
# generic object (usually a Hash), return directly
|
195
193
|
value
|
@@ -207,7 +205,7 @@ module Dropbox::Sign
|
|
207
205
|
else # model
|
208
206
|
# models (e.g. Pet)
|
209
207
|
klass = Dropbox::Sign.const_get(type)
|
210
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
209
|
end
|
212
210
|
end
|
213
211
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -57,6 +57,9 @@ module Dropbox::Sign
|
|
57
57
|
# @return [String, nil]
|
58
58
|
attr_accessor :locale
|
59
59
|
|
60
|
+
# @return [AccountResponseUsage]
|
61
|
+
attr_accessor :usage
|
62
|
+
|
60
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
61
64
|
def self.attribute_map
|
62
65
|
{
|
@@ -69,7 +72,8 @@ module Dropbox::Sign
|
|
69
72
|
:'callback_url' => :'callback_url',
|
70
73
|
:'role_code' => :'role_code',
|
71
74
|
:'team_id' => :'team_id',
|
72
|
-
:'locale' => :'locale'
|
75
|
+
:'locale' => :'locale',
|
76
|
+
:'usage' => :'usage'
|
73
77
|
}
|
74
78
|
end
|
75
79
|
|
@@ -95,7 +99,8 @@ module Dropbox::Sign
|
|
95
99
|
:'callback_url' => :'String',
|
96
100
|
:'role_code' => :'String',
|
97
101
|
:'team_id' => :'String',
|
98
|
-
:'locale' => :'String'
|
102
|
+
:'locale' => :'String',
|
103
|
+
:'usage' => :'AccountResponseUsage'
|
99
104
|
}
|
100
105
|
end
|
101
106
|
|
@@ -110,7 +115,7 @@ module Dropbox::Sign
|
|
110
115
|
:'callback_url',
|
111
116
|
:'role_code',
|
112
117
|
:'team_id',
|
113
|
-
:'locale'
|
118
|
+
:'locale',
|
114
119
|
])
|
115
120
|
end
|
116
121
|
|
@@ -183,6 +188,10 @@ module Dropbox::Sign
|
|
183
188
|
if attributes.key?(:'locale')
|
184
189
|
self.locale = attributes[:'locale']
|
185
190
|
end
|
191
|
+
|
192
|
+
if attributes.key?(:'usage')
|
193
|
+
self.usage = attributes[:'usage']
|
194
|
+
end
|
186
195
|
end
|
187
196
|
|
188
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -212,7 +221,8 @@ module Dropbox::Sign
|
|
212
221
|
callback_url == o.callback_url &&
|
213
222
|
role_code == o.role_code &&
|
214
223
|
team_id == o.team_id &&
|
215
|
-
locale == o.locale
|
224
|
+
locale == o.locale &&
|
225
|
+
usage == o.usage
|
216
226
|
end
|
217
227
|
|
218
228
|
# @see the `==` method
|
@@ -224,7 +234,7 @@ module Dropbox::Sign
|
|
224
234
|
# Calculates hash code according to all attributes.
|
225
235
|
# @return [Integer] Hash code
|
226
236
|
def hash
|
227
|
-
[account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale].hash
|
237
|
+
[account_id, email_address, is_locked, is_paid_hs, is_paid_hf, quotas, callback_url, role_code, team_id, locale, usage].hash
|
228
238
|
end
|
229
239
|
|
230
240
|
# Builds the object from hash
|
@@ -278,8 +288,6 @@ module Dropbox::Sign
|
|
278
288
|
else
|
279
289
|
false
|
280
290
|
end
|
281
|
-
when :File
|
282
|
-
value
|
283
291
|
when :Object
|
284
292
|
# generic object (usually a Hash), return directly
|
285
293
|
value
|
@@ -297,7 +305,7 @@ module Dropbox::Sign
|
|
297
305
|
else # model
|
298
306
|
# models (e.g. Pet)
|
299
307
|
klass = Dropbox::Sign.const_get(type)
|
300
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
308
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
301
309
|
end
|
302
310
|
end
|
303
311
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -39,6 +39,10 @@ module Dropbox::Sign
|
|
39
39
|
# @return [Integer, nil]
|
40
40
|
attr_accessor :sms_verifications_left
|
41
41
|
|
42
|
+
# Number of fax pages left
|
43
|
+
# @return [Integer, nil]
|
44
|
+
attr_accessor :num_fax_pages_left
|
45
|
+
|
42
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
47
|
def self.attribute_map
|
44
48
|
{
|
@@ -46,7 +50,8 @@ module Dropbox::Sign
|
|
46
50
|
:'documents_left' => :'documents_left',
|
47
51
|
:'templates_total' => :'templates_total',
|
48
52
|
:'templates_left' => :'templates_left',
|
49
|
-
:'sms_verifications_left' => :'sms_verifications_left'
|
53
|
+
:'sms_verifications_left' => :'sms_verifications_left',
|
54
|
+
:'num_fax_pages_left' => :'num_fax_pages_left'
|
50
55
|
}
|
51
56
|
end
|
52
57
|
|
@@ -67,7 +72,8 @@ module Dropbox::Sign
|
|
67
72
|
:'documents_left' => :'Integer',
|
68
73
|
:'templates_total' => :'Integer',
|
69
74
|
:'templates_left' => :'Integer',
|
70
|
-
:'sms_verifications_left' => :'Integer'
|
75
|
+
:'sms_verifications_left' => :'Integer',
|
76
|
+
:'num_fax_pages_left' => :'Integer'
|
71
77
|
}
|
72
78
|
end
|
73
79
|
|
@@ -83,7 +89,8 @@ module Dropbox::Sign
|
|
83
89
|
:'documents_left',
|
84
90
|
:'templates_total',
|
85
91
|
:'templates_left',
|
86
|
-
:'sms_verifications_left'
|
92
|
+
:'sms_verifications_left',
|
93
|
+
:'num_fax_pages_left'
|
87
94
|
])
|
88
95
|
end
|
89
96
|
|
@@ -136,6 +143,10 @@ module Dropbox::Sign
|
|
136
143
|
if attributes.key?(:'sms_verifications_left')
|
137
144
|
self.sms_verifications_left = attributes[:'sms_verifications_left']
|
138
145
|
end
|
146
|
+
|
147
|
+
if attributes.key?(:'num_fax_pages_left')
|
148
|
+
self.num_fax_pages_left = attributes[:'num_fax_pages_left']
|
149
|
+
end
|
139
150
|
end
|
140
151
|
|
141
152
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -160,7 +171,8 @@ module Dropbox::Sign
|
|
160
171
|
documents_left == o.documents_left &&
|
161
172
|
templates_total == o.templates_total &&
|
162
173
|
templates_left == o.templates_left &&
|
163
|
-
sms_verifications_left == o.sms_verifications_left
|
174
|
+
sms_verifications_left == o.sms_verifications_left &&
|
175
|
+
num_fax_pages_left == o.num_fax_pages_left
|
164
176
|
end
|
165
177
|
|
166
178
|
# @see the `==` method
|
@@ -172,7 +184,7 @@ module Dropbox::Sign
|
|
172
184
|
# Calculates hash code according to all attributes.
|
173
185
|
# @return [Integer] Hash code
|
174
186
|
def hash
|
175
|
-
[api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left].hash
|
187
|
+
[api_signature_requests_left, documents_left, templates_total, templates_left, sms_verifications_left, num_fax_pages_left].hash
|
176
188
|
end
|
177
189
|
|
178
190
|
# Builds the object from hash
|
@@ -226,8 +238,6 @@ module Dropbox::Sign
|
|
226
238
|
else
|
227
239
|
false
|
228
240
|
end
|
229
|
-
when :File
|
230
|
-
value
|
231
241
|
when :Object
|
232
242
|
# generic object (usually a Hash), return directly
|
233
243
|
value
|
@@ -245,7 +255,7 @@ module Dropbox::Sign
|
|
245
255
|
else # model
|
246
256
|
# models (e.g. Pet)
|
247
257
|
klass = Dropbox::Sign.const_get(type)
|
248
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
258
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
249
259
|
end
|
250
260
|
end
|
251
261
|
|
@@ -0,0 +1,251 @@
|
|
1
|
+
=begin
|
2
|
+
#Dropbox Sign API
|
3
|
+
|
4
|
+
#Dropbox Sign v3 API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
7
|
+
Contact: apisupport@hellosign.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Dropbox
|
17
|
+
end
|
18
|
+
|
19
|
+
module Dropbox::Sign
|
20
|
+
# Details concerning monthly usage
|
21
|
+
class AccountResponseUsage
|
22
|
+
# Number of fax pages sent
|
23
|
+
# @return [Integer, nil]
|
24
|
+
attr_accessor :fax_pages_sent
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'fax_pages_sent' => :'fax_pages_sent'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns attribute map of this model + parent
|
39
|
+
def self.merged_attributes
|
40
|
+
self.attribute_map
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.openapi_types
|
45
|
+
{
|
46
|
+
:'fax_pages_sent' => :'Integer'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping of this model + parent
|
51
|
+
def self.merged_types
|
52
|
+
self.openapi_types
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
:'fax_pages_sent'
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Returns list of attributes with nullable: true of this model + parent
|
63
|
+
def self.merged_nullable
|
64
|
+
self.openapi_nullable
|
65
|
+
end
|
66
|
+
|
67
|
+
# Attempt to instantiate and hydrate a new instance of this class
|
68
|
+
# @param [Object] data Data to be converted
|
69
|
+
# @return [AccountResponseUsage]
|
70
|
+
def self.init(data)
|
71
|
+
return ApiClient.default.convert_to_type(
|
72
|
+
data,
|
73
|
+
"AccountResponseUsage"
|
74
|
+
) || AccountResponseUsage.new
|
75
|
+
end
|
76
|
+
|
77
|
+
# Initializes the object
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
79
|
+
def initialize(attributes = {})
|
80
|
+
if (!attributes.is_a?(Hash))
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::AccountResponseUsage` initialize method"
|
82
|
+
end
|
83
|
+
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.merged_attributes.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
|
+
end
|
89
|
+
h[k.to_sym] = v
|
90
|
+
}
|
91
|
+
|
92
|
+
if attributes.key?(:'fax_pages_sent')
|
93
|
+
self.fax_pages_sent = attributes[:'fax_pages_sent']
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
98
|
+
# @return Array for valid properties with the reasons
|
99
|
+
def list_invalid_properties
|
100
|
+
invalid_properties = Array.new
|
101
|
+
invalid_properties
|
102
|
+
end
|
103
|
+
|
104
|
+
# Check to see if the all the properties in the model are valid
|
105
|
+
# @return true if the model is valid
|
106
|
+
def valid?
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
110
|
+
# Checks equality by comparing each attribute.
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def ==(o)
|
113
|
+
return true if self.equal?(o)
|
114
|
+
self.class == o.class &&
|
115
|
+
fax_pages_sent == o.fax_pages_sent
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[fax_pages_sent].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
attribute_map = self.class.merged_attributes
|
143
|
+
|
144
|
+
self.class.merged_types.each_pair do |key, type|
|
145
|
+
if type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
# models (e.g. Pet)
|
197
|
+
klass = Dropbox::Sign.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash(include_nil = true)
|
217
|
+
hash = {}
|
218
|
+
self.class.merged_attributes.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
if value.nil?
|
221
|
+
next unless include_nil
|
222
|
+
is_nullable = self.class.merged_nullable.include?(attr)
|
223
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
224
|
+
end
|
225
|
+
|
226
|
+
hash[param] = _to_hash(value, include_nil)
|
227
|
+
end
|
228
|
+
hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Outputs non-array value in the form of hash
|
232
|
+
# For object, use to_hash. Otherwise, just return the value
|
233
|
+
# @param [Object] value Any valid value
|
234
|
+
# @return [Hash] Returns the value in the form of hash
|
235
|
+
def _to_hash(value, include_nil = true)
|
236
|
+
if value.is_a?(Array)
|
237
|
+
value.compact.map { |v| _to_hash(v, include_nil) }
|
238
|
+
elsif value.is_a?(Hash)
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each { |k, v| hash[k] = _to_hash(v, include_nil) }
|
241
|
+
end
|
242
|
+
elsif value.respond_to? :to_hash
|
243
|
+
value.to_hash(include_nil)
|
244
|
+
else
|
245
|
+
value
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 3.0.0
|
7
7
|
Contact: apisupport@hellosign.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.7.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -199,8 +199,6 @@ module Dropbox::Sign
|
|
199
199
|
else
|
200
200
|
false
|
201
201
|
end
|
202
|
-
when :File
|
203
|
-
value
|
204
202
|
when :Object
|
205
203
|
# generic object (usually a Hash), return directly
|
206
204
|
value
|
@@ -218,7 +216,7 @@ module Dropbox::Sign
|
|
218
216
|
else # model
|
219
217
|
# models (e.g. Pet)
|
220
218
|
klass = Dropbox::Sign.const_get(type)
|
221
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
222
220
|
end
|
223
221
|
end
|
224
222
|
|