docspring 4.0.0 → 4.2.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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +99 -0
- data/.travis.yml +1 -1
- data/AGENTS.md +3 -2
- data/CHANGELOG.md +64 -0
- data/Gemfile.lock +9 -9
- data/README.md +14 -1
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/Client.md +917 -80
- data/docs/CombinedPdf.md +1 -1
- data/docs/CreateCombinedPdfRequest.md +1 -1
- data/docs/CreateSubmissionBatchRequest.md +2 -0
- data/docs/CreateSubmissionRequest.md +4 -2
- data/docs/CreateTemplatePreviewRequest.md +18 -0
- data/docs/CreateTemplateRequest.md +13 -3
- data/docs/ErrorDetail.md +1 -1
- data/docs/ErrorInfo.md +4 -4
- data/docs/Field.md +198 -0
- data/docs/FieldDependency.md +22 -0
- data/docs/FieldDependencyInput.md +22 -0
- data/docs/FieldGroup.md +32 -0
- data/docs/FieldGroupInput.md +30 -0
- data/docs/FieldGroupType.md +15 -0
- data/docs/FieldInput.md +196 -0
- data/docs/FieldType.md +15 -0
- data/docs/GenerateFilesFormat.md +15 -0
- data/docs/GenerateSubmissionFilesRequest.md +18 -0
- data/docs/OutputFormat.md +15 -0
- data/docs/PageImage.md +34 -0
- data/docs/PageImages.md +24 -0
- data/docs/PredefinedField.md +30 -0
- data/docs/PredefinedFieldInput.md +30 -0
- data/docs/RemoveTemplateFieldsRequest.md +18 -0
- data/docs/ReorderTemplateFieldsRequest.md +18 -0
- data/docs/Submission.md +16 -14
- data/docs/SubmissionFiles.md +3 -1
- data/docs/SubmissionInput.md +4 -2
- data/docs/SubmissionList.md +1 -1
- data/docs/SubmissionSummary.md +54 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +18 -10
- data/docs/TemplateActor.md +1 -1
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +6 -6
- data/docs/TemplateDocumentSummary.md +24 -0
- data/docs/TemplateFieldChange.md +24 -0
- data/docs/TemplateFieldChanges.md +24 -0
- data/docs/TemplateFieldDependency.md +1 -1
- data/docs/TemplateFieldDependencyInput.md +1 -1
- data/docs/TemplateFieldMove.md +22 -0
- data/docs/TemplateFields.md +22 -0
- data/docs/TemplatePageImages.md +24 -0
- data/docs/TemplatePreview.md +32 -0
- data/docs/TemplatePreviewState.md +15 -0
- data/docs/TemplateSummary.md +2 -48
- data/docs/UpdateTemplateDocumentRequest.md +6 -2
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +10 -2
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/lib/docspring/api/client.rb +869 -51
- data/lib/docspring/api_client.rb +4 -2
- data/lib/docspring/date_time_values.rb +33 -0
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +23 -1
- data/lib/docspring/models/create_submission_request.rb +25 -3
- data/lib/docspring/models/create_template_preview_request.rb +187 -0
- data/lib/docspring/models/create_template_request.rb +59 -4
- data/lib/docspring/models/error_code.rb +3 -1
- data/lib/docspring/models/error_detail.rb +1 -1
- data/lib/docspring/models/error_info.rb +4 -4
- data/lib/docspring/models/field.rb +2217 -0
- data/lib/docspring/models/field_dependency.rb +246 -0
- data/lib/docspring/models/field_dependency_input.rb +246 -0
- data/lib/docspring/models/field_group.rb +368 -0
- data/lib/docspring/models/field_group_input.rb +247 -0
- data/lib/docspring/models/field_group_type.rb +41 -0
- data/lib/docspring/models/field_input.rb +1109 -0
- data/lib/docspring/models/field_type.rb +54 -0
- data/lib/docspring/models/generate_files_format.rb +40 -0
- data/lib/docspring/models/generate_submission_files_request.rb +187 -0
- data/lib/docspring/models/output_format.rb +41 -0
- data/lib/docspring/models/page_image.rb +359 -0
- data/lib/docspring/models/page_images.rb +248 -0
- data/lib/docspring/models/predefined_field.rb +287 -0
- data/lib/docspring/models/predefined_field_input.rb +287 -0
- data/lib/docspring/models/remove_template_fields_request.rb +187 -0
- data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
- data/lib/docspring/models/submission.rb +146 -117
- data/lib/docspring/models/submission_files.rb +13 -4
- data/lib/docspring/models/submission_input.rb +25 -3
- data/lib/docspring/models/submission_list.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +601 -0
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +169 -83
- data/lib/docspring/models/template_actor.rb +1 -1
- data/lib/docspring/models/template_diff.rb +321 -0
- data/lib/docspring/models/template_diff_summary.rb +320 -0
- data/lib/docspring/models/template_document.rb +44 -44
- data/lib/docspring/models/template_document_state.rb +3 -1
- data/lib/docspring/models/template_document_summary.rb +260 -0
- data/lib/docspring/models/template_field_change.rb +266 -0
- data/lib/docspring/models/template_field_changes.rb +274 -0
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +239 -0
- data/lib/docspring/models/template_fields.rb +227 -0
- data/lib/docspring/models/template_page_images.rb +254 -0
- data/lib/docspring/models/template_preview.rb +356 -0
- data/lib/docspring/models/template_preview_state.rb +42 -0
- data/lib/docspring/models/template_summary.rb +5 -572
- data/lib/docspring/models/update_template_document_request.rb +23 -20
- data/lib/docspring/models/update_template_fields_request.rb +187 -0
- data/lib/docspring/models/update_template_request.rb +53 -6
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/request_schemas.json +3465 -1588
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring/webhook_signature.rb +45 -0
- data/lib/docspring.rb +34 -0
- data/spec/api/client_spec.rb +167 -13
- data/spec/models/add_template_fields_request_spec.rb +36 -0
- data/spec/models/create_submission_batch_request_spec.rb +6 -0
- data/spec/models/create_submission_request_spec.rb +6 -0
- data/spec/models/create_template_preview_request_spec.rb +36 -0
- data/spec/models/create_template_request_spec.rb +30 -0
- data/spec/models/field_dependency_input_spec.rb +48 -0
- data/spec/models/field_dependency_spec.rb +48 -0
- data/spec/models/field_group_input_spec.rb +72 -0
- data/spec/models/field_group_spec.rb +78 -0
- data/spec/models/field_group_type_spec.rb +30 -0
- data/spec/models/field_input_spec.rb +570 -0
- data/spec/models/field_spec.rb +576 -0
- data/spec/models/field_type_spec.rb +30 -0
- data/spec/models/generate_files_format_spec.rb +30 -0
- data/spec/models/generate_submission_files_request_spec.rb +36 -0
- data/spec/models/output_format_spec.rb +30 -0
- data/spec/models/page_image_spec.rb +84 -0
- data/spec/models/page_images_spec.rb +54 -0
- data/spec/models/predefined_field_input_spec.rb +72 -0
- data/spec/models/predefined_field_spec.rb +72 -0
- data/spec/models/remove_template_fields_request_spec.rb +36 -0
- data/spec/models/reorder_template_fields_request_spec.rb +36 -0
- data/spec/models/submission_files_spec.rb +6 -0
- data/spec/models/submission_input_spec.rb +6 -0
- data/spec/models/submission_spec.rb +17 -11
- data/spec/models/submission_summary_spec.rb +144 -0
- data/spec/models/submission_validation_spec.rb +54 -0
- data/spec/models/template_diff_spec.rb +72 -0
- data/spec/models/template_diff_summary_spec.rb +66 -0
- data/spec/models/template_document_spec.rb +5 -5
- data/spec/models/template_document_summary_spec.rb +54 -0
- data/spec/models/template_field_change_spec.rb +54 -0
- data/spec/models/template_field_changes_spec.rb +54 -0
- data/spec/models/template_field_move_spec.rb +48 -0
- data/spec/models/template_fields_spec.rb +48 -0
- data/spec/models/template_page_images_spec.rb +54 -0
- data/spec/models/template_preview_spec.rb +78 -0
- data/spec/models/template_preview_state_spec.rb +30 -0
- data/spec/models/template_spec.rb +34 -10
- data/spec/models/template_summary_spec.rb +0 -138
- data/spec/models/update_template_document_request_spec.rb +12 -0
- data/spec/models/update_template_fields_request_spec.rb +36 -0
- data/spec/models/update_template_request_spec.rb +24 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- metadata +135 -1
|
@@ -28,7 +28,7 @@ module DocSpring
|
|
|
28
28
|
# `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created.
|
|
29
29
|
attr_accessor :template_type
|
|
30
30
|
|
|
31
|
-
# Whether the template can generate PDFs. HTML templates are always ready. A PDF template is ready once its
|
|
31
|
+
# Whether the template can generate PDFs. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready.
|
|
32
32
|
attr_accessor :ready
|
|
33
33
|
|
|
34
34
|
# The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet.
|
|
@@ -40,9 +40,6 @@ module DocSpring
|
|
|
40
40
|
# The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
|
|
41
41
|
attr_accessor :path
|
|
42
42
|
|
|
43
|
-
# The published version this is, such as `1.2.0`. Null for the draft.
|
|
44
|
-
attr_accessor :version
|
|
45
|
-
|
|
46
43
|
# The template's latest published version. Null if no version has been published.
|
|
47
44
|
attr_accessor :latest_version
|
|
48
45
|
|
|
@@ -52,6 +49,18 @@ module DocSpring
|
|
|
52
49
|
# A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
|
|
53
50
|
attr_accessor :locked
|
|
54
51
|
|
|
52
|
+
# When the draft was last changed.
|
|
53
|
+
attr_accessor :last_changed_at
|
|
54
|
+
|
|
55
|
+
# When the template was created.
|
|
56
|
+
attr_accessor :created_at
|
|
57
|
+
|
|
58
|
+
# When the template was last updated.
|
|
59
|
+
attr_accessor :updated_at
|
|
60
|
+
|
|
61
|
+
# The published version this is, such as `1.2.0`. Null for the draft.
|
|
62
|
+
attr_accessor :version
|
|
63
|
+
|
|
55
64
|
# Print the submission ID in the footer of each page of PDFs signed through signature requests.
|
|
56
65
|
attr_accessor :add_signature_request_submission_id_footers
|
|
57
66
|
|
|
@@ -70,7 +79,7 @@ module DocSpring
|
|
|
70
79
|
# Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
|
|
71
80
|
attr_accessor :editable_submissions
|
|
72
81
|
|
|
73
|
-
# The sites
|
|
82
|
+
# The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted.
|
|
74
83
|
attr_accessor :embed_domains
|
|
75
84
|
|
|
76
85
|
# Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
|
|
@@ -115,23 +124,23 @@ module DocSpring
|
|
|
115
124
|
# Whether `slack_webhook_url` is set.
|
|
116
125
|
attr_accessor :has_slack_webhook_url
|
|
117
126
|
|
|
118
|
-
# When the draft was last changed.
|
|
119
|
-
attr_accessor :last_changed_at
|
|
120
|
-
|
|
121
127
|
# Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded.
|
|
122
128
|
attr_accessor :last_changed_by
|
|
123
129
|
|
|
124
|
-
# When the template was created.
|
|
125
|
-
attr_accessor :created_at
|
|
126
|
-
|
|
127
|
-
# When the template was last updated.
|
|
128
|
-
attr_accessor :updated_at
|
|
129
|
-
|
|
130
130
|
attr_accessor :defaults
|
|
131
131
|
|
|
132
132
|
# Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields.
|
|
133
133
|
attr_accessor :field_dependencies
|
|
134
134
|
|
|
135
|
+
# The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`.
|
|
136
|
+
attr_accessor :field_groups
|
|
137
|
+
|
|
138
|
+
# The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off.
|
|
139
|
+
attr_accessor :predefined_fields
|
|
140
|
+
|
|
141
|
+
# Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for.
|
|
142
|
+
attr_accessor :predefined_fields_sample_data
|
|
143
|
+
|
|
135
144
|
# The HTML of an HTML template, as a Liquid template. Null for PDF templates.
|
|
136
145
|
attr_accessor :html
|
|
137
146
|
|
|
@@ -147,6 +156,9 @@ module DocSpring
|
|
|
147
156
|
# How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
|
|
148
157
|
attr_accessor :html_engine_options
|
|
149
158
|
|
|
159
|
+
# Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates.
|
|
160
|
+
attr_accessor :html_escape_data
|
|
161
|
+
|
|
150
162
|
# The token that opens the template in the embedded template editor.
|
|
151
163
|
attr_accessor :embed_edit_token
|
|
152
164
|
|
|
@@ -186,10 +198,13 @@ module DocSpring
|
|
|
186
198
|
:'document' => :'document',
|
|
187
199
|
:'parent_folder_id' => :'parent_folder_id',
|
|
188
200
|
:'path' => :'path',
|
|
189
|
-
:'version' => :'version',
|
|
190
201
|
:'latest_version' => :'latest_version',
|
|
191
202
|
:'version_published_at' => :'version_published_at',
|
|
192
203
|
:'locked' => :'locked',
|
|
204
|
+
:'last_changed_at' => :'last_changed_at',
|
|
205
|
+
:'created_at' => :'created_at',
|
|
206
|
+
:'updated_at' => :'updated_at',
|
|
207
|
+
:'version' => :'version',
|
|
193
208
|
:'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
|
|
194
209
|
:'ai_field_naming_language' => :'ai_field_naming_language',
|
|
195
210
|
:'allow_additional_properties' => :'allow_additional_properties',
|
|
@@ -211,17 +226,18 @@ module DocSpring
|
|
|
211
226
|
:'public_web_form' => :'public_web_form',
|
|
212
227
|
:'redirect_url' => :'redirect_url',
|
|
213
228
|
:'has_slack_webhook_url' => :'has_slack_webhook_url',
|
|
214
|
-
:'last_changed_at' => :'last_changed_at',
|
|
215
229
|
:'last_changed_by' => :'last_changed_by',
|
|
216
|
-
:'created_at' => :'created_at',
|
|
217
|
-
:'updated_at' => :'updated_at',
|
|
218
230
|
:'defaults' => :'defaults',
|
|
219
231
|
:'field_dependencies' => :'field_dependencies',
|
|
232
|
+
:'field_groups' => :'field_groups',
|
|
233
|
+
:'predefined_fields' => :'predefined_fields',
|
|
234
|
+
:'predefined_fields_sample_data' => :'predefined_fields_sample_data',
|
|
220
235
|
:'html' => :'html',
|
|
221
236
|
:'scss' => :'scss',
|
|
222
237
|
:'header_html' => :'header_html',
|
|
223
238
|
:'footer_html' => :'footer_html',
|
|
224
239
|
:'html_engine_options' => :'html_engine_options',
|
|
240
|
+
:'html_escape_data' => :'html_escape_data',
|
|
225
241
|
:'embed_edit_token' => :'embed_edit_token',
|
|
226
242
|
:'versions' => :'versions'
|
|
227
243
|
}
|
|
@@ -248,10 +264,13 @@ module DocSpring
|
|
|
248
264
|
:'document' => :'TemplateDocument',
|
|
249
265
|
:'parent_folder_id' => :'String',
|
|
250
266
|
:'path' => :'String',
|
|
251
|
-
:'version' => :'String',
|
|
252
267
|
:'latest_version' => :'String',
|
|
253
268
|
:'version_published_at' => :'Time',
|
|
254
269
|
:'locked' => :'Boolean',
|
|
270
|
+
:'last_changed_at' => :'Time',
|
|
271
|
+
:'created_at' => :'Time',
|
|
272
|
+
:'updated_at' => :'Time',
|
|
273
|
+
:'version' => :'String',
|
|
255
274
|
:'add_signature_request_submission_id_footers' => :'Boolean',
|
|
256
275
|
:'ai_field_naming_language' => :'AiFieldNamingLanguage',
|
|
257
276
|
:'allow_additional_properties' => :'Boolean',
|
|
@@ -273,17 +292,18 @@ module DocSpring
|
|
|
273
292
|
:'public_web_form' => :'Boolean',
|
|
274
293
|
:'redirect_url' => :'String',
|
|
275
294
|
:'has_slack_webhook_url' => :'Boolean',
|
|
276
|
-
:'last_changed_at' => :'Time',
|
|
277
295
|
:'last_changed_by' => :'TemplateActor',
|
|
278
|
-
:'created_at' => :'Time',
|
|
279
|
-
:'updated_at' => :'Time',
|
|
280
296
|
:'defaults' => :'TemplateDefaults',
|
|
281
297
|
:'field_dependencies' => :'Array<TemplateFieldDependency>',
|
|
298
|
+
:'field_groups' => :'Array<FieldGroup>',
|
|
299
|
+
:'predefined_fields' => :'Array<PredefinedField>',
|
|
300
|
+
:'predefined_fields_sample_data' => :'Hash<String, Object>',
|
|
282
301
|
:'html' => :'String',
|
|
283
302
|
:'scss' => :'String',
|
|
284
303
|
:'header_html' => :'String',
|
|
285
304
|
:'footer_html' => :'String',
|
|
286
305
|
:'html_engine_options' => :'HtmlEngineOptions',
|
|
306
|
+
:'html_escape_data' => :'Boolean',
|
|
287
307
|
:'embed_edit_token' => :'String',
|
|
288
308
|
:'versions' => :'Array<TemplateVersion>'
|
|
289
309
|
}
|
|
@@ -296,18 +316,20 @@ module DocSpring
|
|
|
296
316
|
:'description',
|
|
297
317
|
:'document',
|
|
298
318
|
:'parent_folder_id',
|
|
299
|
-
:'version',
|
|
300
319
|
:'latest_version',
|
|
301
320
|
:'version_published_at',
|
|
321
|
+
:'last_changed_at',
|
|
322
|
+
:'version',
|
|
302
323
|
:'ai_field_naming_language',
|
|
303
324
|
:'redirect_url',
|
|
304
|
-
:'last_changed_at',
|
|
305
325
|
:'last_changed_by',
|
|
326
|
+
:'predefined_fields_sample_data',
|
|
306
327
|
:'html',
|
|
307
328
|
:'scss',
|
|
308
329
|
:'header_html',
|
|
309
330
|
:'footer_html',
|
|
310
331
|
:'html_engine_options',
|
|
332
|
+
:'html_escape_data',
|
|
311
333
|
:'embed_edit_token',
|
|
312
334
|
])
|
|
313
335
|
end
|
|
@@ -386,12 +408,6 @@ module DocSpring
|
|
|
386
408
|
self.path = nil
|
|
387
409
|
end
|
|
388
410
|
|
|
389
|
-
if attributes.key?(:'version')
|
|
390
|
-
self.version = attributes[:'version']
|
|
391
|
-
else
|
|
392
|
-
self.version = nil
|
|
393
|
-
end
|
|
394
|
-
|
|
395
411
|
if attributes.key?(:'latest_version')
|
|
396
412
|
self.latest_version = attributes[:'latest_version']
|
|
397
413
|
else
|
|
@@ -410,6 +426,30 @@ module DocSpring
|
|
|
410
426
|
self.locked = nil
|
|
411
427
|
end
|
|
412
428
|
|
|
429
|
+
if attributes.key?(:'last_changed_at')
|
|
430
|
+
self.last_changed_at = attributes[:'last_changed_at']
|
|
431
|
+
else
|
|
432
|
+
self.last_changed_at = nil
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if attributes.key?(:'created_at')
|
|
436
|
+
self.created_at = attributes[:'created_at']
|
|
437
|
+
else
|
|
438
|
+
self.created_at = nil
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
if attributes.key?(:'updated_at')
|
|
442
|
+
self.updated_at = attributes[:'updated_at']
|
|
443
|
+
else
|
|
444
|
+
self.updated_at = nil
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if attributes.key?(:'version')
|
|
448
|
+
self.version = attributes[:'version']
|
|
449
|
+
else
|
|
450
|
+
self.version = nil
|
|
451
|
+
end
|
|
452
|
+
|
|
413
453
|
if attributes.key?(:'add_signature_request_submission_id_footers')
|
|
414
454
|
self.add_signature_request_submission_id_footers = attributes[:'add_signature_request_submission_id_footers']
|
|
415
455
|
else
|
|
@@ -538,30 +578,12 @@ module DocSpring
|
|
|
538
578
|
self.has_slack_webhook_url = nil
|
|
539
579
|
end
|
|
540
580
|
|
|
541
|
-
if attributes.key?(:'last_changed_at')
|
|
542
|
-
self.last_changed_at = attributes[:'last_changed_at']
|
|
543
|
-
else
|
|
544
|
-
self.last_changed_at = nil
|
|
545
|
-
end
|
|
546
|
-
|
|
547
581
|
if attributes.key?(:'last_changed_by')
|
|
548
582
|
self.last_changed_by = attributes[:'last_changed_by']
|
|
549
583
|
else
|
|
550
584
|
self.last_changed_by = nil
|
|
551
585
|
end
|
|
552
586
|
|
|
553
|
-
if attributes.key?(:'created_at')
|
|
554
|
-
self.created_at = attributes[:'created_at']
|
|
555
|
-
else
|
|
556
|
-
self.created_at = nil
|
|
557
|
-
end
|
|
558
|
-
|
|
559
|
-
if attributes.key?(:'updated_at')
|
|
560
|
-
self.updated_at = attributes[:'updated_at']
|
|
561
|
-
else
|
|
562
|
-
self.updated_at = nil
|
|
563
|
-
end
|
|
564
|
-
|
|
565
587
|
if attributes.key?(:'defaults')
|
|
566
588
|
self.defaults = attributes[:'defaults']
|
|
567
589
|
else
|
|
@@ -576,6 +598,30 @@ module DocSpring
|
|
|
576
598
|
self.field_dependencies = nil
|
|
577
599
|
end
|
|
578
600
|
|
|
601
|
+
if attributes.key?(:'field_groups')
|
|
602
|
+
if (value = attributes[:'field_groups']).is_a?(Array)
|
|
603
|
+
self.field_groups = value
|
|
604
|
+
end
|
|
605
|
+
else
|
|
606
|
+
self.field_groups = nil
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
if attributes.key?(:'predefined_fields')
|
|
610
|
+
if (value = attributes[:'predefined_fields']).is_a?(Array)
|
|
611
|
+
self.predefined_fields = value
|
|
612
|
+
end
|
|
613
|
+
else
|
|
614
|
+
self.predefined_fields = nil
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
if attributes.key?(:'predefined_fields_sample_data')
|
|
618
|
+
if (value = attributes[:'predefined_fields_sample_data']).is_a?(Hash) || value.nil?
|
|
619
|
+
self.predefined_fields_sample_data = value
|
|
620
|
+
end
|
|
621
|
+
else
|
|
622
|
+
self.predefined_fields_sample_data = nil
|
|
623
|
+
end
|
|
624
|
+
|
|
579
625
|
if attributes.key?(:'html')
|
|
580
626
|
self.html = attributes[:'html']
|
|
581
627
|
else
|
|
@@ -606,6 +652,12 @@ module DocSpring
|
|
|
606
652
|
self.html_engine_options = nil
|
|
607
653
|
end
|
|
608
654
|
|
|
655
|
+
if attributes.key?(:'html_escape_data')
|
|
656
|
+
self.html_escape_data = attributes[:'html_escape_data']
|
|
657
|
+
else
|
|
658
|
+
self.html_escape_data = nil
|
|
659
|
+
end
|
|
660
|
+
|
|
609
661
|
if attributes.key?(:'embed_edit_token')
|
|
610
662
|
self.embed_edit_token = attributes[:'embed_edit_token']
|
|
611
663
|
else
|
|
@@ -646,6 +698,14 @@ module DocSpring
|
|
|
646
698
|
invalid_properties.push('invalid value for "locked", locked cannot be nil.')
|
|
647
699
|
end
|
|
648
700
|
|
|
701
|
+
if @created_at.nil?
|
|
702
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
if @updated_at.nil?
|
|
706
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
707
|
+
end
|
|
708
|
+
|
|
649
709
|
if @add_signature_request_submission_id_footers.nil?
|
|
650
710
|
invalid_properties.push('invalid value for "add_signature_request_submission_id_footers", add_signature_request_submission_id_footers cannot be nil.')
|
|
651
711
|
end
|
|
@@ -722,14 +782,6 @@ module DocSpring
|
|
|
722
782
|
invalid_properties.push('invalid value for "has_slack_webhook_url", has_slack_webhook_url cannot be nil.')
|
|
723
783
|
end
|
|
724
784
|
|
|
725
|
-
if @created_at.nil?
|
|
726
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
727
|
-
end
|
|
728
|
-
|
|
729
|
-
if @updated_at.nil?
|
|
730
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
731
|
-
end
|
|
732
|
-
|
|
733
785
|
if @defaults.nil?
|
|
734
786
|
invalid_properties.push('invalid value for "defaults", defaults cannot be nil.')
|
|
735
787
|
end
|
|
@@ -738,6 +790,14 @@ module DocSpring
|
|
|
738
790
|
invalid_properties.push('invalid value for "field_dependencies", field_dependencies cannot be nil.')
|
|
739
791
|
end
|
|
740
792
|
|
|
793
|
+
if @field_groups.nil?
|
|
794
|
+
invalid_properties.push('invalid value for "field_groups", field_groups cannot be nil.')
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
if @predefined_fields.nil?
|
|
798
|
+
invalid_properties.push('invalid value for "predefined_fields", predefined_fields cannot be nil.')
|
|
799
|
+
end
|
|
800
|
+
|
|
741
801
|
if @versions.nil?
|
|
742
802
|
invalid_properties.push('invalid value for "versions", versions cannot be nil.')
|
|
743
803
|
end
|
|
@@ -754,6 +814,8 @@ module DocSpring
|
|
|
754
814
|
return false if @ready.nil?
|
|
755
815
|
return false if @path.nil?
|
|
756
816
|
return false if @locked.nil?
|
|
817
|
+
return false if @created_at.nil?
|
|
818
|
+
return false if @updated_at.nil?
|
|
757
819
|
return false if @add_signature_request_submission_id_footers.nil?
|
|
758
820
|
return false if @allow_additional_properties.nil?
|
|
759
821
|
return false if @allow_skipping_optional_fields.nil?
|
|
@@ -773,10 +835,10 @@ module DocSpring
|
|
|
773
835
|
return false if @public_submissions.nil?
|
|
774
836
|
return false if @public_web_form.nil?
|
|
775
837
|
return false if @has_slack_webhook_url.nil?
|
|
776
|
-
return false if @created_at.nil?
|
|
777
|
-
return false if @updated_at.nil?
|
|
778
838
|
return false if @defaults.nil?
|
|
779
839
|
return false if @field_dependencies.nil?
|
|
840
|
+
return false if @field_groups.nil?
|
|
841
|
+
return false if @predefined_fields.nil?
|
|
780
842
|
return false if @versions.nil?
|
|
781
843
|
true
|
|
782
844
|
end
|
|
@@ -831,6 +893,26 @@ module DocSpring
|
|
|
831
893
|
@locked = locked
|
|
832
894
|
end
|
|
833
895
|
|
|
896
|
+
# Custom attribute writer method with validation
|
|
897
|
+
# @param [Object] created_at Value to be assigned
|
|
898
|
+
def created_at=(created_at)
|
|
899
|
+
if created_at.nil?
|
|
900
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
901
|
+
end
|
|
902
|
+
|
|
903
|
+
@created_at = created_at
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
# Custom attribute writer method with validation
|
|
907
|
+
# @param [Object] updated_at Value to be assigned
|
|
908
|
+
def updated_at=(updated_at)
|
|
909
|
+
if updated_at.nil?
|
|
910
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
911
|
+
end
|
|
912
|
+
|
|
913
|
+
@updated_at = updated_at
|
|
914
|
+
end
|
|
915
|
+
|
|
834
916
|
# Custom attribute writer method with validation
|
|
835
917
|
# @param [Object] add_signature_request_submission_id_footers Value to be assigned
|
|
836
918
|
def add_signature_request_submission_id_footers=(add_signature_request_submission_id_footers)
|
|
@@ -1021,26 +1103,6 @@ module DocSpring
|
|
|
1021
1103
|
@has_slack_webhook_url = has_slack_webhook_url
|
|
1022
1104
|
end
|
|
1023
1105
|
|
|
1024
|
-
# Custom attribute writer method with validation
|
|
1025
|
-
# @param [Object] created_at Value to be assigned
|
|
1026
|
-
def created_at=(created_at)
|
|
1027
|
-
if created_at.nil?
|
|
1028
|
-
fail ArgumentError, 'created_at cannot be nil'
|
|
1029
|
-
end
|
|
1030
|
-
|
|
1031
|
-
@created_at = created_at
|
|
1032
|
-
end
|
|
1033
|
-
|
|
1034
|
-
# Custom attribute writer method with validation
|
|
1035
|
-
# @param [Object] updated_at Value to be assigned
|
|
1036
|
-
def updated_at=(updated_at)
|
|
1037
|
-
if updated_at.nil?
|
|
1038
|
-
fail ArgumentError, 'updated_at cannot be nil'
|
|
1039
|
-
end
|
|
1040
|
-
|
|
1041
|
-
@updated_at = updated_at
|
|
1042
|
-
end
|
|
1043
|
-
|
|
1044
1106
|
# Custom attribute writer method with validation
|
|
1045
1107
|
# @param [Object] defaults Value to be assigned
|
|
1046
1108
|
def defaults=(defaults)
|
|
@@ -1061,6 +1123,26 @@ module DocSpring
|
|
|
1061
1123
|
@field_dependencies = field_dependencies
|
|
1062
1124
|
end
|
|
1063
1125
|
|
|
1126
|
+
# Custom attribute writer method with validation
|
|
1127
|
+
# @param [Object] field_groups Value to be assigned
|
|
1128
|
+
def field_groups=(field_groups)
|
|
1129
|
+
if field_groups.nil?
|
|
1130
|
+
fail ArgumentError, 'field_groups cannot be nil'
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
@field_groups = field_groups
|
|
1134
|
+
end
|
|
1135
|
+
|
|
1136
|
+
# Custom attribute writer method with validation
|
|
1137
|
+
# @param [Object] predefined_fields Value to be assigned
|
|
1138
|
+
def predefined_fields=(predefined_fields)
|
|
1139
|
+
if predefined_fields.nil?
|
|
1140
|
+
fail ArgumentError, 'predefined_fields cannot be nil'
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
@predefined_fields = predefined_fields
|
|
1144
|
+
end
|
|
1145
|
+
|
|
1064
1146
|
# Custom attribute writer method with validation
|
|
1065
1147
|
# @param [Object] versions Value to be assigned
|
|
1066
1148
|
def versions=(versions)
|
|
@@ -1084,10 +1166,13 @@ module DocSpring
|
|
|
1084
1166
|
document == o.document &&
|
|
1085
1167
|
parent_folder_id == o.parent_folder_id &&
|
|
1086
1168
|
path == o.path &&
|
|
1087
|
-
version == o.version &&
|
|
1088
1169
|
latest_version == o.latest_version &&
|
|
1089
1170
|
version_published_at == o.version_published_at &&
|
|
1090
1171
|
locked == o.locked &&
|
|
1172
|
+
last_changed_at == o.last_changed_at &&
|
|
1173
|
+
created_at == o.created_at &&
|
|
1174
|
+
updated_at == o.updated_at &&
|
|
1175
|
+
version == o.version &&
|
|
1091
1176
|
add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
|
|
1092
1177
|
ai_field_naming_language == o.ai_field_naming_language &&
|
|
1093
1178
|
allow_additional_properties == o.allow_additional_properties &&
|
|
@@ -1109,17 +1194,18 @@ module DocSpring
|
|
|
1109
1194
|
public_web_form == o.public_web_form &&
|
|
1110
1195
|
redirect_url == o.redirect_url &&
|
|
1111
1196
|
has_slack_webhook_url == o.has_slack_webhook_url &&
|
|
1112
|
-
last_changed_at == o.last_changed_at &&
|
|
1113
1197
|
last_changed_by == o.last_changed_by &&
|
|
1114
|
-
created_at == o.created_at &&
|
|
1115
|
-
updated_at == o.updated_at &&
|
|
1116
1198
|
defaults == o.defaults &&
|
|
1117
1199
|
field_dependencies == o.field_dependencies &&
|
|
1200
|
+
field_groups == o.field_groups &&
|
|
1201
|
+
predefined_fields == o.predefined_fields &&
|
|
1202
|
+
predefined_fields_sample_data == o.predefined_fields_sample_data &&
|
|
1118
1203
|
html == o.html &&
|
|
1119
1204
|
scss == o.scss &&
|
|
1120
1205
|
header_html == o.header_html &&
|
|
1121
1206
|
footer_html == o.footer_html &&
|
|
1122
1207
|
html_engine_options == o.html_engine_options &&
|
|
1208
|
+
html_escape_data == o.html_escape_data &&
|
|
1123
1209
|
embed_edit_token == o.embed_edit_token &&
|
|
1124
1210
|
versions == o.versions
|
|
1125
1211
|
end
|
|
@@ -1133,7 +1219,7 @@ module DocSpring
|
|
|
1133
1219
|
# Calculates hash code according to all attributes.
|
|
1134
1220
|
# @return [Integer] Hash code
|
|
1135
1221
|
def hash
|
|
1136
|
-
[id, name, description, template_type, ready, document, parent_folder_id, path,
|
|
1222
|
+
[id, name, description, template_type, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions].hash
|
|
1137
1223
|
end
|
|
1138
1224
|
|
|
1139
1225
|
# Builds the object from hash
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module DocSpring
|
|
17
17
|
# A user in your account, an API token, or someone using the embedded template editor.
|
|
18
18
|
class TemplateActor < ApiModelBase
|
|
19
|
-
# `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
19
|
+
# `user`: a user in your account, also when they make the change with an app they connected (an OAuth access token). `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
22
|
# The user's ID, for `user`.
|