form_api 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +21 -10
  5. data/docs/{CreateSubmissionDataBatchV1.md → CombinePdfsData.md} +4 -4
  6. data/docs/CombinedSubmission.md +1 -0
  7. data/docs/CreateCustomFileData.md +8 -0
  8. data/docs/CreateCustomFileResponse.md +10 -0
  9. data/docs/CreateTemplateData.md +8 -0
  10. data/docs/CustomFile.md +9 -0
  11. data/docs/PDFApi.md +208 -12
  12. data/docs/SubmissionBatchData.md +1 -1
  13. data/docs/{CreateSubmissionData.md → SubmissionData.md} +1 -1
  14. data/docs/{CreateSubmissionDataBatchRequest.md → SubmissionDataBatchRequest.md} +5 -5
  15. data/docs/Templatesv2Template.md +19 -0
  16. data/docs/Templatesv2TemplateDocument.md +10 -0
  17. data/docs/Templatesv2TemplateDocumentMetadata.md +10 -0
  18. data/lib/form_api.rb +10 -3
  19. data/lib/form_api/api/client.rb +25 -9
  20. data/lib/form_api/api/pdf_api.rb +224 -20
  21. data/lib/form_api/models/{create_submission_data_batch_request.rb → combine_pdfs_data.rb} +31 -43
  22. data/lib/form_api/models/combined_submission.rb +12 -1
  23. data/lib/form_api/models/create_custom_file_data.rb +188 -0
  24. data/lib/form_api/models/create_custom_file_response.rb +237 -0
  25. data/lib/form_api/models/create_template_data.rb +188 -0
  26. data/lib/form_api/models/custom_file.rb +192 -0
  27. data/lib/form_api/models/submission_batch_data.rb +1 -1
  28. data/lib/form_api/models/{create_submission_data.rb → submission_data.rb} +1 -1
  29. data/lib/form_api/models/{create_submission_data_batch_v1.rb → submission_data_batch_request.rb} +32 -28
  30. data/lib/form_api/models/templatesv2_template.rb +316 -0
  31. data/lib/form_api/models/templatesv2_template_document.rb +235 -0
  32. data/lib/form_api/models/templatesv2_template_document_metadata.rb +235 -0
  33. data/lib/form_api/version.rb +1 -1
  34. data/spec/api/client_integration_spec.rb +41 -4
  35. data/spec/api/pdf_api_integration_spec.rb +7 -7
  36. data/spec/api/pdf_api_spec_original.skipped.rb +55 -9
  37. data/spec/models/{create_submission_data_batch_v1_spec.rb → combine_pdfs_data_spec.rb} +10 -10
  38. data/spec/models/combined_submission_spec.rb +6 -0
  39. data/spec/models/create_custom_file_data_spec.rb +41 -0
  40. data/spec/models/create_custom_file_response_spec.rb +57 -0
  41. data/spec/models/create_template_data_spec.rb +41 -0
  42. data/spec/models/custom_file_spec.rb +47 -0
  43. data/spec/models/{create_submission_data_batch_request_spec.rb → submission_data_batch_request_spec.rb} +12 -12
  44. data/spec/models/{create_submission_data_spec.rb → submission_data_spec.rb} +6 -6
  45. data/spec/models/templatesv2_template_document_metadata_spec.rb +57 -0
  46. data/spec/models/templatesv2_template_document_spec.rb +57 -0
  47. data/spec/models/templatesv2_template_spec.rb +111 -0
  48. data/spec/spec_helper.rb +3 -0
  49. metadata +42 -14
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
6
6
  **metadata** | **Object** | | [optional]
7
7
  **test** | **BOOLEAN** | | [optional]
8
8
  **template_id** | **String** | | [optional]
9
- **submissions** | [**Array<CreateSubmissionDataBatchRequest>**](CreateSubmissionDataBatchRequest.md) | |
9
+ **submissions** | [**Array<SubmissionDataBatchRequest>**](SubmissionDataBatchRequest.md) | |
10
10
 
11
11
 
@@ -1,4 +1,4 @@
1
- # FormAPI::CreateSubmissionData
1
+ # FormAPI::SubmissionData
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
@@ -1,13 +1,13 @@
1
- # FormAPI::CreateSubmissionDataBatchRequest
1
+ # FormAPI::SubmissionDataBatchRequest
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **template_id** | **String** | |
7
- **test** | **BOOLEAN** | | [optional]
8
- **data** | **Object** | |
9
- **html** | **String** | | [optional]
10
6
  **css** | **String** | | [optional]
11
7
  **metadata** | **Object** | | [optional]
8
+ **test** | **BOOLEAN** | | [optional]
9
+ **data** | **Object** | | [optional]
10
+ **template_id** | **String** | | [optional]
11
+ **html** | **String** | | [optional]
12
12
 
13
13
 
@@ -0,0 +1,19 @@
1
+ # FormAPI::Templatesv2Template
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **expiration_interval** | **String** | | [optional]
7
+ **public_web_form** | **BOOLEAN** | | [optional]
8
+ **webhook_url** | **String** | | [optional]
9
+ **expire_submissions** | **BOOLEAN** | | [optional]
10
+ **expire_after** | **Float** | | [optional]
11
+ **allow_additional_properties** | **BOOLEAN** | | [optional]
12
+ **document** | [**Templatesv2TemplateDocument**](Templatesv2TemplateDocument.md) | | [optional]
13
+ **name** | **String** | | [optional]
14
+ **public_submissions** | **BOOLEAN** | | [optional]
15
+ **slack_webhook_url** | **String** | | [optional]
16
+ **redirect_url** | **String** | | [optional]
17
+ **blockchain_timestamp_verification** | **BOOLEAN** | | [optional]
18
+
19
+
@@ -0,0 +1,10 @@
1
+ # FormAPI::Templatesv2TemplateDocument
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **metadata** | [**Templatesv2TemplateDocumentMetadata**](Templatesv2TemplateDocumentMetadata.md) | | [optional]
7
+ **id** | **String** | | [optional]
8
+ **storage** | **String** | | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # FormAPI::Templatesv2TemplateDocumentMetadata
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **filename** | **String** | | [optional]
7
+ **size** | **Integer** | | [optional]
8
+ **mime_type** | **String** | | [optional]
9
+
10
+
data/lib/form_api.rb CHANGED
@@ -19,19 +19,21 @@ require 'form_api/configuration'
19
19
  # Models
20
20
  require 'form_api/models/authentication_error'
21
21
  require 'form_api/models/authentication_success_response'
22
+ require 'form_api/models/combine_pdfs_data'
22
23
  require 'form_api/models/combined_submission'
23
24
  require 'form_api/models/combined_submission_action'
24
25
  require 'form_api/models/combined_submission_data'
25
26
  require 'form_api/models/create_combined_submission_response'
27
+ require 'form_api/models/create_custom_file_data'
28
+ require 'form_api/models/create_custom_file_response'
26
29
  require 'form_api/models/create_submission_batch_response'
27
30
  require 'form_api/models/create_submission_batch_submissions_response'
28
- require 'form_api/models/create_submission_data'
29
- require 'form_api/models/create_submission_data_batch_request'
30
- require 'form_api/models/create_submission_data_batch_v1'
31
31
  require 'form_api/models/create_submission_data_request_data'
32
32
  require 'form_api/models/create_submission_data_request_token_response'
33
33
  require 'form_api/models/create_submission_data_request_token_response_token'
34
34
  require 'form_api/models/create_submission_response'
35
+ require 'form_api/models/create_template_data'
36
+ require 'form_api/models/custom_file'
35
37
  require 'form_api/models/error'
36
38
  require 'form_api/models/invalid_request'
37
39
  require 'form_api/models/pending_template'
@@ -39,8 +41,13 @@ require 'form_api/models/submission'
39
41
  require 'form_api/models/submission_action'
40
42
  require 'form_api/models/submission_batch'
41
43
  require 'form_api/models/submission_batch_data'
44
+ require 'form_api/models/submission_data'
45
+ require 'form_api/models/submission_data_batch_request'
42
46
  require 'form_api/models/submission_data_request'
43
47
  require 'form_api/models/template'
48
+ require 'form_api/models/templatesv2_template'
49
+ require 'form_api/models/templatesv2_template_document'
50
+ require 'form_api/models/templatesv2_template_document_metadata'
44
51
  require 'form_api/models/update_data_request_response'
45
52
  require 'form_api/models/update_submission_data_request_data'
46
53
 
@@ -13,13 +13,14 @@ module FormAPI
13
13
  end
14
14
 
15
15
  # Wait for job to finish by default.
16
- options[:wait] = options.key?(:wait) ? options[:wait] : true
16
+ wait = options.key?(:wait) ? options[:wait] : true
17
+ options.delete :wait
17
18
 
18
19
  template_id = options.delete :template_id
19
20
  create_submission_data = options
20
21
  response = super(template_id, create_submission_data)
21
22
 
22
- return response unless options[:wait]
23
+ return response unless wait
23
24
 
24
25
  submission = response.submission
25
26
  timeout = options[:timeout] || 60
@@ -52,12 +53,13 @@ module FormAPI
52
53
  end
53
54
 
54
55
  # Wait for job to finish by default.
55
- options[:wait] = options.key?(:wait) ? options[:wait] : true
56
+ wait = options.key?(:wait) ? options[:wait] : true
57
+ options.delete :wait
56
58
 
57
59
  submission_batch_data = options
58
60
  response = super(submission_batch_data)
59
61
 
60
- return response unless options[:wait]
62
+ return response unless wait
61
63
 
62
64
  batch = response.submission_batch
63
65
  submission_responses = response.submissions
@@ -103,18 +105,19 @@ module FormAPI
103
105
  )
104
106
  end
105
107
 
106
- def combine_submissions(options)
107
- unless options[:submission_ids].is_a?(::Array)
108
- raise InvalidDataError, "submission_ids is required, and must be an Array."
108
+ def combine_pdfs(options)
109
+ unless options[:source_pdfs].is_a?(::Array)
110
+ raise InvalidDataError, "source_pdfs is required, and must be an Array."
109
111
  end
110
112
 
111
113
  # Wait for job to finish by default.
112
- options[:wait] = options.key?(:wait) ? options[:wait] : true
114
+ wait = options.key?(:wait) ? options[:wait] : true
115
+ options.delete :wait
113
116
 
114
117
  # PdfAPI requires a :combined_submission_data option.
115
118
  response = super(options)
116
119
 
117
- return response unless options[:wait]
120
+ return response unless wait
118
121
 
119
122
  combined_submission = response.combined_submission
120
123
  timeout = options[:timeout] || 600
@@ -136,6 +139,19 @@ module FormAPI
136
139
  )
137
140
  end
138
141
 
142
+ # Alias for combine_pdfs, for backwards compatibility
143
+ def combine_submissions(options)
144
+ unless options[:submission_ids].is_a?(::Array)
145
+ raise InvalidDataError, "submission_ids is required, and must be an Array."
146
+ end
147
+ options[:source_pdfs] = options[:submission_ids].map do |id|
148
+ { type: 'submission', id: id }
149
+ end
150
+ options.delete :submission_ids
151
+
152
+ combine_pdfs(options)
153
+ end
154
+
139
155
  def batch_generate_and_combine_pdfs(options)
140
156
  # We pass the wait option to the combine_submissions method
141
157
  wait = options.key?(:wait) ? options.delete(:wait) : true
@@ -21,20 +21,20 @@ module FormAPI
21
21
  end
22
22
  # Generates multiple PDFs
23
23
  # @param template_id
24
- # @param create_submission_data_batch_v1
24
+ # @param request_body
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [Array<CreateSubmissionResponse>]
27
- def batch_generate_pdf_v1(template_id, create_submission_data_batch_v1, opts = {})
28
- data, _status_code, _headers = batch_generate_pdf_v1_with_http_info(template_id, create_submission_data_batch_v1, opts)
27
+ def batch_generate_pdf_v1(template_id, request_body, opts = {})
28
+ data, _status_code, _headers = batch_generate_pdf_v1_with_http_info(template_id, request_body, opts)
29
29
  data
30
30
  end
31
31
 
32
32
  # Generates multiple PDFs
33
33
  # @param template_id
34
- # @param create_submission_data_batch_v1
34
+ # @param request_body
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(Array<CreateSubmissionResponse>, Fixnum, Hash)>] Array<CreateSubmissionResponse> data, response status code and response headers
37
- def batch_generate_pdf_v1_with_http_info(template_id, create_submission_data_batch_v1, opts = {})
37
+ def batch_generate_pdf_v1_with_http_info(template_id, request_body, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: PDFApi.batch_generate_pdf_v1 ...'
40
40
  end
@@ -42,9 +42,9 @@ module FormAPI
42
42
  if @api_client.config.client_side_validation && template_id.nil?
43
43
  fail ArgumentError, "Missing the required parameter 'template_id' when calling PDFApi.batch_generate_pdf_v1"
44
44
  end
45
- # verify the required parameter 'create_submission_data_batch_v1' is set
46
- if @api_client.config.client_side_validation && create_submission_data_batch_v1.nil?
47
- fail ArgumentError, "Missing the required parameter 'create_submission_data_batch_v1' when calling PDFApi.batch_generate_pdf_v1"
45
+ # verify the required parameter 'request_body' is set
46
+ if @api_client.config.client_side_validation && request_body.nil?
47
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling PDFApi.batch_generate_pdf_v1"
48
48
  end
49
49
  # resource path
50
50
  local_var_path = '/templates/{template_id}/submissions/batch'.sub('{' + 'template_id' + '}', template_id.to_s)
@@ -63,7 +63,7 @@ module FormAPI
63
63
  form_params = {}
64
64
 
65
65
  # http body (model)
66
- post_body = @api_client.object_to_http_body(create_submission_data_batch_v1)
66
+ post_body = @api_client.object_to_http_body(request_body)
67
67
  auth_names = ['api_token_basic']
68
68
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
69
69
  :header_params => header_params,
@@ -131,6 +131,59 @@ module FormAPI
131
131
  return data, status_code, headers
132
132
  end
133
133
 
134
+ # Merge submission PDFs, template PDFs, or custom files
135
+ # @param combine_pdfs_data
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [CreateCombinedSubmissionResponse]
138
+ def combine_pdfs(combine_pdfs_data, opts = {})
139
+ data, _status_code, _headers = combine_pdfs_with_http_info(combine_pdfs_data, opts)
140
+ data
141
+ end
142
+
143
+ # Merge submission PDFs, template PDFs, or custom files
144
+ # @param combine_pdfs_data
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(CreateCombinedSubmissionResponse, Fixnum, Hash)>] CreateCombinedSubmissionResponse data, response status code and response headers
147
+ def combine_pdfs_with_http_info(combine_pdfs_data, opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: PDFApi.combine_pdfs ...'
150
+ end
151
+ # verify the required parameter 'combine_pdfs_data' is set
152
+ if @api_client.config.client_side_validation && combine_pdfs_data.nil?
153
+ fail ArgumentError, "Missing the required parameter 'combine_pdfs_data' when calling PDFApi.combine_pdfs"
154
+ end
155
+ # resource path
156
+ local_var_path = '/combined_submissions?v=2'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+
161
+ # header parameters
162
+ header_params = {}
163
+ # HTTP header 'Accept' (if needed)
164
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
165
+ # HTTP header 'Content-Type'
166
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
167
+
168
+ # form parameters
169
+ form_params = {}
170
+
171
+ # http body (model)
172
+ post_body = @api_client.object_to_http_body(combine_pdfs_data)
173
+ auth_names = ['api_token_basic']
174
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
175
+ :header_params => header_params,
176
+ :query_params => query_params,
177
+ :form_params => form_params,
178
+ :body => post_body,
179
+ :auth_names => auth_names,
180
+ :return_type => 'CreateCombinedSubmissionResponse')
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "API called: PDFApi#combine_pdfs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ return data, status_code, headers
185
+ end
186
+
134
187
  # Merge generated PDFs together
135
188
  # @param combined_submission_data
136
189
  # @param [Hash] opts the optional parameters
@@ -184,6 +237,59 @@ module FormAPI
184
237
  return data, status_code, headers
185
238
  end
186
239
 
240
+ # Create a new custom file from a cached presign upload
241
+ # @param create_custom_file_data
242
+ # @param [Hash] opts the optional parameters
243
+ # @return [CreateCustomFileResponse]
244
+ def create_custom_file_from_upload(create_custom_file_data, opts = {})
245
+ data, _status_code, _headers = create_custom_file_from_upload_with_http_info(create_custom_file_data, opts)
246
+ data
247
+ end
248
+
249
+ # Create a new custom file from a cached presign upload
250
+ # @param create_custom_file_data
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(CreateCustomFileResponse, Fixnum, Hash)>] CreateCustomFileResponse data, response status code and response headers
253
+ def create_custom_file_from_upload_with_http_info(create_custom_file_data, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: PDFApi.create_custom_file_from_upload ...'
256
+ end
257
+ # verify the required parameter 'create_custom_file_data' is set
258
+ if @api_client.config.client_side_validation && create_custom_file_data.nil?
259
+ fail ArgumentError, "Missing the required parameter 'create_custom_file_data' when calling PDFApi.create_custom_file_from_upload"
260
+ end
261
+ # resource path
262
+ local_var_path = '/custom_files'
263
+
264
+ # query parameters
265
+ query_params = {}
266
+
267
+ # header parameters
268
+ header_params = {}
269
+ # HTTP header 'Accept' (if needed)
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
+ # HTTP header 'Content-Type'
272
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
273
+
274
+ # form parameters
275
+ form_params = {}
276
+
277
+ # http body (model)
278
+ post_body = @api_client.object_to_http_body(create_custom_file_data)
279
+ auth_names = ['api_token_basic']
280
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
281
+ :header_params => header_params,
282
+ :query_params => query_params,
283
+ :form_params => form_params,
284
+ :body => post_body,
285
+ :auth_names => auth_names,
286
+ :return_type => 'CreateCustomFileResponse')
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: PDFApi#create_custom_file_from_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
187
293
  # Creates a new data request token for form authentication
188
294
  # @param data_request_id
189
295
  # @param [Hash] opts the optional parameters
@@ -235,7 +341,7 @@ module FormAPI
235
341
  return data, status_code, headers
236
342
  end
237
343
 
238
- # Upload a new PDF template
344
+ # Upload a new PDF template with a file upload
239
345
  # @param template_document
240
346
  # @param template_name
241
347
  # @param [Hash] opts the optional parameters
@@ -245,7 +351,7 @@ module FormAPI
245
351
  data
246
352
  end
247
353
 
248
- # Upload a new PDF template
354
+ # Upload a new PDF template with a file upload
249
355
  # @param template_document
250
356
  # @param template_name
251
357
  # @param [Hash] opts the optional parameters
@@ -296,6 +402,59 @@ module FormAPI
296
402
  return data, status_code, headers
297
403
  end
298
404
 
405
+ # Create a new PDF template from a cached presign upload
406
+ # @param create_template_data
407
+ # @param [Hash] opts the optional parameters
408
+ # @return [PendingTemplate]
409
+ def create_template_from_upload(create_template_data, opts = {})
410
+ data, _status_code, _headers = create_template_from_upload_with_http_info(create_template_data, opts)
411
+ data
412
+ end
413
+
414
+ # Create a new PDF template from a cached presign upload
415
+ # @param create_template_data
416
+ # @param [Hash] opts the optional parameters
417
+ # @return [Array<(PendingTemplate, Fixnum, Hash)>] PendingTemplate data, response status code and response headers
418
+ def create_template_from_upload_with_http_info(create_template_data, opts = {})
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug 'Calling API: PDFApi.create_template_from_upload ...'
421
+ end
422
+ # verify the required parameter 'create_template_data' is set
423
+ if @api_client.config.client_side_validation && create_template_data.nil?
424
+ fail ArgumentError, "Missing the required parameter 'create_template_data' when calling PDFApi.create_template_from_upload"
425
+ end
426
+ # resource path
427
+ local_var_path = '/templates?v=2'
428
+
429
+ # query parameters
430
+ query_params = {}
431
+
432
+ # header parameters
433
+ header_params = {}
434
+ # HTTP header 'Accept' (if needed)
435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
436
+ # HTTP header 'Content-Type'
437
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
438
+
439
+ # form parameters
440
+ form_params = {}
441
+
442
+ # http body (model)
443
+ post_body = @api_client.object_to_http_body(create_template_data)
444
+ auth_names = ['api_token_basic']
445
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
446
+ :header_params => header_params,
447
+ :query_params => query_params,
448
+ :form_params => form_params,
449
+ :body => post_body,
450
+ :auth_names => auth_names,
451
+ :return_type => 'PendingTemplate')
452
+ if @api_client.config.debugging
453
+ @api_client.config.logger.debug "API called: PDFApi#create_template_from_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
454
+ end
455
+ return data, status_code, headers
456
+ end
457
+
299
458
  # Expire a combined submission
300
459
  # @param combined_submission_id
301
460
  # @param [Hash] opts the optional parameters
@@ -400,20 +559,20 @@ module FormAPI
400
559
 
401
560
  # Generates a new PDF
402
561
  # @param template_id
403
- # @param create_submission_data
562
+ # @param submission_data
404
563
  # @param [Hash] opts the optional parameters
405
564
  # @return [CreateSubmissionResponse]
406
- def generate_pdf(template_id, create_submission_data, opts = {})
407
- data, _status_code, _headers = generate_pdf_with_http_info(template_id, create_submission_data, opts)
565
+ def generate_pdf(template_id, submission_data, opts = {})
566
+ data, _status_code, _headers = generate_pdf_with_http_info(template_id, submission_data, opts)
408
567
  data
409
568
  end
410
569
 
411
570
  # Generates a new PDF
412
571
  # @param template_id
413
- # @param create_submission_data
572
+ # @param submission_data
414
573
  # @param [Hash] opts the optional parameters
415
574
  # @return [Array<(CreateSubmissionResponse, Fixnum, Hash)>] CreateSubmissionResponse data, response status code and response headers
416
- def generate_pdf_with_http_info(template_id, create_submission_data, opts = {})
575
+ def generate_pdf_with_http_info(template_id, submission_data, opts = {})
417
576
  if @api_client.config.debugging
418
577
  @api_client.config.logger.debug 'Calling API: PDFApi.generate_pdf ...'
419
578
  end
@@ -421,9 +580,9 @@ module FormAPI
421
580
  if @api_client.config.client_side_validation && template_id.nil?
422
581
  fail ArgumentError, "Missing the required parameter 'template_id' when calling PDFApi.generate_pdf"
423
582
  end
424
- # verify the required parameter 'create_submission_data' is set
425
- if @api_client.config.client_side_validation && create_submission_data.nil?
426
- fail ArgumentError, "Missing the required parameter 'create_submission_data' when calling PDFApi.generate_pdf"
583
+ # verify the required parameter 'submission_data' is set
584
+ if @api_client.config.client_side_validation && submission_data.nil?
585
+ fail ArgumentError, "Missing the required parameter 'submission_data' when calling PDFApi.generate_pdf"
427
586
  end
428
587
  # resource path
429
588
  local_var_path = '/templates/{template_id}/submissions'.sub('{' + 'template_id' + '}', template_id.to_s)
@@ -442,7 +601,7 @@ module FormAPI
442
601
  form_params = {}
443
602
 
444
603
  # http body (model)
445
- post_body = @api_client.object_to_http_body(create_submission_data)
604
+ post_body = @api_client.object_to_http_body(submission_data)
446
605
  auth_names = ['api_token_basic']
447
606
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
448
607
  :header_params => header_params,
@@ -559,6 +718,51 @@ module FormAPI
559
718
  return data, status_code, headers
560
719
  end
561
720
 
721
+ # Get a presigned URL so that you can upload a file to our AWS S3 bucket
722
+ # @param [Hash] opts the optional parameters
723
+ # @return [Hash<String, Object>]
724
+ def get_presign_url(opts = {})
725
+ data, _status_code, _headers = get_presign_url_with_http_info(opts)
726
+ data
727
+ end
728
+
729
+ # Get a presigned URL so that you can upload a file to our AWS S3 bucket
730
+ # @param [Hash] opts the optional parameters
731
+ # @return [Array<(Hash<String, Object>, Fixnum, Hash)>] Hash<String, Object> data, response status code and response headers
732
+ def get_presign_url_with_http_info(opts = {})
733
+ if @api_client.config.debugging
734
+ @api_client.config.logger.debug 'Calling API: PDFApi.get_presign_url ...'
735
+ end
736
+ # resource path
737
+ local_var_path = '/uploads/presign'
738
+
739
+ # query parameters
740
+ query_params = {}
741
+
742
+ # header parameters
743
+ header_params = {}
744
+ # HTTP header 'Accept' (if needed)
745
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
746
+
747
+ # form parameters
748
+ form_params = {}
749
+
750
+ # http body (model)
751
+ post_body = nil
752
+ auth_names = ['api_token_basic']
753
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
754
+ :header_params => header_params,
755
+ :query_params => query_params,
756
+ :form_params => form_params,
757
+ :body => post_body,
758
+ :auth_names => auth_names,
759
+ :return_type => 'Hash<String, Object>')
760
+ if @api_client.config.debugging
761
+ @api_client.config.logger.debug "API called: PDFApi#get_presign_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
762
+ end
763
+ return data, status_code, headers
764
+ end
765
+
562
766
  # Check the status of a PDF
563
767
  # @param submission_id
564
768
  # @param [Hash] opts the optional parameters