docspring 4.0.0 → 4.1.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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +84 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +24 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +10 -1
  7. data/docs/AddTemplateFieldsRequest.md +18 -0
  8. data/docs/Client.md +704 -33
  9. data/docs/CreateSubmissionBatchRequest.md +2 -0
  10. data/docs/CreateSubmissionRequest.md +2 -0
  11. data/docs/CreateTemplateRequest.md +10 -2
  12. data/docs/Field.md +198 -0
  13. data/docs/FieldDependency.md +22 -0
  14. data/docs/FieldDependencyInput.md +22 -0
  15. data/docs/FieldGroup.md +32 -0
  16. data/docs/FieldGroupInput.md +30 -0
  17. data/docs/FieldGroupType.md +15 -0
  18. data/docs/FieldInput.md +196 -0
  19. data/docs/FieldType.md +15 -0
  20. data/docs/GenerateFilesFormat.md +15 -0
  21. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  22. data/docs/OutputFormat.md +15 -0
  23. data/docs/PageImage.md +34 -0
  24. data/docs/PageImages.md +24 -0
  25. data/docs/PredefinedField.md +30 -0
  26. data/docs/PredefinedFieldInput.md +30 -0
  27. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  28. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  29. data/docs/Submission.md +3 -1
  30. data/docs/SubmissionFiles.md +3 -1
  31. data/docs/SubmissionInput.md +2 -0
  32. data/docs/SubmissionValidation.md +24 -0
  33. data/docs/Template.md +6 -0
  34. data/docs/TemplateDiff.md +30 -0
  35. data/docs/TemplateDiffSummary.md +28 -0
  36. data/docs/TemplateDocument.md +3 -3
  37. data/docs/TemplateFieldChange.md +24 -0
  38. data/docs/TemplateFieldChanges.md +24 -0
  39. data/docs/TemplateFieldDependency.md +1 -1
  40. data/docs/TemplateFieldDependencyInput.md +1 -1
  41. data/docs/TemplateFieldMove.md +22 -0
  42. data/docs/TemplateFields.md +22 -0
  43. data/docs/TemplatePageImages.md +24 -0
  44. data/docs/UpdateTemplateDocumentRequest.md +6 -2
  45. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  46. data/docs/UpdateTemplateRequest.md +6 -0
  47. data/docs/ValidateSubmissionRequest.md +38 -0
  48. data/lib/docspring/api/client.rb +666 -18
  49. data/lib/docspring/api_client.rb +1 -1
  50. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  51. data/lib/docspring/models/create_submission_batch_request.rb +23 -1
  52. data/lib/docspring/models/create_submission_request.rb +23 -1
  53. data/lib/docspring/models/create_template_request.rb +48 -3
  54. data/lib/docspring/models/field.rb +2217 -0
  55. data/lib/docspring/models/field_dependency.rb +246 -0
  56. data/lib/docspring/models/field_dependency_input.rb +246 -0
  57. data/lib/docspring/models/field_group.rb +368 -0
  58. data/lib/docspring/models/field_group_input.rb +247 -0
  59. data/lib/docspring/models/field_group_type.rb +41 -0
  60. data/lib/docspring/models/field_input.rb +1109 -0
  61. data/lib/docspring/models/field_type.rb +54 -0
  62. data/lib/docspring/models/generate_files_format.rb +40 -0
  63. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  64. data/lib/docspring/models/output_format.rb +41 -0
  65. data/lib/docspring/models/page_image.rb +359 -0
  66. data/lib/docspring/models/page_images.rb +248 -0
  67. data/lib/docspring/models/predefined_field.rb +287 -0
  68. data/lib/docspring/models/predefined_field_input.rb +287 -0
  69. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  70. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  71. data/lib/docspring/models/submission.rb +31 -2
  72. data/lib/docspring/models/submission_files.rb +13 -4
  73. data/lib/docspring/models/submission_input.rb +23 -1
  74. data/lib/docspring/models/submission_validation.rb +234 -0
  75. data/lib/docspring/models/template.rb +74 -1
  76. data/lib/docspring/models/template_diff.rb +321 -0
  77. data/lib/docspring/models/template_diff_summary.rb +320 -0
  78. data/lib/docspring/models/template_document.rb +3 -3
  79. data/lib/docspring/models/template_document_state.rb +3 -1
  80. data/lib/docspring/models/template_field_change.rb +266 -0
  81. data/lib/docspring/models/template_field_changes.rb +274 -0
  82. data/lib/docspring/models/template_field_dependency.rb +1 -1
  83. data/lib/docspring/models/template_field_dependency_input.rb +1 -1
  84. data/lib/docspring/models/template_field_move.rb +239 -0
  85. data/lib/docspring/models/template_fields.rb +227 -0
  86. data/lib/docspring/models/template_page_images.rb +254 -0
  87. data/lib/docspring/models/update_template_document_request.rb +23 -20
  88. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  89. data/lib/docspring/models/update_template_request.rb +38 -1
  90. data/lib/docspring/models/validate_submission_request.rb +288 -0
  91. data/lib/docspring/request_schemas.json +3364 -1584
  92. data/lib/docspring/version.rb +1 -1
  93. data/lib/docspring.rb +28 -0
  94. data/spec/api/client_spec.rb +128 -9
  95. data/spec/models/add_template_fields_request_spec.rb +36 -0
  96. data/spec/models/create_submission_batch_request_spec.rb +6 -0
  97. data/spec/models/create_submission_request_spec.rb +6 -0
  98. data/spec/models/create_template_request_spec.rb +24 -0
  99. data/spec/models/field_dependency_input_spec.rb +48 -0
  100. data/spec/models/field_dependency_spec.rb +48 -0
  101. data/spec/models/field_group_input_spec.rb +72 -0
  102. data/spec/models/field_group_spec.rb +78 -0
  103. data/spec/models/field_group_type_spec.rb +30 -0
  104. data/spec/models/field_input_spec.rb +570 -0
  105. data/spec/models/field_spec.rb +576 -0
  106. data/spec/models/field_type_spec.rb +30 -0
  107. data/spec/models/generate_files_format_spec.rb +30 -0
  108. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  109. data/spec/models/output_format_spec.rb +30 -0
  110. data/spec/models/page_image_spec.rb +84 -0
  111. data/spec/models/page_images_spec.rb +54 -0
  112. data/spec/models/predefined_field_input_spec.rb +72 -0
  113. data/spec/models/predefined_field_spec.rb +72 -0
  114. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  115. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  116. data/spec/models/submission_files_spec.rb +6 -0
  117. data/spec/models/submission_input_spec.rb +6 -0
  118. data/spec/models/submission_spec.rb +6 -0
  119. data/spec/models/submission_validation_spec.rb +54 -0
  120. data/spec/models/template_diff_spec.rb +72 -0
  121. data/spec/models/template_diff_summary_spec.rb +66 -0
  122. data/spec/models/template_field_change_spec.rb +54 -0
  123. data/spec/models/template_field_changes_spec.rb +54 -0
  124. data/spec/models/template_field_move_spec.rb +48 -0
  125. data/spec/models/template_fields_spec.rb +48 -0
  126. data/spec/models/template_page_images_spec.rb +54 -0
  127. data/spec/models/template_spec.rb +18 -0
  128. data/spec/models/update_template_document_request_spec.rb +12 -0
  129. data/spec/models/update_template_fields_request_spec.rb +36 -0
  130. data/spec/models/update_template_request_spec.rb +18 -0
  131. data/spec/models/validate_submission_request_spec.rb +96 -0
  132. metadata +113 -1
@@ -11,5 +11,5 @@ Generator version: 7.26.0-DOCSPRING
11
11
  =end
12
12
 
13
13
  module DocSpring
14
- VERSION = '4.0.0'
14
+ VERSION = '4.1.0'
15
15
  end
data/lib/docspring.rb CHANGED
@@ -19,6 +19,7 @@ require 'docspring/version'
19
19
  require 'docspring/configuration'
20
20
 
21
21
  # Models
22
+ require 'docspring/models/add_template_fields_request'
22
23
  require 'docspring/models/ai_field_naming_language'
23
24
  require 'docspring/models/authentication_check'
24
25
  require 'docspring/models/barcode_symbology'
@@ -50,12 +51,19 @@ require 'docspring/models/error_detail'
50
51
  require 'docspring/models/error_info'
51
52
  require 'docspring/models/error_response'
52
53
  require 'docspring/models/expiration_interval'
54
+ require 'docspring/models/field'
53
55
  require 'docspring/models/field_comparison_condition'
54
56
  require 'docspring/models/field_comparison_operator'
57
+ require 'docspring/models/field_dependency'
58
+ require 'docspring/models/field_dependency_input'
55
59
  require 'docspring/models/field_display_type'
56
60
  require 'docspring/models/field_equals_condition'
57
61
  require 'docspring/models/field_equals_operator'
62
+ require 'docspring/models/field_group'
63
+ require 'docspring/models/field_group_input'
64
+ require 'docspring/models/field_group_type'
58
65
  require 'docspring/models/field_in_condition'
66
+ require 'docspring/models/field_input'
59
67
  require 'docspring/models/field_override'
60
68
  require 'docspring/models/field_presence_condition'
61
69
  require 'docspring/models/field_presence_operator'
@@ -64,8 +72,11 @@ require 'docspring/models/field_reimport_state'
64
72
  require 'docspring/models/field_setup_logic'
65
73
  require 'docspring/models/field_setup_naming'
66
74
  require 'docspring/models/field_setup_source'
75
+ require 'docspring/models/field_type'
67
76
  require 'docspring/models/folder'
68
77
  require 'docspring/models/folder_list'
78
+ require 'docspring/models/generate_files_format'
79
+ require 'docspring/models/generate_submission_files_request'
69
80
  require 'docspring/models/generated_file'
70
81
  require 'docspring/models/generated_file_state'
71
82
  require 'docspring/models/html_engine_options'
@@ -76,9 +87,16 @@ require 'docspring/models/model_code_language'
76
87
  require 'docspring/models/move_folder_request'
77
88
  require 'docspring/models/move_template_request'
78
89
  require 'docspring/models/number_condition_type'
90
+ require 'docspring/models/output_format'
79
91
  require 'docspring/models/page_format'
92
+ require 'docspring/models/page_image'
93
+ require 'docspring/models/page_images'
94
+ require 'docspring/models/predefined_field'
95
+ require 'docspring/models/predefined_field_input'
80
96
  require 'docspring/models/publish_template_version_request'
97
+ require 'docspring/models/remove_template_fields_request'
81
98
  require 'docspring/models/rename_folder_request'
99
+ require 'docspring/models/reorder_template_fields_request'
82
100
  require 'docspring/models/restore_template_version_request'
83
101
  require 'docspring/models/shape_type'
84
102
  require 'docspring/models/signature_request'
@@ -104,13 +122,18 @@ require 'docspring/models/submission_list'
104
122
  require 'docspring/models/submission_source'
105
123
  require 'docspring/models/submission_source_pdf'
106
124
  require 'docspring/models/submission_state'
125
+ require 'docspring/models/submission_validation'
107
126
  require 'docspring/models/template'
108
127
  require 'docspring/models/template_actor'
109
128
  require 'docspring/models/template_actor_type'
110
129
  require 'docspring/models/template_defaults'
111
130
  require 'docspring/models/template_defaults_input'
131
+ require 'docspring/models/template_diff'
132
+ require 'docspring/models/template_diff_summary'
112
133
  require 'docspring/models/template_document'
113
134
  require 'docspring/models/template_document_state'
135
+ require 'docspring/models/template_field_change'
136
+ require 'docspring/models/template_field_changes'
114
137
  require 'docspring/models/template_field_dependency'
115
138
  require 'docspring/models/template_field_dependency_action'
116
139
  require 'docspring/models/template_field_dependency_condition'
@@ -119,12 +142,15 @@ require 'docspring/models/template_field_dependency_input'
119
142
  require 'docspring/models/template_field_dependency_match'
120
143
  require 'docspring/models/template_field_dependency_operator'
121
144
  require 'docspring/models/template_field_logic_status'
145
+ require 'docspring/models/template_field_move'
146
+ require 'docspring/models/template_fields'
122
147
  require 'docspring/models/template_form_mode'
123
148
  require 'docspring/models/template_model_code'
124
149
  require 'docspring/models/template_page_ai_error'
125
150
  require 'docspring/models/template_page_ai_naming_status'
126
151
  require 'docspring/models/template_page_fields_status'
127
152
  require 'docspring/models/template_page_image_status'
153
+ require 'docspring/models/template_page_images'
128
154
  require 'docspring/models/template_page_processing_status'
129
155
  require 'docspring/models/template_source_pdf'
130
156
  require 'docspring/models/template_summary'
@@ -138,11 +164,13 @@ require 'docspring/models/text_vertical_alignment'
138
164
  require 'docspring/models/typeface'
139
165
  require 'docspring/models/update_signature_request_request'
140
166
  require 'docspring/models/update_template_document_request'
167
+ require 'docspring/models/update_template_fields_request'
141
168
  require 'docspring/models/update_template_request'
142
169
  require 'docspring/models/update_webhook_request'
143
170
  require 'docspring/models/upload_method'
144
171
  require 'docspring/models/upload_presign'
145
172
  require 'docspring/models/url_source_pdf'
173
+ require 'docspring/models/validate_submission_request'
146
174
  require 'docspring/models/webhook'
147
175
  require 'docspring/models/webhook_event_type'
148
176
  require 'docspring/models/webhook_list'
@@ -32,6 +32,19 @@ describe 'Client' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for add_template_fields
36
+ # Add fields to a template
37
+ # Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
38
+ # @param template_id The template's ID.
39
+ # @param body The fields to add to the template's draft.
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [TemplateFields]
42
+ describe 'add_template_fields test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
35
48
  # unit tests for copy_template
36
49
  # Copy a template
37
50
  # Copies a template (its draft, or a published version) into a new template.
@@ -115,7 +128,7 @@ describe 'Client' do
115
128
  # @param body The submission's data and settings.
116
129
  # @param [Hash] opts the optional parameters
117
130
  # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
118
- # @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
131
+ # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
119
132
  # @return [Submission]
120
133
  describe 'create_submission test' do
121
134
  it 'should work' do
@@ -141,7 +154,7 @@ describe 'Client' do
141
154
  # Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
142
155
  # @param body The template to create.
143
156
  # @param [Hash] opts the optional parameters
144
- # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
157
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
145
158
  # @return [Template]
146
159
  describe 'create_template test' do
147
160
  it 'should work' do
@@ -234,6 +247,20 @@ describe 'Client' do
234
247
  end
235
248
  end
236
249
 
250
+ # unit tests for generate_submission_files
251
+ # Generate more files
252
+ # Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
253
+ # @param submission_id The submission's ID.
254
+ # @param body The formats to make.
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
257
+ # @return [Submission]
258
+ describe 'generate_submission_files test' do
259
+ it 'should work' do
260
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
261
+ end
262
+ end
263
+
237
264
  # unit tests for generate_submission_preview
238
265
  # Generate a preview PDF
239
266
  # Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
@@ -343,6 +370,19 @@ describe 'Client' do
343
370
  end
344
371
  end
345
372
 
373
+ # unit tests for get_template_diff
374
+ # Compare a version of a template with the one before it
375
+ # Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
376
+ # @param template_id The template's ID.
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
379
+ # @return [TemplateDiff]
380
+ describe 'get_template_diff test' do
381
+ it 'should work' do
382
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
383
+ end
384
+ end
385
+
346
386
  # unit tests for get_template_model_code
347
387
  # Generate typed code for a template's submission data
348
388
  # Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
@@ -357,6 +397,19 @@ describe 'Client' do
357
397
  end
358
398
  end
359
399
 
400
+ # unit tests for get_template_page_images
401
+ # Get images of a template's pages
402
+ # Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
403
+ # @param template_id The template's ID.
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
406
+ # @return [TemplatePageImages]
407
+ describe 'get_template_page_images test' do
408
+ it 'should work' do
409
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
410
+ end
411
+ end
412
+
360
413
  # unit tests for get_template_schema
361
414
  # Get the JSON Schema of a template's submission data
362
415
  # Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
@@ -440,6 +493,19 @@ describe 'Client' do
440
493
  end
441
494
  end
442
495
 
496
+ # unit tests for list_template_fields
497
+ # List a template's fields
498
+ # Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
499
+ # @param template_id The template's ID.
500
+ # @param [Hash] opts the optional parameters
501
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
502
+ # @return [TemplateFields]
503
+ describe 'list_template_fields test' do
504
+ it 'should work' do
505
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
506
+ end
507
+ end
508
+
443
509
  # unit tests for list_template_submissions
444
510
  # List a template's submissions
445
511
  # Returns a template's submissions (from every version of the template), newest first.
@@ -519,7 +585,7 @@ describe 'Client' do
519
585
 
520
586
  # unit tests for publish_template_version
521
587
  # Publish a template version
522
- # Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up.
588
+ # Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
523
589
  # @param template_id The template's ID.
524
590
  # @param body The version to publish.
525
591
  # @param [Hash] opts the optional parameters
@@ -530,6 +596,19 @@ describe 'Client' do
530
596
  end
531
597
  end
532
598
 
599
+ # unit tests for remove_template_fields
600
+ # Remove fields from a template
601
+ # Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
602
+ # @param template_id The template's ID.
603
+ # @param body The fields to remove from the template's draft.
604
+ # @param [Hash] opts the optional parameters
605
+ # @return [TemplateFields]
606
+ describe 'remove_template_fields test' do
607
+ it 'should work' do
608
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
609
+ end
610
+ end
611
+
533
612
  # unit tests for rename_folder
534
613
  # Rename a folder
535
614
  # Renames a folder. The name must be unique within its parent folder.
@@ -543,6 +622,19 @@ describe 'Client' do
543
622
  end
544
623
  end
545
624
 
625
+ # unit tests for reorder_template_fields
626
+ # Reorder a template's fields
627
+ # Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
628
+ # @param template_id The template's ID.
629
+ # @param body The new order of the fields in the template's draft.
630
+ # @param [Hash] opts the optional parameters
631
+ # @return [TemplateFields]
632
+ describe 'reorder_template_fields test' do
633
+ it 'should work' do
634
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
635
+ end
636
+ end
637
+
546
638
  # unit tests for restore_template_version
547
639
  # Restore a template version
548
640
  # Replaces the template's draft with a copy of one of its published versions.
@@ -582,7 +674,7 @@ describe 'Client' do
582
674
 
583
675
  # unit tests for update_template
584
676
  # Update a template
585
- # Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object. Setting `parent_folder_id` moves the template and all of its published versions.
677
+ # Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
586
678
  # @param template_id The template's ID.
587
679
  # @param body The settings to change. Properties left out keep their values.
588
680
  # @param [Hash] opts the optional parameters
@@ -595,11 +687,11 @@ describe 'Client' do
595
687
 
596
688
  # unit tests for update_template_document
597
689
  # Replace a template's PDF
598
- # Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF with the request instead, use PUT /templates/{template_id}/document/upload.
690
+ # Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
599
691
  # @param template_id The template's ID.
600
- # @param body The new PDF.
692
+ # @param body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
601
693
  # @param [Hash] opts the optional parameters
602
- # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
694
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
603
695
  # @return [Template]
604
696
  describe 'update_template_document test' do
605
697
  it 'should work' do
@@ -607,6 +699,19 @@ describe 'Client' do
607
699
  end
608
700
  end
609
701
 
702
+ # unit tests for update_template_fields
703
+ # Update a template's fields
704
+ # Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
705
+ # @param template_id The template's ID.
706
+ # @param body The fields to change in the template's draft.
707
+ # @param [Hash] opts the optional parameters
708
+ # @return [TemplateFields]
709
+ describe 'update_template_fields test' do
710
+ it 'should work' do
711
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
712
+ end
713
+ end
714
+
610
715
  # unit tests for update_webhook
611
716
  # Update a webhook
612
717
  # Updates a webhook. Only the properties you send change.
@@ -625,7 +730,7 @@ describe 'Client' do
625
730
  # Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
626
731
  # @param document The PDF.
627
732
  # @param [Hash] opts the optional parameters
628
- # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
733
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
629
734
  # @option opts [String] :name The template's name.
630
735
  # @option opts [String] :description The template's description.
631
736
  # @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
@@ -647,7 +752,7 @@ describe 'Client' do
647
752
  # @param template_id The template's ID.
648
753
  # @param document The new PDF.
649
754
  # @param [Hash] opts the optional parameters
650
- # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
755
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
651
756
  # @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
652
757
  # @return [Template]
653
758
  describe 'upload_template_document test' do
@@ -656,4 +761,18 @@ describe 'Client' do
656
761
  end
657
762
  end
658
763
 
764
+ # unit tests for validate_submission
765
+ # Check a submission without creating it
766
+ # Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
767
+ # @param template_id The template's ID.
768
+ # @param body The submission's data and settings.
769
+ # @param [Hash] opts the optional parameters
770
+ # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
771
+ # @return [SubmissionValidation]
772
+ describe 'validate_submission test' do
773
+ it 'should work' do
774
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
775
+ end
776
+ end
777
+
659
778
  end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DocSpring::AddTemplateFieldsRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DocSpring::AddTemplateFieldsRequest do
21
+ #let(:instance) { DocSpring::AddTemplateFieldsRequest.new }
22
+
23
+ describe 'test an instance of AddTemplateFieldsRequest' do
24
+ it 'should create an instance of AddTemplateFieldsRequest' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DocSpring::AddTemplateFieldsRequest)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "fields"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ end
@@ -51,6 +51,12 @@ describe DocSpring::CreateSubmissionBatchRequest do
51
51
  end
52
52
  end
53
53
 
54
+ describe 'test attribute "output_formats"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
54
60
  describe 'test attribute "submissions"' do
55
61
  it 'should work' do
56
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -57,6 +57,12 @@ describe DocSpring::CreateSubmissionRequest do
57
57
  end
58
58
  end
59
59
 
60
+ describe 'test attribute "output_formats"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
60
66
  describe 'test attribute "expires_in"' do
61
67
  it 'should work' do
62
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -195,6 +195,18 @@ describe DocSpring::CreateTemplateRequest do
195
195
  end
196
196
  end
197
197
 
198
+ describe 'test attribute "predefined_fields"' do
199
+ it 'should work' do
200
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
201
+ end
202
+ end
203
+
204
+ describe 'test attribute "predefined_fields_sample_data"' do
205
+ it 'should work' do
206
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
207
+ end
208
+ end
209
+
198
210
  describe 'test attribute "html"' do
199
211
  it 'should work' do
200
212
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -231,6 +243,18 @@ describe DocSpring::CreateTemplateRequest do
231
243
  end
232
244
  end
233
245
 
246
+ describe 'test attribute "document_url"' do
247
+ it 'should work' do
248
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
249
+ end
250
+ end
251
+
252
+ describe 'test attribute "document_base64"' do
253
+ it 'should work' do
254
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
255
+ end
256
+ end
257
+
234
258
  describe 'test attribute "filename"' do
235
259
  it 'should work' do
236
260
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DocSpring::FieldDependencyInput
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DocSpring::FieldDependencyInput do
21
+ #let(:instance) { DocSpring::FieldDependencyInput.new }
22
+
23
+ describe 'test an instance of FieldDependencyInput' do
24
+ it 'should create an instance of FieldDependencyInput' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DocSpring::FieldDependencyInput)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "action"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "match"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "conditions"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DocSpring::FieldDependency
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DocSpring::FieldDependency do
21
+ #let(:instance) { DocSpring::FieldDependency.new }
22
+
23
+ describe 'test an instance of FieldDependency' do
24
+ it 'should create an instance of FieldDependency' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DocSpring::FieldDependency)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "action"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "match"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "conditions"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -0,0 +1,72 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DocSpring::FieldGroupInput
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DocSpring::FieldGroupInput do
21
+ #let(:instance) { DocSpring::FieldGroupInput.new }
22
+
23
+ describe 'test an instance of FieldGroupInput' do
24
+ it 'should create an instance of FieldGroupInput' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DocSpring::FieldGroupInput)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "title"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "description"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "metadata"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "min_items"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "max_items"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "allow_additional_items"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
+ end
70
+ end
71
+
72
+ end