dropbox-sign 1.6.1 → 1.8.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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +15 -5
  4. data/VERSION +1 -1
  5. data/docs/AccountResponseQuotas.md +1 -1
  6. data/docs/BulkSendJobGetResponseSignatureRequests.md +1 -1
  7. data/docs/FaxApi.md +364 -0
  8. data/docs/FaxGetResponse.md +11 -0
  9. data/docs/FaxListResponse.md +11 -0
  10. data/docs/FaxResponse.md +20 -0
  11. data/docs/FaxResponseTransmission.md +12 -0
  12. data/docs/FaxSendRequest.md +18 -0
  13. data/docs/OAuthTokenRefreshRequest.md +2 -0
  14. data/docs/SignatureRequestApi.md +1 -1
  15. data/docs/SignatureRequestResponse.md +1 -1
  16. data/docs/SignatureRequestResponseDataValueInitials.md +1 -0
  17. data/docs/SignatureRequestResponseDataValueSignature.md +1 -0
  18. data/docs/SubWhiteLabelingOptions.md +12 -12
  19. data/docs/TemplateApi.md +3 -3
  20. data/docs/TemplateResponse.md +3 -2
  21. data/docs/TemplateResponseDocumentFormFieldBase.md +0 -1
  22. data/docs/TemplateResponseDocumentFormFieldCheckbox.md +1 -0
  23. data/docs/TemplateResponseDocumentFormFieldDateSigned.md +1 -0
  24. data/docs/TemplateResponseDocumentFormFieldDropdown.md +1 -0
  25. data/docs/TemplateResponseDocumentFormFieldHyperlink.md +1 -0
  26. data/docs/TemplateResponseDocumentFormFieldInitials.md +1 -0
  27. data/docs/TemplateResponseDocumentFormFieldRadio.md +1 -0
  28. data/docs/TemplateResponseDocumentFormFieldSignature.md +1 -0
  29. data/docs/TemplateResponseDocumentFormFieldText.md +1 -0
  30. data/examples/FaxDelete.rb +14 -0
  31. data/examples/FaxFiles.rb +17 -0
  32. data/examples/FaxGet.rb +17 -0
  33. data/examples/FaxList.rb +18 -0
  34. data/examples/FaxSend.rb +25 -0
  35. data/lib/dropbox-sign/api/fax_api.rb +495 -0
  36. data/lib/dropbox-sign/api/o_auth_api.rb +28 -0
  37. data/lib/dropbox-sign/api/signature_request_api.rb +2 -2
  38. data/lib/dropbox-sign/api/template_api.rb +2 -2
  39. data/lib/dropbox-sign/models/account_response_quotas.rb +1 -1
  40. data/lib/dropbox-sign/models/api_app_response_o_auth.rb +2 -1
  41. data/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +10 -7
  42. data/lib/dropbox-sign/models/fax_get_response.rb +263 -0
  43. data/lib/dropbox-sign/models/fax_list_response.rb +267 -0
  44. data/lib/dropbox-sign/models/fax_response.rb +403 -0
  45. data/lib/dropbox-sign/models/fax_response_transmission.rb +312 -0
  46. data/lib/dropbox-sign/models/fax_send_request.rb +345 -0
  47. data/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +26 -4
  48. data/lib/dropbox-sign/models/signature_request_response.rb +10 -7
  49. data/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb +2 -1
  50. data/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb +16 -4
  51. data/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb +16 -4
  52. data/lib/dropbox-sign/models/sub_white_labeling_options.rb +12 -12
  53. data/lib/dropbox-sign/models/template_response.rb +27 -16
  54. data/lib/dropbox-sign/models/template_response_document.rb +1 -2
  55. data/lib/dropbox-sign/models/template_response_document_form_field_base.rb +4 -16
  56. data/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +16 -4
  57. data/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +16 -4
  58. data/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +16 -4
  59. data/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +16 -4
  60. data/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +16 -4
  61. data/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +20 -4
  62. data/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +16 -4
  63. data/lib/dropbox-sign/models/template_response_document_form_field_text.rb +17 -5
  64. data/lib/dropbox-sign/version.rb +1 -1
  65. data/lib/dropbox-sign.rb +6 -0
  66. data/openapi-config.yaml +1 -1
  67. data/openapi-sdk.yaml +821 -98
  68. data/run-build +9 -0
  69. data/test_fixtures/ApiAppCreateRequest.json +10 -10
  70. data/test_fixtures/ApiAppGetResponse.json +18 -3
  71. data/test_fixtures/ApiAppListResponse.json +7 -1
  72. data/test_fixtures/ApiAppUpdateRequest.json +11 -11
  73. data/test_fixtures/BulkSendJobGetResponse.json +9 -0
  74. data/test_fixtures/FaxGetResponse.json +31 -0
  75. data/test_fixtures/FaxListResponse.json +39 -0
  76. data/test_fixtures/FaxSendRequest.json +14 -0
  77. data/test_fixtures/FaxSendResponse.json +16 -0
  78. data/test_fixtures/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json +7 -1
  79. data/test_fixtures/SignatureRequestBulkSendWithTemplateRequest.json +7 -1
  80. data/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +7 -1
  81. data/test_fixtures/SignatureRequestCreateEmbeddedWithTemplateRequest.json +7 -1
  82. data/test_fixtures/SignatureRequestGetResponse.json +11 -1
  83. data/test_fixtures/SignatureRequestListResponse.json +9 -1
  84. data/test_fixtures/SignatureRequestSendRequest.json +5 -1
  85. data/test_fixtures/SignatureRequestSendWithTemplateRequest.json +7 -1
  86. data/test_fixtures/TeamGetResponse.json +5 -0
  87. data/test_fixtures/TemplateCreateEmbeddedDraftRequest.json +5 -0
  88. data/test_fixtures/TemplateCreateRequest.json +5 -0
  89. data/test_fixtures/TemplateGetResponse.json +34 -479
  90. data/test_fixtures/TemplateListResponse.json +43 -6
  91. data/test_fixtures/UnclaimedDraftCreateEmbeddedRequest.json +5 -0
  92. data/test_fixtures/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json +5 -0
  93. data/test_fixtures/UnclaimedDraftCreateRequest.json +5 -0
  94. metadata +29 -8
@@ -0,0 +1,495 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Dropbox
16
+ end
17
+
18
+ module Dropbox::Sign
19
+ class FaxApi
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = ApiClient.default)
23
+ @api_client = api_client
24
+ end
25
+ # Delete Fax
26
+ # Deletes the specified Fax from the system.
27
+ # @param fax_id [String] Fax ID
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [nil]
30
+ def fax_delete(fax_id, opts = {})
31
+ fax_delete_with_http_info(fax_id, opts)
32
+ nil
33
+ end
34
+
35
+ # Delete Fax
36
+ # Deletes the specified Fax from the system.
37
+ # @param fax_id [String] Fax ID
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
40
+ def fax_delete_with_http_info(fax_id, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug 'Calling API: FaxApi.fax_delete ...'
43
+ end
44
+ # verify the required parameter 'fax_id' is set
45
+ if @api_client.config.client_side_validation && fax_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_delete"
47
+ end
48
+ # resource path
49
+ local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s))
50
+
51
+ # query parameters
52
+ query_params = opts[:query_params] || {}
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
58
+
59
+ post_body = {}
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['api_key']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"FaxApi.fax_delete",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ begin
82
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
83
+ rescue Dropbox::Sign::ApiError => e
84
+ end
85
+
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: FaxApi#fax_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # List Fax Files
93
+ # Returns list of fax files
94
+ # @param fax_id [String] Fax ID
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [File]
97
+ def fax_files(fax_id, opts = {})
98
+ data, _status_code, _headers = fax_files_with_http_info(fax_id, opts)
99
+ data
100
+ end
101
+
102
+ # List Fax Files
103
+ # Returns list of fax files
104
+ # @param fax_id [String] Fax ID
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
107
+ def fax_files_with_http_info(fax_id, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: FaxApi.fax_files ...'
110
+ end
111
+ # verify the required parameter 'fax_id' is set
112
+ if @api_client.config.client_side_validation && fax_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_files"
114
+ end
115
+ # resource path
116
+ local_var_path = '/fax/files/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
125
+
126
+ post_body = {}
127
+ form_params = opts[:form_params] || {}
128
+
129
+ # http body (model)
130
+ post_body = opts[:debug_body]
131
+
132
+ # return_type
133
+ return_type = opts[:debug_return_type] || 'File'
134
+
135
+ # auth_names
136
+ auth_names = opts[:debug_auth_names] || ['api_key']
137
+
138
+ new_options = opts.merge(
139
+ :operation => :"FaxApi.fax_files",
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => return_type
146
+ )
147
+
148
+ begin
149
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
150
+ rescue Dropbox::Sign::ApiError => e
151
+ if e.code === 200
152
+ body = @api_client.convert_to_type(
153
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
154
+ "Dropbox::Sign::File"
155
+ )
156
+
157
+ fail ApiError.new(:code => e.code,
158
+ :response_headers => e.response_headers,
159
+ :response_body => body),
160
+ e.message
161
+ end
162
+
163
+ range_code = "4XX".split('').first
164
+ range_code_left = "#{range_code}00".to_i
165
+ range_code_right = "#{range_code}99".to_i
166
+ if e.code >= range_code_left && e.code <= range_code_right
167
+ body = @api_client.convert_to_type(
168
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
169
+ "Dropbox::Sign::ErrorResponse"
170
+ )
171
+
172
+ fail ApiError.new(:code => e.code,
173
+ :response_headers => e.response_headers,
174
+ :response_body => body),
175
+ e.message
176
+ end
177
+
178
+ end
179
+
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called: FaxApi#fax_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
+ end
183
+ return data, status_code, headers
184
+ end
185
+
186
+ # Get Fax
187
+ # Returns information about fax
188
+ # @param fax_id [String] Fax ID
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [FaxGetResponse]
191
+ def fax_get(fax_id, opts = {})
192
+ data, _status_code, _headers = fax_get_with_http_info(fax_id, opts)
193
+ data
194
+ end
195
+
196
+ # Get Fax
197
+ # Returns information about fax
198
+ # @param fax_id [String] Fax ID
199
+ # @param [Hash] opts the optional parameters
200
+ # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers
201
+ def fax_get_with_http_info(fax_id, opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: FaxApi.fax_get ...'
204
+ end
205
+ # verify the required parameter 'fax_id' is set
206
+ if @api_client.config.client_side_validation && fax_id.nil?
207
+ fail ArgumentError, "Missing the required parameter 'fax_id' when calling FaxApi.fax_get"
208
+ end
209
+ # resource path
210
+ local_var_path = '/fax/{fax_id}'.sub('{' + 'fax_id' + '}', CGI.escape(fax_id.to_s))
211
+
212
+ # query parameters
213
+ query_params = opts[:query_params] || {}
214
+
215
+ # header parameters
216
+ header_params = opts[:header_params] || {}
217
+ # HTTP header 'Accept' (if needed)
218
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
219
+
220
+ post_body = {}
221
+ form_params = opts[:form_params] || {}
222
+
223
+ # http body (model)
224
+ post_body = opts[:debug_body]
225
+
226
+ # return_type
227
+ return_type = opts[:debug_return_type] || 'FaxGetResponse'
228
+
229
+ # auth_names
230
+ auth_names = opts[:debug_auth_names] || ['api_key']
231
+
232
+ new_options = opts.merge(
233
+ :operation => :"FaxApi.fax_get",
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ begin
243
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
244
+ rescue Dropbox::Sign::ApiError => e
245
+ if e.code === 200
246
+ body = @api_client.convert_to_type(
247
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
248
+ "Dropbox::Sign::FaxGetResponse"
249
+ )
250
+
251
+ fail ApiError.new(:code => e.code,
252
+ :response_headers => e.response_headers,
253
+ :response_body => body),
254
+ e.message
255
+ end
256
+
257
+ range_code = "4XX".split('').first
258
+ range_code_left = "#{range_code}00".to_i
259
+ range_code_right = "#{range_code}99".to_i
260
+ if e.code >= range_code_left && e.code <= range_code_right
261
+ body = @api_client.convert_to_type(
262
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
263
+ "Dropbox::Sign::ErrorResponse"
264
+ )
265
+
266
+ fail ApiError.new(:code => e.code,
267
+ :response_headers => e.response_headers,
268
+ :response_body => body),
269
+ e.message
270
+ end
271
+
272
+ end
273
+
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: FaxApi#fax_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+
280
+ # Lists Faxes
281
+ # Returns properties of multiple faxes
282
+ # @param [Hash] opts the optional parameters
283
+ # @option opts [Integer] :page Page (default to 1)
284
+ # @option opts [Integer] :page_size Page size (default to 20)
285
+ # @return [FaxListResponse]
286
+ def fax_list(opts = {})
287
+ data, _status_code, _headers = fax_list_with_http_info(opts)
288
+ data
289
+ end
290
+
291
+ # Lists Faxes
292
+ # Returns properties of multiple faxes
293
+ # @param [Hash] opts the optional parameters
294
+ # @option opts [Integer] :page Page (default to 1)
295
+ # @option opts [Integer] :page_size Page size (default to 20)
296
+ # @return [Array<(FaxListResponse, Integer, Hash)>] FaxListResponse data, response status code and response headers
297
+ def fax_list_with_http_info(opts = {})
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug 'Calling API: FaxApi.fax_list ...'
300
+ end
301
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
302
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FaxApi.fax_list, must be greater than or equal to 1.'
303
+ end
304
+
305
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
306
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be smaller than or equal to 100.'
307
+ end
308
+
309
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
310
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FaxApi.fax_list, must be greater than or equal to 1.'
311
+ end
312
+
313
+ # resource path
314
+ local_var_path = '/fax/list'
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
319
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
320
+
321
+ # header parameters
322
+ header_params = opts[:header_params] || {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
325
+
326
+ post_body = {}
327
+ form_params = opts[:form_params] || {}
328
+
329
+ # http body (model)
330
+ post_body = opts[:debug_body]
331
+
332
+ # return_type
333
+ return_type = opts[:debug_return_type] || 'FaxListResponse'
334
+
335
+ # auth_names
336
+ auth_names = opts[:debug_auth_names] || ['api_key']
337
+
338
+ new_options = opts.merge(
339
+ :operation => :"FaxApi.fax_list",
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names,
345
+ :return_type => return_type
346
+ )
347
+
348
+ begin
349
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
350
+ rescue Dropbox::Sign::ApiError => e
351
+ if e.code === 200
352
+ body = @api_client.convert_to_type(
353
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
354
+ "Dropbox::Sign::FaxListResponse"
355
+ )
356
+
357
+ fail ApiError.new(:code => e.code,
358
+ :response_headers => e.response_headers,
359
+ :response_body => body),
360
+ e.message
361
+ end
362
+
363
+ range_code = "4XX".split('').first
364
+ range_code_left = "#{range_code}00".to_i
365
+ range_code_right = "#{range_code}99".to_i
366
+ if e.code >= range_code_left && e.code <= range_code_right
367
+ body = @api_client.convert_to_type(
368
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
369
+ "Dropbox::Sign::ErrorResponse"
370
+ )
371
+
372
+ fail ApiError.new(:code => e.code,
373
+ :response_headers => e.response_headers,
374
+ :response_body => body),
375
+ e.message
376
+ end
377
+
378
+ end
379
+
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug "API called: FaxApi#fax_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
+ end
383
+ return data, status_code, headers
384
+ end
385
+
386
+ # Send Fax
387
+ # Action to prepare and send a fax
388
+ # @param fax_send_request [FaxSendRequest]
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [FaxGetResponse]
391
+ def fax_send(fax_send_request, opts = {})
392
+ data, _status_code, _headers = fax_send_with_http_info(fax_send_request, opts)
393
+ data
394
+ end
395
+
396
+ # Send Fax
397
+ # Action to prepare and send a fax
398
+ # @param fax_send_request [FaxSendRequest]
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers
401
+ def fax_send_with_http_info(fax_send_request, opts = {})
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug 'Calling API: FaxApi.fax_send ...'
404
+ end
405
+ # verify the required parameter 'fax_send_request' is set
406
+ if @api_client.config.client_side_validation && fax_send_request.nil?
407
+ fail ArgumentError, "Missing the required parameter 'fax_send_request' when calling FaxApi.fax_send"
408
+ end
409
+ # resource path
410
+ local_var_path = '/fax/send'
411
+
412
+ # query parameters
413
+ query_params = opts[:query_params] || {}
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
419
+ # HTTP header 'Content-Type'
420
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
421
+ if !content_type.nil?
422
+ header_params['Content-Type'] = content_type
423
+ end
424
+
425
+ post_body = {}
426
+ form_params = opts[:form_params] || {}
427
+ result = @api_client.generate_form_data(
428
+ fax_send_request,
429
+ Dropbox::Sign::FaxSendRequest.openapi_types
430
+ )
431
+
432
+ # form parameters
433
+ if result[:has_file]
434
+ form_params = opts[:form_params] || result[:params]
435
+ header_params['Content-Type'] = 'multipart/form-data'
436
+ else
437
+ # http body (model)
438
+ post_body = opts[:debug_body] || result[:params]
439
+ end
440
+
441
+ # return_type
442
+ return_type = opts[:debug_return_type] || 'FaxGetResponse'
443
+
444
+ # auth_names
445
+ auth_names = opts[:debug_auth_names] || ['api_key']
446
+
447
+ new_options = opts.merge(
448
+ :operation => :"FaxApi.fax_send",
449
+ :header_params => header_params,
450
+ :query_params => query_params,
451
+ :form_params => form_params,
452
+ :body => post_body,
453
+ :auth_names => auth_names,
454
+ :return_type => return_type
455
+ )
456
+
457
+ begin
458
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
459
+ rescue Dropbox::Sign::ApiError => e
460
+ if e.code === 200
461
+ body = @api_client.convert_to_type(
462
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
463
+ "Dropbox::Sign::FaxGetResponse"
464
+ )
465
+
466
+ fail ApiError.new(:code => e.code,
467
+ :response_headers => e.response_headers,
468
+ :response_body => body),
469
+ e.message
470
+ end
471
+
472
+ range_code = "4XX".split('').first
473
+ range_code_left = "#{range_code}00".to_i
474
+ range_code_right = "#{range_code}99".to_i
475
+ if e.code >= range_code_left && e.code <= range_code_right
476
+ body = @api_client.convert_to_type(
477
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
478
+ "Dropbox::Sign::ErrorResponse"
479
+ )
480
+
481
+ fail ApiError.new(:code => e.code,
482
+ :response_headers => e.response_headers,
483
+ :response_body => body),
484
+ e.message
485
+ end
486
+
487
+ end
488
+
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug "API called: FaxApi#fax_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
+ end
492
+ return data, status_code, headers
493
+ end
494
+ end
495
+ end
@@ -108,6 +108,20 @@ module Dropbox::Sign
108
108
  e.message
109
109
  end
110
110
 
111
+ range_code = "4XX".split('').first
112
+ range_code_left = "#{range_code}00".to_i
113
+ range_code_right = "#{range_code}99".to_i
114
+ if e.code >= range_code_left && e.code <= range_code_right
115
+ body = @api_client.convert_to_type(
116
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
117
+ "Dropbox::Sign::ErrorResponse"
118
+ )
119
+
120
+ fail ApiError.new(:code => e.code,
121
+ :response_headers => e.response_headers,
122
+ :response_body => body),
123
+ e.message
124
+ end
111
125
 
112
126
  end
113
127
 
@@ -203,6 +217,20 @@ module Dropbox::Sign
203
217
  e.message
204
218
  end
205
219
 
220
+ range_code = "4XX".split('').first
221
+ range_code_left = "#{range_code}00".to_i
222
+ range_code_right = "#{range_code}99".to_i
223
+ if e.code >= range_code_left && e.code <= range_code_right
224
+ body = @api_client.convert_to_type(
225
+ JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0],
226
+ "Dropbox::Sign::ErrorResponse"
227
+ )
228
+
229
+ fail ApiError.new(:code => e.code,
230
+ :response_headers => e.response_headers,
231
+ :response_body => body),
232
+ e.message
233
+ end
206
234
 
207
235
  end
208
236
 
@@ -241,7 +241,7 @@ module Dropbox::Sign
241
241
  end
242
242
 
243
243
  # Cancel Incomplete Signature Request
244
- # 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]`.
244
+ # 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]`.
245
245
  # @param signature_request_id [String] The id of the incomplete SignatureRequest to cancel.
246
246
  # @param [Hash] opts the optional parameters
247
247
  # @return [nil]
@@ -251,7 +251,7 @@ module Dropbox::Sign
251
251
  end
252
252
 
253
253
  # Cancel Incomplete Signature Request
254
- # 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 &#x60;signature_request_canceled&#x60; event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the &#x60;signature_request_canceled&#x60; 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: &#x60;POST /signature_request/remove/[:signature_request_id]&#x60;.
254
+ # 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 &#x60;signature_request_canceled&#x60; event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the &#x60;signature_request_canceled&#x60; 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: &#x60;POST /signature_request/remove/[:signature_request_id]&#x60;.
255
255
  # @param signature_request_id [String] The id of the incomplete SignatureRequest to cancel.
256
256
  # @param [Hash] opts the optional parameters
257
257
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -137,7 +137,7 @@ module Dropbox::Sign
137
137
  return data, status_code, headers
138
138
  end
139
139
 
140
- # Create Template
140
+ # Create Template
141
141
  # Creates a template that can then be used.
142
142
  # @param template_create_request [TemplateCreateRequest]
143
143
  # @param [Hash] opts the optional parameters
@@ -147,7 +147,7 @@ module Dropbox::Sign
147
147
  data
148
148
  end
149
149
 
150
- # Create Template
150
+ # Create Template
151
151
  # Creates a template that can then be used.
152
152
  # @param template_create_request [TemplateCreateRequest]
153
153
  # @param [Hash] opts the optional parameters
@@ -35,7 +35,7 @@ module Dropbox::Sign
35
35
  # @return [Integer, nil]
36
36
  attr_accessor :templates_left
37
37
 
38
- # SMS verifications remaining.
38
+ # SMS verifications remaining.
39
39
  # @return [Integer, nil]
40
40
  attr_accessor :sms_verifications_left
41
41
 
@@ -24,7 +24,7 @@ module Dropbox::Sign
24
24
  attr_accessor :callback_url
25
25
 
26
26
  # The app's OAuth secret, or null if the app does not belong to user.
27
- # @return [String]
27
+ # @return [String, nil]
28
28
  attr_accessor :secret
29
29
 
30
30
  # Array of OAuth scopes used by the app.
@@ -63,6 +63,7 @@ module Dropbox::Sign
63
63
  # List of attributes with nullable: true
64
64
  def self.openapi_nullable
65
65
  Set.new([
66
+ :'secret',
66
67
  ])
67
68
  end
68
69
 
@@ -19,7 +19,7 @@ end
19
19
  module Dropbox::Sign
20
20
  class BulkSendJobGetResponseSignatureRequests
21
21
  # Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.
22
- # @return [Boolean, nil]
22
+ # @return [Boolean]
23
23
  attr_accessor :test_mode
24
24
 
25
25
  # The id of the SignatureRequest.
@@ -27,7 +27,7 @@ module Dropbox::Sign
27
27
  attr_accessor :signature_request_id
28
28
 
29
29
  # The email address of the initiator of the SignatureRequest.
30
- # @return [String]
30
+ # @return [String, nil]
31
31
  attr_accessor :requester_email_address
32
32
 
33
33
  # The title the specified Account uses for the SignatureRequest.
@@ -47,7 +47,7 @@ module Dropbox::Sign
47
47
  attr_accessor :message
48
48
 
49
49
  # The metadata attached to the signature request.
50
- # @return [Object]
50
+ # @return [Hash<String, Object>]
51
51
  attr_accessor :metadata
52
52
 
53
53
  # Time the signature request was created.
@@ -55,7 +55,7 @@ module Dropbox::Sign
55
55
  attr_accessor :created_at
56
56
 
57
57
  # The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.
58
- # @return [Integer]
58
+ # @return [Integer, nil]
59
59
  attr_accessor :expires_at
60
60
 
61
61
  # Whether or not the SignatureRequest has been fully executed by all signers.
@@ -164,7 +164,7 @@ module Dropbox::Sign
164
164
  :'original_title' => :'String',
165
165
  :'subject' => :'String',
166
166
  :'message' => :'String',
167
- :'metadata' => :'Object',
167
+ :'metadata' => :'Hash<String, Object>',
168
168
  :'created_at' => :'Integer',
169
169
  :'expires_at' => :'Integer',
170
170
  :'is_complete' => :'Boolean',
@@ -188,9 +188,10 @@ module Dropbox::Sign
188
188
  # List of attributes with nullable: true
189
189
  def self.openapi_nullable
190
190
  Set.new([
191
- :'test_mode',
191
+ :'requester_email_address',
192
192
  :'subject',
193
193
  :'message',
194
+ :'expires_at',
194
195
  :'signing_url',
195
196
  :'signing_redirect_url',
196
197
  :'final_copy_uri',
@@ -272,7 +273,9 @@ module Dropbox::Sign
272
273
  end
273
274
 
274
275
  if attributes.key?(:'metadata')
275
- self.metadata = attributes[:'metadata']
276
+ if (value = attributes[:'metadata']).is_a?(Hash)
277
+ self.metadata = value
278
+ end
276
279
  end
277
280
 
278
281
  if attributes.key?(:'created_at')