docspring 1.0.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.openapi-generator/VERSION +1 -1
- data/CHANGELOG.md +14 -37
- data/Gemfile +2 -1
- data/Gemfile.lock +37 -32
- data/LICENSE +1 -1
- data/README.md +26 -15
- data/docs/AddFieldsData.md +8 -0
- data/docs/AddFieldsTemplateResponse.md +10 -0
- data/docs/CombinePdfsData.md +4 -4
- data/docs/CombinedSubmission.md +1 -0
- data/docs/CombinedSubmissionData.md +3 -3
- data/docs/{CreateTemplateData.md → CreateHtmlTemplateData.md} +2 -2
- data/docs/CreateSubmissionDataRequestData.md +2 -2
- data/docs/CreateTemplateFromUploadData.md +8 -0
- data/docs/HtmlTemplateData.md +24 -0
- data/docs/PDFApi.md +169 -15
- data/docs/PendingTemplate.md +2 -0
- data/docs/Submission.md +5 -0
- data/docs/SubmissionBatchData.md +2 -2
- data/docs/SubmissionData.md +4 -3
- data/docs/SubmissionDataBatchRequest.md +2 -2
- data/docs/SubmissionDataRequest.md +2 -0
- data/docs/Template.md +2 -0
- data/docs/{Templatesv2Template.md → TemplateData.md} +11 -7
- data/docs/TemplatestemplateIdaddFieldsFields.md +92 -0
- data/docs/UpdateSubmissionDataRequestData.md +9 -9
- data/docs/UpdateTemplateData.md +8 -0
- data/docs/UpdateTemplateResponse.md +9 -0
- data/docs/UploadTemplateData.md +25 -0
- data/docs/{Templatesv2TemplateDocument.md → UploadTemplateDataDocument.md} +2 -2
- data/docs/{Templatesv2TemplateDocumentMetadata.md → UploadTemplateDataDocumentMetadata.md} +1 -1
- data/docspring.gemspec +3 -3
- data/lib/docspring.rb +13 -5
- data/lib/docspring/api/pdf_api.rb +193 -22
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/models/add_fields_data.rb +190 -0
- data/lib/docspring/models/add_fields_template_response.rb +239 -0
- data/lib/docspring/models/authentication_error.rb +1 -1
- data/lib/docspring/models/authentication_success_response.rb +1 -1
- data/lib/docspring/models/combine_pdfs_data.rb +28 -28
- data/lib/docspring/models/combined_submission.rb +11 -2
- data/lib/docspring/models/combined_submission_action.rb +1 -6
- data/lib/docspring/models/combined_submission_data.rb +23 -23
- data/lib/docspring/models/create_combined_submission_response.rb +1 -1
- data/lib/docspring/models/create_custom_file_data.rb +1 -1
- data/lib/docspring/models/create_custom_file_response.rb +1 -1
- data/lib/docspring/models/create_folder_data.rb +1 -1
- data/lib/docspring/models/{create_template_data.rb → create_html_template_data.rb} +3 -3
- data/lib/docspring/models/create_submission_batch_response.rb +1 -1
- data/lib/docspring/models/create_submission_batch_submissions_response.rb +1 -1
- data/lib/docspring/models/create_submission_data_request_data.rb +20 -20
- data/lib/docspring/models/create_submission_data_request_token_response.rb +1 -1
- data/lib/docspring/models/create_submission_data_request_token_response_token.rb +1 -1
- data/lib/docspring/models/create_submission_response.rb +1 -1
- data/lib/docspring/models/create_template_from_upload_data.rb +188 -0
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/error.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/folders_folder.rb +1 -1
- data/lib/docspring/models/html_template_data.rb +373 -0
- data/lib/docspring/models/invalid_request.rb +1 -1
- data/lib/docspring/models/move_folder_data.rb +1 -1
- data/lib/docspring/models/move_template_data.rb +1 -1
- data/lib/docspring/models/pending_template.rb +20 -2
- data/lib/docspring/models/rename_folder_data.rb +1 -1
- data/lib/docspring/models/submission.rb +52 -7
- data/lib/docspring/models/submission_action.rb +1 -6
- data/lib/docspring/models/submission_batch.rb +1 -1
- data/lib/docspring/models/submission_batch_data.rb +16 -16
- data/lib/docspring/models/submission_data.rb +34 -25
- data/lib/docspring/models/submission_data_batch_request.rb +20 -20
- data/lib/docspring/models/submission_data_request.rb +23 -20
- data/lib/docspring/models/template.rb +20 -2
- data/lib/docspring/models/{templatesv2_template.rb → template_data.rb} +81 -45
- data/lib/docspring/models/templatestemplate_idadd_fields_fields.rb +1306 -0
- data/lib/docspring/models/update_data_request_response.rb +1 -1
- data/lib/docspring/models/update_submission_data_request_data.rb +79 -79
- data/lib/docspring/models/update_template_data.rb +188 -0
- data/lib/docspring/models/update_template_response.rb +228 -0
- data/lib/docspring/models/upload_template_data.rb +382 -0
- data/lib/docspring/models/{templatesv2_template_document.rb → upload_template_data_document.rb} +3 -3
- data/lib/docspring/models/{templatesv2_template_document_metadata.rb → upload_template_data_document_metadata.rb} +2 -2
- data/lib/docspring/version.rb +2 -2
- data/spec/api/client_integration_spec.rb +14 -2
- data/spec/api/pdf_api_integration_spec.rb +49 -18
- data/spec/api/pdf_api_spec_original.skipped.rb +51 -11
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/add_fields_data_spec.rb +41 -0
- data/spec/models/add_fields_template_response_spec.rb +57 -0
- data/spec/models/authentication_error_spec.rb +1 -1
- data/spec/models/authentication_success_response_spec.rb +1 -1
- data/spec/models/combine_pdfs_data_spec.rb +5 -5
- data/spec/models/combined_submission_action_spec.rb +1 -1
- data/spec/models/combined_submission_data_spec.rb +5 -5
- data/spec/models/combined_submission_spec.rb +7 -1
- data/spec/models/create_combined_submission_response_spec.rb +1 -1
- data/spec/models/create_custom_file_data_spec.rb +1 -1
- data/spec/models/create_custom_file_response_spec.rb +1 -1
- data/spec/models/create_folder_data_spec.rb +1 -1
- data/spec/models/create_html_template_data_spec.rb +41 -0
- data/spec/models/create_submission_batch_response_spec.rb +1 -1
- data/spec/models/create_submission_batch_submissions_response_spec.rb +1 -1
- data/spec/models/create_submission_data_request_data_spec.rb +9 -9
- data/spec/models/create_submission_data_request_token_response_spec.rb +1 -1
- data/spec/models/create_submission_data_request_token_response_token_spec.rb +1 -1
- data/spec/models/create_submission_response_spec.rb +1 -1
- data/spec/models/{create_template_data_spec.rb → create_template_from_upload_data_spec.rb} +7 -7
- data/spec/models/custom_file_spec.rb +1 -1
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/folders_folder_spec.rb +1 -1
- data/spec/models/html_template_data_spec.rb +145 -0
- data/spec/models/invalid_request_spec.rb +1 -1
- data/spec/models/move_folder_data_spec.rb +1 -1
- data/spec/models/move_template_data_spec.rb +1 -1
- data/spec/models/pending_template_spec.rb +13 -1
- data/spec/models/rename_folder_data_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +1 -1
- data/spec/models/submission_batch_data_spec.rb +3 -3
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_data_batch_request_spec.rb +5 -5
- data/spec/models/submission_data_request_spec.rb +13 -1
- data/spec/models/submission_data_spec.rb +11 -5
- data/spec/models/submission_spec.rb +32 -2
- data/spec/models/{templatesv2_template_spec.rb → template_data_spec.rb} +40 -16
- data/spec/models/template_spec.rb +13 -1
- data/spec/models/templatestemplate_idadd_fields_fields_spec.rb +589 -0
- data/spec/models/update_data_request_response_spec.rb +1 -1
- data/spec/models/update_submission_data_request_data_spec.rb +17 -17
- data/spec/models/update_template_data_spec.rb +41 -0
- data/spec/models/update_template_response_spec.rb +51 -0
- data/spec/models/{templatesv2_template_document_metadata_spec.rb → upload_template_data_document_metadata_spec.rb} +7 -7
- data/spec/models/{templatesv2_template_document_spec.rb → upload_template_data_document_spec.rb} +7 -7
- data/spec/models/upload_template_data_spec.rb +151 -0
- data/spec/spec_helper.rb +1 -1
- metadata +60 -32
- data/.swagger-codegen-ignore +0 -31
- data/.swagger-codegen/VERSION +0 -1
- data/.swagger-revision +0 -1
- data/.travis.yml +0 -8
data/lib/docspring/models/{templatesv2_template_document.rb → upload_template_data_document.rb}
RENAMED
@@ -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
|
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
|
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' => :'
|
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
|
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
|
16
|
+
class UploadTemplateDataDocumentMetadata
|
17
17
|
attr_accessor :filename
|
18
18
|
|
19
19
|
attr_accessor :size
|
data/lib/docspring/version.rb
CHANGED
@@ -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(:
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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
|
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
|
128
|
-
#
|
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 '
|
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.
|
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
|
171
|
+
# integration tests for create_pdf_template_from_upload
|
146
172
|
# Create a new PDF template from a cached presign upload
|
147
|
-
# @param
|
173
|
+
# @param create_template_from_upload_data
|
148
174
|
# @param [Hash] opts the optional parameters
|
149
175
|
# @return [PendingTemplate]
|
150
|
-
describe '
|
176
|
+
describe 'create_pdf_template_from_upload test' do
|
151
177
|
it 'should work' do
|
152
|
-
|
153
|
-
result = api_instance.
|
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:
|
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
|
data/spec/api_client_spec.rb
CHANGED