docspring 1.0.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/VERSION +1 -1
  3. data/CHANGELOG.md +14 -37
  4. data/Gemfile +2 -1
  5. data/Gemfile.lock +37 -32
  6. data/LICENSE +1 -1
  7. data/README.md +26 -15
  8. data/docs/AddFieldsData.md +8 -0
  9. data/docs/AddFieldsTemplateResponse.md +10 -0
  10. data/docs/CombinePdfsData.md +4 -4
  11. data/docs/CombinedSubmission.md +1 -0
  12. data/docs/CombinedSubmissionData.md +3 -3
  13. data/docs/{CreateTemplateData.md → CreateHtmlTemplateData.md} +2 -2
  14. data/docs/CreateSubmissionDataRequestData.md +2 -2
  15. data/docs/CreateTemplateFromUploadData.md +8 -0
  16. data/docs/HtmlTemplateData.md +24 -0
  17. data/docs/PDFApi.md +169 -15
  18. data/docs/PendingTemplate.md +2 -0
  19. data/docs/Submission.md +5 -0
  20. data/docs/SubmissionBatchData.md +2 -2
  21. data/docs/SubmissionData.md +4 -3
  22. data/docs/SubmissionDataBatchRequest.md +2 -2
  23. data/docs/SubmissionDataRequest.md +2 -0
  24. data/docs/Template.md +2 -0
  25. data/docs/{Templatesv2Template.md → TemplateData.md} +11 -7
  26. data/docs/TemplatestemplateIdaddFieldsFields.md +92 -0
  27. data/docs/UpdateSubmissionDataRequestData.md +9 -9
  28. data/docs/UpdateTemplateData.md +8 -0
  29. data/docs/UpdateTemplateResponse.md +9 -0
  30. data/docs/UploadTemplateData.md +25 -0
  31. data/docs/{Templatesv2TemplateDocument.md → UploadTemplateDataDocument.md} +2 -2
  32. data/docs/{Templatesv2TemplateDocumentMetadata.md → UploadTemplateDataDocumentMetadata.md} +1 -1
  33. data/docspring.gemspec +3 -3
  34. data/lib/docspring.rb +13 -5
  35. data/lib/docspring/api/pdf_api.rb +193 -22
  36. data/lib/docspring/api_client.rb +1 -1
  37. data/lib/docspring/api_error.rb +1 -1
  38. data/lib/docspring/configuration.rb +1 -1
  39. data/lib/docspring/models/add_fields_data.rb +190 -0
  40. data/lib/docspring/models/add_fields_template_response.rb +239 -0
  41. data/lib/docspring/models/authentication_error.rb +1 -1
  42. data/lib/docspring/models/authentication_success_response.rb +1 -1
  43. data/lib/docspring/models/combine_pdfs_data.rb +28 -28
  44. data/lib/docspring/models/combined_submission.rb +11 -2
  45. data/lib/docspring/models/combined_submission_action.rb +1 -6
  46. data/lib/docspring/models/combined_submission_data.rb +23 -23
  47. data/lib/docspring/models/create_combined_submission_response.rb +1 -1
  48. data/lib/docspring/models/create_custom_file_data.rb +1 -1
  49. data/lib/docspring/models/create_custom_file_response.rb +1 -1
  50. data/lib/docspring/models/create_folder_data.rb +1 -1
  51. data/lib/docspring/models/{create_template_data.rb → create_html_template_data.rb} +3 -3
  52. data/lib/docspring/models/create_submission_batch_response.rb +1 -1
  53. data/lib/docspring/models/create_submission_batch_submissions_response.rb +1 -1
  54. data/lib/docspring/models/create_submission_data_request_data.rb +20 -20
  55. data/lib/docspring/models/create_submission_data_request_token_response.rb +1 -1
  56. data/lib/docspring/models/create_submission_data_request_token_response_token.rb +1 -1
  57. data/lib/docspring/models/create_submission_response.rb +1 -1
  58. data/lib/docspring/models/create_template_from_upload_data.rb +188 -0
  59. data/lib/docspring/models/custom_file.rb +1 -1
  60. data/lib/docspring/models/error.rb +1 -1
  61. data/lib/docspring/models/folder.rb +1 -1
  62. data/lib/docspring/models/folders_folder.rb +1 -1
  63. data/lib/docspring/models/html_template_data.rb +373 -0
  64. data/lib/docspring/models/invalid_request.rb +1 -1
  65. data/lib/docspring/models/move_folder_data.rb +1 -1
  66. data/lib/docspring/models/move_template_data.rb +1 -1
  67. data/lib/docspring/models/pending_template.rb +20 -2
  68. data/lib/docspring/models/rename_folder_data.rb +1 -1
  69. data/lib/docspring/models/submission.rb +52 -7
  70. data/lib/docspring/models/submission_action.rb +1 -6
  71. data/lib/docspring/models/submission_batch.rb +1 -1
  72. data/lib/docspring/models/submission_batch_data.rb +16 -16
  73. data/lib/docspring/models/submission_data.rb +34 -25
  74. data/lib/docspring/models/submission_data_batch_request.rb +20 -20
  75. data/lib/docspring/models/submission_data_request.rb +23 -20
  76. data/lib/docspring/models/template.rb +20 -2
  77. data/lib/docspring/models/{templatesv2_template.rb → template_data.rb} +81 -45
  78. data/lib/docspring/models/templatestemplate_idadd_fields_fields.rb +1306 -0
  79. data/lib/docspring/models/update_data_request_response.rb +1 -1
  80. data/lib/docspring/models/update_submission_data_request_data.rb +79 -79
  81. data/lib/docspring/models/update_template_data.rb +188 -0
  82. data/lib/docspring/models/update_template_response.rb +228 -0
  83. data/lib/docspring/models/upload_template_data.rb +382 -0
  84. data/lib/docspring/models/{templatesv2_template_document.rb → upload_template_data_document.rb} +3 -3
  85. data/lib/docspring/models/{templatesv2_template_document_metadata.rb → upload_template_data_document_metadata.rb} +2 -2
  86. data/lib/docspring/version.rb +2 -2
  87. data/spec/api/client_integration_spec.rb +14 -2
  88. data/spec/api/pdf_api_integration_spec.rb +49 -18
  89. data/spec/api/pdf_api_spec_original.skipped.rb +51 -11
  90. data/spec/api_client_spec.rb +1 -1
  91. data/spec/configuration_spec.rb +1 -1
  92. data/spec/models/add_fields_data_spec.rb +41 -0
  93. data/spec/models/add_fields_template_response_spec.rb +57 -0
  94. data/spec/models/authentication_error_spec.rb +1 -1
  95. data/spec/models/authentication_success_response_spec.rb +1 -1
  96. data/spec/models/combine_pdfs_data_spec.rb +5 -5
  97. data/spec/models/combined_submission_action_spec.rb +1 -1
  98. data/spec/models/combined_submission_data_spec.rb +5 -5
  99. data/spec/models/combined_submission_spec.rb +7 -1
  100. data/spec/models/create_combined_submission_response_spec.rb +1 -1
  101. data/spec/models/create_custom_file_data_spec.rb +1 -1
  102. data/spec/models/create_custom_file_response_spec.rb +1 -1
  103. data/spec/models/create_folder_data_spec.rb +1 -1
  104. data/spec/models/create_html_template_data_spec.rb +41 -0
  105. data/spec/models/create_submission_batch_response_spec.rb +1 -1
  106. data/spec/models/create_submission_batch_submissions_response_spec.rb +1 -1
  107. data/spec/models/create_submission_data_request_data_spec.rb +9 -9
  108. data/spec/models/create_submission_data_request_token_response_spec.rb +1 -1
  109. data/spec/models/create_submission_data_request_token_response_token_spec.rb +1 -1
  110. data/spec/models/create_submission_response_spec.rb +1 -1
  111. data/spec/models/{create_template_data_spec.rb → create_template_from_upload_data_spec.rb} +7 -7
  112. data/spec/models/custom_file_spec.rb +1 -1
  113. data/spec/models/error_spec.rb +1 -1
  114. data/spec/models/folder_spec.rb +1 -1
  115. data/spec/models/folders_folder_spec.rb +1 -1
  116. data/spec/models/html_template_data_spec.rb +145 -0
  117. data/spec/models/invalid_request_spec.rb +1 -1
  118. data/spec/models/move_folder_data_spec.rb +1 -1
  119. data/spec/models/move_template_data_spec.rb +1 -1
  120. data/spec/models/pending_template_spec.rb +13 -1
  121. data/spec/models/rename_folder_data_spec.rb +1 -1
  122. data/spec/models/submission_action_spec.rb +1 -1
  123. data/spec/models/submission_batch_data_spec.rb +3 -3
  124. data/spec/models/submission_batch_spec.rb +1 -1
  125. data/spec/models/submission_data_batch_request_spec.rb +5 -5
  126. data/spec/models/submission_data_request_spec.rb +13 -1
  127. data/spec/models/submission_data_spec.rb +11 -5
  128. data/spec/models/submission_spec.rb +32 -2
  129. data/spec/models/{templatesv2_template_spec.rb → template_data_spec.rb} +40 -16
  130. data/spec/models/template_spec.rb +13 -1
  131. data/spec/models/templatestemplate_idadd_fields_fields_spec.rb +589 -0
  132. data/spec/models/update_data_request_response_spec.rb +1 -1
  133. data/spec/models/update_submission_data_request_data_spec.rb +17 -17
  134. data/spec/models/update_template_data_spec.rb +41 -0
  135. data/spec/models/update_template_response_spec.rb +51 -0
  136. data/spec/models/{templatesv2_template_document_metadata_spec.rb → upload_template_data_document_metadata_spec.rb} +7 -7
  137. data/spec/models/{templatesv2_template_document_spec.rb → upload_template_data_document_spec.rb} +7 -7
  138. data/spec/models/upload_template_data_spec.rb +151 -0
  139. data/spec/spec_helper.rb +1 -1
  140. metadata +60 -32
  141. data/.swagger-codegen-ignore +0 -31
  142. data/.swagger-codegen/VERSION +0 -1
  143. data/.swagger-revision +0 -1
  144. data/.travis.yml +0 -8
@@ -6,14 +6,14 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module DocSpring
16
- class Templatesv2TemplateDocument
16
+ class UploadTemplateDataDocument
17
17
  attr_accessor :metadata
18
18
 
19
19
  attr_accessor :id
@@ -54,7 +54,7 @@ module DocSpring
54
54
  # Attribute type mapping.
55
55
  def self.openapi_types
56
56
  {
57
- :'metadata' => :'Templatesv2TemplateDocumentMetadata',
57
+ :'metadata' => :'UploadTemplateDataDocumentMetadata',
58
58
  :'id' => :'String',
59
59
  :'storage' => :'String'
60
60
  }
@@ -6,14 +6,14 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module DocSpring
16
- class Templatesv2TemplateDocumentMetadata
16
+ class UploadTemplateDataDocumentMetadata
17
17
  attr_accessor :filename
18
18
 
19
19
  attr_accessor :size
@@ -6,10 +6,10 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12
 
13
13
  module DocSpring
14
- VERSION = '1.0.0'
14
+ VERSION = '1.3.1'
15
15
  end
@@ -6,6 +6,8 @@ describe DocSpring::Client do
6
6
  DocSpring.configure do |c|
7
7
  c.api_token_id = 'api_token123'
8
8
  c.api_token_secret = 'testsecret123'
9
+ end
10
+ DocSpring.configure do |c|
9
11
  c.host = 'http://api.docspring.local:31337'
10
12
  end
11
13
  end
@@ -16,20 +18,25 @@ describe DocSpring::Client do
16
18
  template_id = 'tpl_000000000000000001'
17
19
 
18
20
  expect(client).to receive(:sleep).with(1).once
19
-
20
21
  response = client.generate_pdf(
21
22
  template_id: template_id,
22
23
  data: {
23
24
  title: 'Test PDF',
24
25
  description: 'This PDF is great!',
26
+ },
27
+ field_overrides: {
28
+ title: {
29
+ required: false
30
+ }
25
31
  }
26
32
  )
33
+ submission = response.submission
27
34
 
28
35
  expect(response.status).to eq 'success'
29
- submission = response.submission
30
36
  expect(submission.id).to start_with 'sub_'
31
37
  expect(submission.expired).to eq false
32
38
  expect(submission.state).to eq 'processed'
39
+ expect(submission.pdf_hash).to eq 'TEST_SUBMISSION_SHA256_HASH'
33
40
  expect(submission.download_url).to include 'submissions/submission.pdf'
34
41
  end
35
42
 
@@ -98,6 +105,7 @@ describe DocSpring::Client do
98
105
  expect(submission1.id).to start_with 'sub_'
99
106
  expect(submission1.expired).to eq false
100
107
  expect(submission1.state).to eq 'processed'
108
+ expect(submission1.pdf_hash).to eq 'TEST_SUBMISSION_SHA256_HASH'
101
109
  expect(submission1.download_url).to include 'submissions/submission.pdf'
102
110
 
103
111
  submission_response2 = response.submissions[1]
@@ -105,6 +113,7 @@ describe DocSpring::Client do
105
113
  submission2 = submission_response2.submission
106
114
  expect(submission2.id).to start_with 'sub_'
107
115
  expect(submission2.expired).to eq false
116
+ expect(submission2.pdf_hash).to eq 'TEST_SUBMISSION_SHA256_HASH'
108
117
  expect(submission2.state).to eq 'processed'
109
118
  end
110
119
 
@@ -154,6 +163,7 @@ describe DocSpring::Client do
154
163
  submission2 = submission_response2.submission
155
164
  expect(submission2.id).to start_with 'sub_'
156
165
  expect(submission2.expired).to eq false
166
+ expect(submission2.pdf_hash).to eq nil
157
167
  expect(submission2.state).to eq 'invalid_data'
158
168
  end
159
169
  end
@@ -212,6 +222,7 @@ describe DocSpring::Client do
212
222
  )
213
223
  expect(combined_submission.download_url).to include(
214
224
  'combined_submissions/combined_submission.pdf')
225
+ expect(combined_submission.pdf_hash).to eq 'TEST_COMBINED_SUBMISSION_SHA256_HASH'
215
226
  end
216
227
  end
217
228
 
@@ -254,6 +265,7 @@ describe DocSpring::Client do
254
265
  end
255
266
  expect(combined_submission.download_url).to include(
256
267
  'combined_submissions/combined_submission.pdf')
268
+ expect(combined_submission.pdf_hash).to eq 'TEST_COMBINED_SUBMISSION_SHA256_HASH'
257
269
  end
258
270
  end
259
271
  end
@@ -25,7 +25,7 @@ describe 'PDFApi' do
25
25
  end
26
26
  end
27
27
 
28
- let(:api_instance) { DocSpring::PDFApi.new }
28
+ let(:client) { DocSpring::PDFApi.new }
29
29
 
30
30
  after do
31
31
  # run after each test
@@ -40,7 +40,7 @@ describe 'PDFApi' do
40
40
  describe 'batch_generate_pdf v1 test' do
41
41
  it 'should work' do
42
42
  template_id = 'tpl_000000000000000001'
43
- responses = api_instance.batch_generate_pdf_v1(template_id, [
43
+ responses = client.batch_generate_pdf_v1(template_id, [
44
44
  {
45
45
  data: {
46
46
  title: 'Test PDF',
@@ -67,7 +67,7 @@ describe 'PDFApi' do
67
67
  describe 'batch_generate_pdfs v2 test' do
68
68
  it 'should work' do
69
69
  template_id = 'tpl_000000000000000001'
70
- response = api_instance.batch_generate_pdfs(
70
+ response = client.batch_generate_pdfs(
71
71
  metadata: { user_id: 123 },
72
72
  test: true,
73
73
  submissions: [
@@ -109,7 +109,7 @@ describe 'PDFApi' do
109
109
  describe 'get_submission_batch test' do
110
110
  it 'should get the batch including submissions' do
111
111
  submission_batch_id = 'sbb_000000000000000001'
112
- batch = api_instance.get_submission_batch(submission_batch_id, include_submissions: true)
112
+ batch = client.get_submission_batch(submission_batch_id, include_submissions: true)
113
113
  expect(batch.id).to eq 'sbb_000000000000000001'
114
114
  expect(batch.total_count).to eq 2
115
115
  expect(batch.pending_count).to eq 0
@@ -120,12 +120,43 @@ describe 'PDFApi' do
120
120
 
121
121
  it 'should get the batch without submissions' do
122
122
  submission_batch_id = 'sbb_000000000000000001'
123
- batch = api_instance.get_submission_batch(submission_batch_id)
123
+ batch = client.get_submission_batch(submission_batch_id)
124
124
  expect(batch.id).to eq 'sbb_000000000000000001'
125
125
  expect(batch.submissions).to be_nil
126
126
  end
127
127
  end
128
128
 
129
+ it 'should add fields to a template' do
130
+ template_id = 'tpl_000000000000000001'
131
+
132
+ response = client.add_fields_to_template(
133
+ template_id,
134
+ fields: [
135
+ {
136
+ name: 'new_field1',
137
+ page: 1,
138
+ required: false,
139
+ },
140
+ {
141
+ name: 'new_field2',
142
+ type: 'number',
143
+ page: 1,
144
+ required: false,
145
+ },
146
+ {
147
+ name: 'new_field3',
148
+ type: 'date',
149
+ page: 1,
150
+ required: false,
151
+ x: 300,
152
+ },
153
+ ]
154
+ )
155
+ expect(response.status).to eq 'success'
156
+ expect(response.new_field_ids).to eq [3, 4, 5]
157
+ expect(response.new_field_ids[0].class).to eq Integer
158
+ end
159
+
129
160
  # integration tests for combine_submissions
130
161
  # Merge generated PDFs together
131
162
  # @param [Hash] opts the optional parameters
@@ -133,7 +164,7 @@ describe 'PDFApi' do
133
164
  # @return [CreateCombinedSubmissionResponse]
134
165
  describe 'combine_submissions test' do
135
166
  it 'should work' do
136
- response = api_instance.combine_submissions(
167
+ response = client.combine_submissions(
137
168
  submission_ids: %w[sub_000000000000000001 sub_000000000000000002])
138
169
  expect(response.status).to eq 'success'
139
170
  expect(response.combined_submission.id).to start_with 'com_'
@@ -148,7 +179,7 @@ describe 'PDFApi' do
148
179
  describe 'create_data_request_token test' do
149
180
  it 'should work' do
150
181
  data_request_id = 'drq_000000000000000001' # String |
151
- response = api_instance.create_data_request_token(data_request_id)
182
+ response = client.create_data_request_token(data_request_id)
152
183
  expect(response.status).to eq 'success'
153
184
  expect(response.token.id).to_not be_nil
154
185
  expect(response.token.secret).to_not be_nil
@@ -167,7 +198,7 @@ describe 'PDFApi' do
167
198
  describe 'expire_combined_submission test' do
168
199
  it 'should work' do
169
200
  combined_submission_id = 'com_000000000000000001'
170
- combined_submission = api_instance.expire_combined_submission(combined_submission_id)
201
+ combined_submission = client.expire_combined_submission(combined_submission_id)
171
202
  expect(combined_submission.expired).to eq true
172
203
  end
173
204
  end
@@ -179,7 +210,7 @@ describe 'PDFApi' do
179
210
  describe 'expire_submission test' do
180
211
  it 'should work' do
181
212
  submission_id = 'sub_000000000000000001'
182
- submission = api_instance.expire_submission(submission_id)
213
+ submission = client.expire_submission(submission_id)
183
214
  expect(submission.expired).to eq true
184
215
  end
185
216
  end
@@ -192,7 +223,7 @@ describe 'PDFApi' do
192
223
  describe 'generate_pdf test' do
193
224
  it 'should work' do
194
225
  template_id = 'tpl_000000000000000001'
195
- response = api_instance.generate_pdf(template_id,
226
+ response = client.generate_pdf(template_id,
196
227
  data: {
197
228
  title: 'Test PDF',
198
229
  description: 'This PDF is great!',
@@ -213,7 +244,7 @@ describe 'PDFApi' do
213
244
  describe 'generate_pdf test with data_requests' do
214
245
  it 'should work' do
215
246
  template_id = 'tpl_000000000000000001'
216
- response = api_instance.generate_pdf(template_id,
247
+ response = client.generate_pdf(template_id,
217
248
  data: {
218
249
  title: 'Test PDF',
219
250
  },
@@ -254,7 +285,7 @@ describe 'PDFApi' do
254
285
  describe 'get_combined_submission test' do
255
286
  it 'should work' do
256
287
  combined_submission_id = 'com_000000000000000001'
257
- combined_submission = api_instance.get_combined_submission(combined_submission_id)
288
+ combined_submission = client.get_combined_submission(combined_submission_id)
258
289
  expect(combined_submission.id).to start_with 'com_'
259
290
  end
260
291
  end
@@ -266,7 +297,7 @@ describe 'PDFApi' do
266
297
  describe 'get_data_request test' do
267
298
  it 'should work' do
268
299
  data_request_id = 'drq_000000000000000001' # String |
269
- data_request = api_instance.get_data_request(data_request_id)
300
+ data_request = client.get_data_request(data_request_id)
270
301
  expect(data_request.id).to start_with 'drq_'
271
302
  expect(data_request.order).to eq 1
272
303
  expect(data_request.name).to eq 'John Doe'
@@ -287,7 +318,7 @@ describe 'PDFApi' do
287
318
  describe 'update_data_request test' do
288
319
  it 'should work' do
289
320
  data_request_id = 'drq_000000000000000001' # String |
290
- response = api_instance.update_data_request(
321
+ response = client.update_data_request(
291
322
  data_request_id,
292
323
  name: 'Harry Smith',
293
324
  email: 'hsmith@example.com',
@@ -323,7 +354,7 @@ describe 'PDFApi' do
323
354
  describe 'get_submission test' do
324
355
  it 'should work' do
325
356
  submission_id = 'sub_000000000000000001'
326
- submission = api_instance.get_submission(submission_id)
357
+ submission = client.get_submission(submission_id)
327
358
  expect(submission.id).to start_with 'sub_'
328
359
  end
329
360
  end
@@ -340,7 +371,7 @@ describe 'PDFApi' do
340
371
  page: 1, # Integer | Default: 1
341
372
  per_page: 10 # Integer | Default: 50
342
373
  }
343
- templates = api_instance.list_templates(opts)
374
+ templates = client.list_templates(opts)
344
375
  expect(templates.size).to eq 1
345
376
  expect(templates.first.id).to eq 'tpl_000000000000000002'
346
377
  end
@@ -359,7 +390,7 @@ describe 'PDFApi' do
359
390
  page: 2, # Integer | Default: 1
360
391
  per_page: 1 # Integer | Default: 50
361
392
  }
362
- result = api_instance.list_templates(opts)
393
+ result = client.list_templates(opts)
363
394
  expect(result).to_not be_nil
364
395
  end
365
396
  end
@@ -370,7 +401,7 @@ describe 'PDFApi' do
370
401
  # @return [AuthenticationSuccessResponse]
371
402
  describe 'test_authentication test' do
372
403
  it 'should work' do
373
- response = api_instance.test_authentication
404
+ response = client.test_authentication
374
405
  expect(response.status).to eq 'success'
375
406
  end
376
407
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12
 
@@ -38,6 +38,20 @@ describe 'PDFApi' do
38
38
  end
39
39
  end
40
40
 
41
+ # integration tests for add_fields_to_template
42
+ # Add new fields to a Template
43
+ # @param template_id
44
+ # @param add_fields_data
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [AddFieldsTemplateResponse]
47
+ describe 'add_fields_to_template test' do
48
+ it 'should work' do
49
+ template_id = 'tpl_000000000000000002' # String |
50
+ add_fields_data = DocSpring::AddFieldsData.new # AddFieldsData |
51
+ result = api_instance.add_fields_to_template(template_id, add_fields_data)
52
+ expect(result).to_not be_nil
53
+ end
54
+ end
41
55
  # integration tests for batch_generate_pdf_v1
42
56
  # Generates multiple PDFs
43
57
  # @param template_id
@@ -124,33 +138,45 @@ describe 'PDFApi' do
124
138
  expect(result).to_not be_nil
125
139
  end
126
140
  end
127
- # integration tests for create_template
128
- # Upload a new PDF template with a file upload
141
+ # integration tests for create_html_template
142
+ # Create a new HTML template
143
+ # @param create_html_template_data
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [PendingTemplate]
146
+ describe 'create_html_template test' do
147
+ it 'should work' do
148
+ create_html_template_data = DocSpring::CreateHtmlTemplateData.new # CreateHtmlTemplateData |
149
+ result = api_instance.create_html_template(create_html_template_data)
150
+ expect(result).to_not be_nil
151
+ end
152
+ end
153
+ # integration tests for create_pdf_template
154
+ # Create a new PDF template with a form POST file upload
129
155
  # @param template_document
130
156
  # @param template_name
131
157
  # @param [Hash] opts the optional parameters
132
158
  # @option opts [String] :template_parent_folder_id
133
159
  # @return [PendingTemplate]
134
- describe 'create_template test' do
160
+ describe 'create_pdf_template test' do
135
161
  it 'should work' do
136
162
  template_document = File.new('/path/to/file') # File |
137
163
  template_name = 'template_name_example' # String |
138
164
  opts = {
139
165
  template_parent_folder_id: 'template_parent_folder_id_example' # String |
140
166
  }
141
- result = api_instance.create_template(template_document, template_name, opts)
167
+ result = api_instance.create_pdf_template(template_document, template_name, opts)
142
168
  expect(result).to_not be_nil
143
169
  end
144
170
  end
145
- # integration tests for create_template_from_upload
171
+ # integration tests for create_pdf_template_from_upload
146
172
  # Create a new PDF template from a cached presign upload
147
- # @param create_template_data
173
+ # @param create_template_from_upload_data
148
174
  # @param [Hash] opts the optional parameters
149
175
  # @return [PendingTemplate]
150
- describe 'create_template_from_upload test' do
176
+ describe 'create_pdf_template_from_upload test' do
151
177
  it 'should work' do
152
- create_template_data = DocSpring::CreateTemplateData.new # CreateTemplateData |
153
- result = api_instance.create_template_from_upload(create_template_data)
178
+ create_template_from_upload_data = DocSpring::CreateTemplateFromUploadData.new # CreateTemplateFromUploadData |
179
+ result = api_instance.create_pdf_template_from_upload(create_template_from_upload_data)
154
180
  expect(result).to_not be_nil
155
181
  end
156
182
  end
@@ -248,7 +274,7 @@ describe 'PDFApi' do
248
274
  it 'should work' do
249
275
  submission_id = 'sub_000000000000000001' # String |
250
276
  opts = {
251
- include_data: false # BOOLEAN |
277
+ include_data: true # BOOLEAN |
252
278
  }
253
279
  result = api_instance.get_submission(submission_id, opts)
254
280
  expect(result).to_not be_nil
@@ -394,4 +420,18 @@ describe 'PDFApi' do
394
420
  expect(result).to_not be_nil
395
421
  end
396
422
  end
423
+ # integration tests for update_template
424
+ # Update a Template
425
+ # @param template_id
426
+ # @param update_template_data
427
+ # @param [Hash] opts the optional parameters
428
+ # @return [UpdateTemplateResponse]
429
+ describe 'update_template test' do
430
+ it 'should work' do
431
+ template_id = 'tpl_000000000000000003' # String |
432
+ update_template_data = DocSpring::UpdateTemplateData.new # UpdateTemplateData |
433
+ result = api_instance.update_template(template_id, update_template_data)
434
+ expect(result).to_not be_nil
435
+ end
436
+ end
397
437
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.0-SNAPSHOT
9
+ OpenAPI Generator version: 3.3.0
10
10
 
11
11
  =end
12
12