docspring 4.3.0 → 4.4.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +80 -0
  3. data/.openapi-generator/FILES +84 -0
  4. data/CHANGELOG.md +55 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +20 -1
  7. data/docs/AddTemplateFieldsRequest.md +1 -1
  8. data/docs/Client.md +2311 -766
  9. data/docs/CombinedPdfSource.md +1 -1
  10. data/docs/CreateAccountEmailActionRequest.md +54 -0
  11. data/docs/CreateEmailActionRequest.md +50 -0
  12. data/docs/CreateEmailDomainRequest.md +18 -0
  13. data/docs/CreateSubmissionBatchRequest.md +2 -2
  14. data/docs/CreateSubmissionRequest.md +22 -4
  15. data/docs/CreateTemplateRequest.md +22 -6
  16. data/docs/DnsRecordType.md +15 -0
  17. data/docs/EmailAction.md +76 -0
  18. data/docs/EmailActionConditions.md +20 -0
  19. data/docs/EmailActionConditionsInput.md +20 -0
  20. data/docs/EmailActionCustomization.md +36 -0
  21. data/docs/EmailActionDelivery.md +15 -0
  22. data/docs/EmailActionFileFormats.md +15 -0
  23. data/docs/EmailActionList.md +20 -0
  24. data/docs/EmailActionSetting.md +15 -0
  25. data/docs/EmailActionSubmissionType.md +15 -0
  26. data/docs/EmailActionTestEmail.md +18 -0
  27. data/docs/EmailDomain.md +38 -0
  28. data/docs/EmailDomainDnsRecord.md +24 -0
  29. data/docs/EmailDomainDnsRecordPurpose.md +15 -0
  30. data/docs/EmailDomainList.md +20 -0
  31. data/docs/EmailDomainRecordState.md +15 -0
  32. data/docs/EmailDomainState.md +15 -0
  33. data/docs/ErrorInfo.md +12 -6
  34. data/docs/Field.md +1 -1
  35. data/docs/FieldInput.md +1 -1
  36. data/docs/HtmlEngineOptions.md +1 -1
  37. data/docs/HtmlEngineOptionsInput.md +1 -1
  38. data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
  39. data/docs/SignatureRequest.md +9 -1
  40. data/docs/SignatureRequestEmailAttachments.md +15 -0
  41. data/docs/SignatureRequestEmailStatus.md +15 -0
  42. data/docs/SignatureRequestInput.md +7 -3
  43. data/docs/SignatureRequestReminders.md +20 -0
  44. data/docs/SigningOrder.md +15 -0
  45. data/docs/Submission.md +4 -2
  46. data/docs/SubmissionAction.md +5 -3
  47. data/docs/SubmissionInput.md +3 -3
  48. data/docs/SubmissionSummary.md +1 -1
  49. data/docs/Template.md +23 -7
  50. data/docs/TemplateSourcePdf.md +1 -1
  51. data/docs/TemplateSummary.md +4 -4
  52. data/docs/UpdateAccountEmailActionRequest.md +54 -0
  53. data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
  54. data/docs/UpdateEmailActionRequest.md +50 -0
  55. data/docs/UpdateTemplateDocumentRequest.md +1 -1
  56. data/docs/UpdateTemplateRequest.md +21 -5
  57. data/docs/ValidateSubmissionRequest.md +22 -4
  58. data/lib/docspring/api/client.rb +1749 -314
  59. data/lib/docspring/api_client.rb +1 -1
  60. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  61. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  62. data/lib/docspring/models/create_account_email_action_request.rb +388 -0
  63. data/lib/docspring/models/create_email_action_request.rb +364 -0
  64. data/lib/docspring/models/create_email_domain_request.rb +185 -0
  65. data/lib/docspring/models/create_submission_batch_request.rb +2 -2
  66. data/lib/docspring/models/create_submission_request.rb +143 -7
  67. data/lib/docspring/models/create_template_request.rb +107 -7
  68. data/lib/docspring/models/dns_record_type.rb +42 -0
  69. data/lib/docspring/models/email_action.rb +790 -0
  70. data/lib/docspring/models/email_action_conditions.rb +219 -0
  71. data/lib/docspring/models/email_action_conditions_input.rb +219 -0
  72. data/lib/docspring/models/email_action_customization.rb +360 -0
  73. data/lib/docspring/models/email_action_delivery.rb +41 -0
  74. data/lib/docspring/models/email_action_file_formats.rb +43 -0
  75. data/lib/docspring/models/email_action_list.rb +200 -0
  76. data/lib/docspring/models/email_action_setting.rb +53 -0
  77. data/lib/docspring/models/email_action_submission_type.rb +42 -0
  78. data/lib/docspring/models/email_action_test_email.rb +185 -0
  79. data/lib/docspring/models/email_domain.rb +423 -0
  80. data/lib/docspring/models/email_domain_dns_record.rb +288 -0
  81. data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
  82. data/lib/docspring/models/email_domain_list.rb +200 -0
  83. data/lib/docspring/models/email_domain_record_state.rb +42 -0
  84. data/lib/docspring/models/email_domain_state.rb +42 -0
  85. data/lib/docspring/models/error_code.rb +3 -1
  86. data/lib/docspring/models/error_info.rb +39 -9
  87. data/lib/docspring/models/field.rb +1 -1
  88. data/lib/docspring/models/field_input.rb +1 -1
  89. data/lib/docspring/models/html_engine_options.rb +1 -1
  90. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  91. data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
  92. data/lib/docspring/models/signature_request.rb +68 -2
  93. data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
  94. data/lib/docspring/models/signature_request_email_status.rb +47 -0
  95. data/lib/docspring/models/signature_request_event_type.rb +3 -1
  96. data/lib/docspring/models/signature_request_input.rb +25 -22
  97. data/lib/docspring/models/signature_request_reminders.rb +212 -0
  98. data/lib/docspring/models/signing_order.rb +41 -0
  99. data/lib/docspring/models/string_condition_type.rb +8 -1
  100. data/lib/docspring/models/submission.rb +30 -3
  101. data/lib/docspring/models/submission_action.rb +18 -5
  102. data/lib/docspring/models/submission_input.rb +3 -3
  103. data/lib/docspring/models/submission_summary.rb +1 -1
  104. data/lib/docspring/models/template.rb +144 -8
  105. data/lib/docspring/models/template_source_pdf.rb +1 -1
  106. data/lib/docspring/models/template_summary.rb +4 -4
  107. data/lib/docspring/models/template_type.rb +2 -1
  108. data/lib/docspring/models/update_account_email_action_request.rb +388 -0
  109. data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
  110. data/lib/docspring/models/update_email_action_request.rb +364 -0
  111. data/lib/docspring/models/update_template_document_request.rb +1 -1
  112. data/lib/docspring/models/update_template_request.rb +108 -8
  113. data/lib/docspring/models/validate_submission_request.rb +143 -7
  114. data/lib/docspring/models/webhook_event_type.rb +3 -1
  115. data/lib/docspring/request_schemas.json +1691 -145
  116. data/lib/docspring/request_validator.rb +4 -0
  117. data/lib/docspring/version.rb +1 -1
  118. data/lib/docspring.rb +28 -0
  119. data/spec/api/client_spec.rb +306 -18
  120. data/spec/models/create_account_email_action_request_spec.rb +144 -0
  121. data/spec/models/create_email_action_request_spec.rb +132 -0
  122. data/spec/models/create_email_domain_request_spec.rb +36 -0
  123. data/spec/models/create_submission_request_spec.rb +54 -0
  124. data/spec/models/create_template_request_spec.rb +48 -0
  125. data/spec/models/dns_record_type_spec.rb +30 -0
  126. data/spec/models/email_action_conditions_input_spec.rb +42 -0
  127. data/spec/models/email_action_conditions_spec.rb +42 -0
  128. data/spec/models/email_action_customization_spec.rb +90 -0
  129. data/spec/models/email_action_delivery_spec.rb +30 -0
  130. data/spec/models/email_action_file_formats_spec.rb +30 -0
  131. data/spec/models/email_action_list_spec.rb +42 -0
  132. data/spec/models/email_action_setting_spec.rb +30 -0
  133. data/spec/models/email_action_spec.rb +210 -0
  134. data/spec/models/email_action_submission_type_spec.rb +30 -0
  135. data/spec/models/email_action_test_email_spec.rb +36 -0
  136. data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
  137. data/spec/models/email_domain_dns_record_spec.rb +54 -0
  138. data/spec/models/email_domain_list_spec.rb +42 -0
  139. data/spec/models/email_domain_record_state_spec.rb +30 -0
  140. data/spec/models/email_domain_spec.rb +96 -0
  141. data/spec/models/email_domain_state_spec.rb +30 -0
  142. data/spec/models/error_info_spec.rb +18 -0
  143. data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
  144. data/spec/models/signature_request_email_attachments_spec.rb +30 -0
  145. data/spec/models/signature_request_email_status_spec.rb +30 -0
  146. data/spec/models/signature_request_input_spec.rb +12 -0
  147. data/spec/models/signature_request_reminders_spec.rb +42 -0
  148. data/spec/models/signature_request_spec.rb +24 -0
  149. data/spec/models/signing_order_spec.rb +30 -0
  150. data/spec/models/submission_action_spec.rb +6 -0
  151. data/spec/models/submission_spec.rb +6 -0
  152. data/spec/models/template_spec.rb +48 -0
  153. data/spec/models/update_account_email_action_request_spec.rb +144 -0
  154. data/spec/models/update_email_action_customization_request_spec.rb +120 -0
  155. data/spec/models/update_email_action_request_spec.rb +132 -0
  156. data/spec/models/update_template_request_spec.rb +48 -0
  157. data/spec/models/validate_submission_request_spec.rb +54 -0
  158. metadata +115 -4
  159. data/.gitlab-ci.yml +0 -26
  160. data/.travis.yml +0 -11
@@ -0,0 +1,364 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and 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 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ # The settings to change. Properties left out keep their values.
18
+ class UpdateEmailActionRequest < ApiModelBase
19
+ # A name for the email action, shown in the dashboard. Null shows its recipients instead.
20
+ attr_accessor :name
21
+
22
+ # Whether it sends emails. DocSpring turns an email action off after 3 days of failed emails, or straight away when one of the addresses in `to`, `cc` or `bcc` (not one from a field or metadata) bounces or marks an email as spam.
23
+ attr_accessor :enabled
24
+
25
+ # Who gets each email: email addresses, and tags for an address that each submission gives, from one of the template's text or email fields (`{{ data.client_email }}`, or `{{ data["client email"] }}` for a name with spaces) or from its metadata (`{{ metadata.agent_email }}`, or `{{ metadata.agent.email }}` for a value in an object). A tag whose value is blank or isn't a valid address is skipped for that submission, and so is a field an account email action names that the template doesn't have. `{{ signer.email }}` sends each of the submission's signers their own email, to them alone, and everyone else in `to`, `cc` and `bcc` one email together, without the signers. An email needs at least one entry in `to`, `cc` or `bcc`, and at most 10 across them.
26
+ attr_accessor :to
27
+
28
+ # Who is copied on each email, as in `to` (but not `{{ signer.email }}`).
29
+ attr_accessor :cc
30
+
31
+ # Who is blind-copied on each email, as in `to` (but not `{{ signer.email }}`).
32
+ attr_accessor :bcc
33
+
34
+ # The sender's name. Null uses your account's name. From DocSpring's shared address, the name is followed by "via DocSpring".
35
+ attr_accessor :from_name
36
+
37
+ # The sender's address, at one of your verified email domains. Null sends from DocSpring's shared address.
38
+ attr_accessor :from_address
39
+
40
+ # Where replies go: a team member's email address, or an address at one of your verified email domains. Null sends without a reply address.
41
+ attr_accessor :reply_to
42
+
43
+ # The subject line, a Liquid template with the variables `account.name`, `template.name`, `template.id`, `submission.id`, the submission's values as `data.<field name>` (`data["field name"]` for a name with spaces) and its metadata as `metadata.<key>`, such as `Your {{ template.name }}`. Null uses the template's name followed by the file it sends, such as "Lease PDF", or by "files" when it sends several.
44
+ attr_accessor :subject
45
+
46
+ # The email's text, a Liquid template with the same variables as `subject`. `if`, `unless` and `case` tags work. Line breaks are kept. Null uses a short message that says the files are attached or ready to download.
47
+ attr_accessor :message
48
+
49
+ # The attached files' name, a Liquid template with the same variables as `subject`, such as `{{ data.last_name }} lease`. Each file's extension (`.pdf`, `.docx` or `.odt`) is added. Null uses the submission's `pdf_filename` metadata when it has one, and otherwise the template's name. A download link's files have the names their other downloads have: the submission's `pdf_filename`, or its ID.
50
+ attr_accessor :file_name
51
+
52
+ # Which of the submission's files the email sends: `all` sends every file the submission made (its PDF, and a Word template's Word document and OpenDocument file when it made them), and `docx`, `odt` or `pdf` sends only that file. A submission that made none of them sends nothing, and its email shows as skipped. Only Word templates make Word documents and OpenDocument files, so another template's email action takes `pdf` or `all`.
53
+ attr_accessor :file_formats
54
+
55
+ # `attachment` attaches the files, or sends a download link when together they're larger than `max_attachment_mb`. `link` sends a download link, which works for 7 days. Accounts with a BAA start with `link`.
56
+ attr_accessor :delivery
57
+
58
+ # With `delivery` `attachment`, files larger than this many megabytes in all (1 MB is 1,000,000 bytes) are sent as a download link instead. Emailing a file makes it about 38% larger, and many company mail servers refuse emails over 10 MB, so the default is 7. Raise it only when every recipient's mail server accepts larger emails, such as Microsoft 365 (up to 36 MB) or Gmail (50 MB).
59
+ attr_accessor :max_attachment_mb
60
+
61
+ # Which submissions send emails: `live`, `test` or `all`. Test submissions only email your team's members, and skip every other recipient.
62
+ attr_accessor :submission_type
63
+
64
+ # Sends the email only when the submission's values meet these conditions, which work as a conditional logic rule's do. The values are the ones the PDF has: formulas worked out, and blank for a field that a rule hides. A field the template doesn't have (in an account email action's conditions) counts as blank. A submission that doesn't meet them sends nothing, and its email shows as skipped. Null sends for every submission.
65
+ attr_accessor :send_when
66
+
67
+ # Whether the account's owner gets an email when the email action's emails keep failing.
68
+ attr_accessor :failure_notifications_enabled
69
+
70
+ class EnumAttributeValidator
71
+ attr_reader :datatype
72
+ attr_reader :allowable_values
73
+
74
+ def initialize(datatype, allowable_values)
75
+ @allowable_values = allowable_values.map do |value|
76
+ case datatype.to_s
77
+ when /Integer/i
78
+ value.to_i
79
+ when /Float/i
80
+ value.to_f
81
+ else
82
+ value
83
+ end
84
+ end
85
+ end
86
+
87
+ def valid?(value)
88
+ !value || allowable_values.include?(value)
89
+ end
90
+ end
91
+
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'name' => :'name',
96
+ :'enabled' => :'enabled',
97
+ :'to' => :'to',
98
+ :'cc' => :'cc',
99
+ :'bcc' => :'bcc',
100
+ :'from_name' => :'from_name',
101
+ :'from_address' => :'from_address',
102
+ :'reply_to' => :'reply_to',
103
+ :'subject' => :'subject',
104
+ :'message' => :'message',
105
+ :'file_name' => :'file_name',
106
+ :'file_formats' => :'file_formats',
107
+ :'delivery' => :'delivery',
108
+ :'max_attachment_mb' => :'max_attachment_mb',
109
+ :'submission_type' => :'submission_type',
110
+ :'send_when' => :'send_when',
111
+ :'failure_notifications_enabled' => :'failure_notifications_enabled'
112
+ }
113
+ end
114
+
115
+ # Returns attribute mapping this model knows about
116
+ def self.acceptable_attribute_map
117
+ attribute_map
118
+ end
119
+
120
+ # Returns all the JSON keys this model knows about
121
+ def self.acceptable_attributes
122
+ acceptable_attribute_map.values
123
+ end
124
+
125
+ # Attribute type mapping.
126
+ def self.openapi_types
127
+ {
128
+ :'name' => :'String',
129
+ :'enabled' => :'Boolean',
130
+ :'to' => :'Array<String>',
131
+ :'cc' => :'Array<String>',
132
+ :'bcc' => :'Array<String>',
133
+ :'from_name' => :'String',
134
+ :'from_address' => :'String',
135
+ :'reply_to' => :'String',
136
+ :'subject' => :'String',
137
+ :'message' => :'String',
138
+ :'file_name' => :'String',
139
+ :'file_formats' => :'EmailActionFileFormats',
140
+ :'delivery' => :'EmailActionDelivery',
141
+ :'max_attachment_mb' => :'Integer',
142
+ :'submission_type' => :'EmailActionSubmissionType',
143
+ :'send_when' => :'EmailActionConditionsInput',
144
+ :'failure_notifications_enabled' => :'Boolean'
145
+ }
146
+ end
147
+
148
+ # List of attributes with nullable: true
149
+ def self.openapi_nullable
150
+ Set.new([
151
+ :'name',
152
+ :'from_name',
153
+ :'from_address',
154
+ :'reply_to',
155
+ :'subject',
156
+ :'message',
157
+ :'file_name',
158
+ :'send_when',
159
+ ])
160
+ end
161
+
162
+ # Returns attribute type mapping
163
+ def self.acceptable_openapi_types
164
+ openapi_types
165
+ end
166
+
167
+ # Returns the nullable attributes
168
+ def self.acceptable_openapi_nullable
169
+ openapi_nullable
170
+ end
171
+
172
+ # Initializes the object
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ def initialize(attributes = {})
175
+ if (!attributes.is_a?(Hash))
176
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::UpdateEmailActionRequest` initialize method"
177
+ end
178
+
179
+ # check to see if the attribute exists and convert string to symbol for hash key
180
+ acceptable_attribute_map = self.class.acceptable_attribute_map
181
+ attributes = attributes.each_with_object({}) { |(k, v), h|
182
+ if (!acceptable_attribute_map.key?(k.to_sym))
183
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::UpdateEmailActionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
184
+ end
185
+ h[k.to_sym] = v
186
+ }
187
+
188
+ if attributes.key?(:'name')
189
+ self.name = attributes[:'name']
190
+ end
191
+
192
+ if attributes.key?(:'enabled')
193
+ self.enabled = attributes[:'enabled']
194
+ end
195
+
196
+ if attributes.key?(:'to')
197
+ if (value = attributes[:'to']).is_a?(Array)
198
+ self.to = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'cc')
203
+ if (value = attributes[:'cc']).is_a?(Array)
204
+ self.cc = value
205
+ end
206
+ end
207
+
208
+ if attributes.key?(:'bcc')
209
+ if (value = attributes[:'bcc']).is_a?(Array)
210
+ self.bcc = value
211
+ end
212
+ end
213
+
214
+ if attributes.key?(:'from_name')
215
+ self.from_name = attributes[:'from_name']
216
+ end
217
+
218
+ if attributes.key?(:'from_address')
219
+ self.from_address = attributes[:'from_address']
220
+ end
221
+
222
+ if attributes.key?(:'reply_to')
223
+ self.reply_to = attributes[:'reply_to']
224
+ end
225
+
226
+ if attributes.key?(:'subject')
227
+ self.subject = attributes[:'subject']
228
+ end
229
+
230
+ if attributes.key?(:'message')
231
+ self.message = attributes[:'message']
232
+ end
233
+
234
+ if attributes.key?(:'file_name')
235
+ self.file_name = attributes[:'file_name']
236
+ end
237
+
238
+ if attributes.key?(:'file_formats')
239
+ self.file_formats = attributes[:'file_formats']
240
+ end
241
+
242
+ if attributes.key?(:'delivery')
243
+ self.delivery = attributes[:'delivery']
244
+ end
245
+
246
+ if attributes.key?(:'max_attachment_mb')
247
+ self.max_attachment_mb = attributes[:'max_attachment_mb']
248
+ end
249
+
250
+ if attributes.key?(:'submission_type')
251
+ self.submission_type = attributes[:'submission_type']
252
+ end
253
+
254
+ if attributes.key?(:'send_when')
255
+ self.send_when = attributes[:'send_when']
256
+ end
257
+
258
+ if attributes.key?(:'failure_notifications_enabled')
259
+ self.failure_notifications_enabled = attributes[:'failure_notifications_enabled']
260
+ end
261
+ end
262
+
263
+ # Show invalid properties with the reasons. Usually used together with valid?
264
+ # @return Array for valid properties with the reasons
265
+ def list_invalid_properties
266
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
267
+ invalid_properties = Array.new
268
+ invalid_properties
269
+ end
270
+
271
+ # Check to see if the all the properties in the model are valid
272
+ # @return true if the model is valid
273
+ def valid?
274
+ warn '[DEPRECATED] the `valid?` method is obsolete'
275
+ true
276
+ end
277
+
278
+ # Checks equality by comparing each attribute.
279
+ # @param [Object] Object to be compared
280
+ def ==(o)
281
+ return true if self.equal?(o)
282
+ self.class == o.class &&
283
+ name == o.name &&
284
+ enabled == o.enabled &&
285
+ to == o.to &&
286
+ cc == o.cc &&
287
+ bcc == o.bcc &&
288
+ from_name == o.from_name &&
289
+ from_address == o.from_address &&
290
+ reply_to == o.reply_to &&
291
+ subject == o.subject &&
292
+ message == o.message &&
293
+ file_name == o.file_name &&
294
+ file_formats == o.file_formats &&
295
+ delivery == o.delivery &&
296
+ max_attachment_mb == o.max_attachment_mb &&
297
+ submission_type == o.submission_type &&
298
+ send_when == o.send_when &&
299
+ failure_notifications_enabled == o.failure_notifications_enabled
300
+ end
301
+
302
+ # @see the `==` method
303
+ # @param [Object] Object to be compared
304
+ def eql?(o)
305
+ self == o
306
+ end
307
+
308
+ # Calculates hash code according to all attributes.
309
+ # @return [Integer] Hash code
310
+ def hash
311
+ [name, enabled, to, cc, bcc, from_name, from_address, reply_to, subject, message, file_name, file_formats, delivery, max_attachment_mb, submission_type, send_when, failure_notifications_enabled].hash
312
+ end
313
+
314
+ # Builds the object from hash
315
+ # @param [Hash] attributes Model attributes in the form of hash
316
+ # @return [Object] Returns the model itself
317
+ def self.build_from_hash(attributes)
318
+ return nil unless attributes.is_a?(Hash)
319
+ attributes = attributes.transform_keys(&:to_sym)
320
+ # include attributes inherited from allOf parents (the nearest declaration wins)
321
+ map = acceptable_attribute_map
322
+ transformed_hash = {}
323
+ acceptable_openapi_types.each_pair do |key, type|
324
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
325
+ transformed_hash["#{key}"] = nil
326
+ elsif type =~ /\AArray<(.*)>/i
327
+ # check to ensure the input is an array given that the attribute
328
+ # is documented as an array but the input is not
329
+ if attributes[map[key]].is_a?(Array)
330
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
331
+ end
332
+ elsif !attributes[map[key]].nil?
333
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
334
+ end
335
+ end
336
+ # Responses can include enum values added after this client was released, so the enum setters
337
+ # accept any value while the model is built from a response
338
+ allocate.tap do |model|
339
+ model.instance_variable_set(:@_skip_enum_validation, true)
340
+ model.send(:initialize, transformed_hash)
341
+ model.remove_instance_variable(:@_skip_enum_validation)
342
+ end
343
+ end
344
+
345
+ # Returns the object in the form of hash
346
+ # @return [Hash] Returns the object in the form of hash
347
+ def to_hash
348
+ hash = {}
349
+ # include attributes inherited from allOf parents (the nearest declaration wins)
350
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
351
+ value = self.send(attr)
352
+ if value.nil?
353
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
354
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
355
+ end
356
+
357
+ hash[param] = _to_hash(value)
358
+ end
359
+ hash
360
+ end
361
+
362
+ end
363
+
364
+ end
@@ -22,7 +22,7 @@ module DocSpring
22
22
  # An https:// link to the template's document, instead of `cache_id`: a PDF template's PDF (up to 100 MB) or a Word template's Word document (.docx or .odt, up to 50 MB). DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then, and `converting` while an .odt is converted (sync.api hosts wait for both). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why.
23
23
  attr_accessor :document_url
24
24
 
25
- # The template's document (a PDF, or a Word template's Word document), encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`.
25
+ # The template's document (a PDF, or a Word template's Word document), encoded as base64 (a `data:` URI works too), instead of `cache_id`. Line breaks and spaces in it are ignored. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`.
26
26
  attr_accessor :document_base64
27
27
 
28
28
  # The file's name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it.
@@ -22,7 +22,7 @@ module DocSpring
22
22
  # Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests.
23
23
  attr_accessor :description
24
24
 
25
- # What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
25
+ # What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
26
26
  attr_accessor :output_format
27
27
 
28
28
  # The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions.
@@ -49,7 +49,7 @@ module DocSpring
49
49
  # Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
50
50
  attr_accessor :editable_submissions
51
51
 
52
- # 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.
52
+ # 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), without a path. 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.
53
53
  attr_accessor :embed_domains
54
54
 
55
55
  # Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
@@ -91,6 +91,27 @@ module DocSpring
91
91
  # Where the web form sends people after they submit it.
92
92
  attr_accessor :redirect_url
93
93
 
94
+ # How DocSpring's completed emails send the signed PDF to your signers and CCs: `attachment` (attached, or a download link when it's too big to attach) or `link` (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created.
95
+ attr_accessor :signature_request_email_attachments
96
+
97
+ # The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only.
98
+ attr_accessor :signature_request_from_address
99
+
100
+ # Puts a signing token in `signature_request_signing_url`, as `{{ token_id }}` and `{{ token_secret }}`, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only.
101
+ attr_accessor :signature_request_include_signing_token
102
+
103
+ # The sender name on the emails DocSpring sends your signers, as in "Acme via DocSpring". It can't contain an email address, a website or quotes. Null uses your account's name. PDF templates only.
104
+ attr_accessor :signature_request_from_name
105
+
106
+ # Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's `notification_emails` replaces them. PDF templates only.
107
+ attr_accessor :signature_request_notification_emails
108
+
109
+ # Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's `reply_to` replaces it. PDF templates only.
110
+ attr_accessor :signature_request_reply_to
111
+
112
+ # A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include `{{ signature_request_id }}`. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only.
113
+ attr_accessor :signature_request_signing_url
114
+
94
115
  # A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set.
95
116
  attr_accessor :slack_webhook_url
96
117
 
@@ -109,7 +130,7 @@ module DocSpring
109
130
  # 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.
110
131
  attr_accessor :predefined_fields_sample_data
111
132
 
112
- # The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates.
133
+ # The HTML of an HTML template, as a Liquid template. Null for other templates.
113
134
  attr_accessor :html
114
135
 
115
136
  # The SCSS of an HTML template.
@@ -124,9 +145,12 @@ module DocSpring
124
145
  # Null resets the options to their defaults.
125
146
  attr_accessor :html_engine_options
126
147
 
127
- # 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.
148
+ # 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 other templates.
128
149
  attr_accessor :html_escape_data
129
150
 
151
+ # A page design's layout: its page setup, its sections and the elements placed in them, in the Page Designer layout format (https://docspring.com/docs/page-designer/layout-format/). Its JSON Schema is at https://docspring.com/schemas/page-designer/layout.v1.json. Null for other templates. Setting it replaces the whole layout, and DocSpring adds a field for each value it reads. Left out when a page design is created, it starts with an empty page.
152
+ attr_accessor :layout
153
+
130
154
  class EnumAttributeValidator
131
155
  attr_reader :datatype
132
156
  attr_reader :allowable_values
@@ -177,6 +201,13 @@ module DocSpring
177
201
  :'public_submissions' => :'public_submissions',
178
202
  :'public_web_form' => :'public_web_form',
179
203
  :'redirect_url' => :'redirect_url',
204
+ :'signature_request_email_attachments' => :'signature_request_email_attachments',
205
+ :'signature_request_from_address' => :'signature_request_from_address',
206
+ :'signature_request_include_signing_token' => :'signature_request_include_signing_token',
207
+ :'signature_request_from_name' => :'signature_request_from_name',
208
+ :'signature_request_notification_emails' => :'signature_request_notification_emails',
209
+ :'signature_request_reply_to' => :'signature_request_reply_to',
210
+ :'signature_request_signing_url' => :'signature_request_signing_url',
180
211
  :'slack_webhook_url' => :'slack_webhook_url',
181
212
  :'defaults' => :'defaults',
182
213
  :'field_dependencies' => :'field_dependencies',
@@ -188,7 +219,8 @@ module DocSpring
188
219
  :'header_html' => :'header_html',
189
220
  :'footer_html' => :'footer_html',
190
221
  :'html_engine_options' => :'html_engine_options',
191
- :'html_escape_data' => :'html_escape_data'
222
+ :'html_escape_data' => :'html_escape_data',
223
+ :'layout' => :'layout'
192
224
  }
193
225
  end
194
226
 
@@ -230,6 +262,13 @@ module DocSpring
230
262
  :'public_submissions' => :'Boolean',
231
263
  :'public_web_form' => :'Boolean',
232
264
  :'redirect_url' => :'String',
265
+ :'signature_request_email_attachments' => :'SignatureRequestEmailAttachments',
266
+ :'signature_request_from_address' => :'String',
267
+ :'signature_request_include_signing_token' => :'Boolean',
268
+ :'signature_request_from_name' => :'String',
269
+ :'signature_request_notification_emails' => :'Array<String>',
270
+ :'signature_request_reply_to' => :'String',
271
+ :'signature_request_signing_url' => :'String',
233
272
  :'slack_webhook_url' => :'String',
234
273
  :'defaults' => :'TemplateDefaultsInput',
235
274
  :'field_dependencies' => :'Array<TemplateFieldDependencyInput>',
@@ -241,7 +280,8 @@ module DocSpring
241
280
  :'header_html' => :'String',
242
281
  :'footer_html' => :'String',
243
282
  :'html_engine_options' => :'HtmlEngineOptionsInput',
244
- :'html_escape_data' => :'Boolean'
283
+ :'html_escape_data' => :'Boolean',
284
+ :'layout' => :'Hash<String, Object>'
245
285
  }
246
286
  end
247
287
 
@@ -252,6 +292,11 @@ module DocSpring
252
292
  :'parent_folder_id',
253
293
  :'encrypt_pdfs_password',
254
294
  :'redirect_url',
295
+ :'signature_request_email_attachments',
296
+ :'signature_request_from_address',
297
+ :'signature_request_from_name',
298
+ :'signature_request_reply_to',
299
+ :'signature_request_signing_url',
255
300
  :'slack_webhook_url',
256
301
  :'predefined_fields_sample_data',
257
302
  :'html',
@@ -259,6 +304,7 @@ module DocSpring
259
304
  :'header_html',
260
305
  :'footer_html',
261
306
  :'html_engine_options',
307
+ :'layout'
262
308
  ])
263
309
  end
264
310
 
@@ -390,6 +436,36 @@ module DocSpring
390
436
  self.redirect_url = attributes[:'redirect_url']
391
437
  end
392
438
 
439
+ if attributes.key?(:'signature_request_email_attachments')
440
+ self.signature_request_email_attachments = attributes[:'signature_request_email_attachments']
441
+ end
442
+
443
+ if attributes.key?(:'signature_request_from_address')
444
+ self.signature_request_from_address = attributes[:'signature_request_from_address']
445
+ end
446
+
447
+ if attributes.key?(:'signature_request_include_signing_token')
448
+ self.signature_request_include_signing_token = attributes[:'signature_request_include_signing_token']
449
+ end
450
+
451
+ if attributes.key?(:'signature_request_from_name')
452
+ self.signature_request_from_name = attributes[:'signature_request_from_name']
453
+ end
454
+
455
+ if attributes.key?(:'signature_request_notification_emails')
456
+ if (value = attributes[:'signature_request_notification_emails']).is_a?(Array)
457
+ self.signature_request_notification_emails = value
458
+ end
459
+ end
460
+
461
+ if attributes.key?(:'signature_request_reply_to')
462
+ self.signature_request_reply_to = attributes[:'signature_request_reply_to']
463
+ end
464
+
465
+ if attributes.key?(:'signature_request_signing_url')
466
+ self.signature_request_signing_url = attributes[:'signature_request_signing_url']
467
+ end
468
+
393
469
  if attributes.key?(:'slack_webhook_url')
394
470
  self.slack_webhook_url = attributes[:'slack_webhook_url']
395
471
  end
@@ -445,6 +521,12 @@ module DocSpring
445
521
  if attributes.key?(:'html_escape_data')
446
522
  self.html_escape_data = attributes[:'html_escape_data']
447
523
  end
524
+
525
+ if attributes.key?(:'layout')
526
+ if (value = attributes[:'layout']).is_a?(Hash) || value.nil?
527
+ self.layout = value
528
+ end
529
+ end
448
530
  end
449
531
 
450
532
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -462,6 +544,16 @@ module DocSpring
462
544
  true
463
545
  end
464
546
 
547
+ # Custom attribute writer method with validation
548
+ # @param [Object] signature_request_notification_emails Value to be assigned
549
+ def signature_request_notification_emails=(signature_request_notification_emails)
550
+ if signature_request_notification_emails.nil?
551
+ fail ArgumentError, 'signature_request_notification_emails cannot be nil'
552
+ end
553
+
554
+ @signature_request_notification_emails = signature_request_notification_emails
555
+ end
556
+
465
557
  # Checks equality by comparing each attribute.
466
558
  # @param [Object] Object to be compared
467
559
  def ==(o)
@@ -492,6 +584,13 @@ module DocSpring
492
584
  public_submissions == o.public_submissions &&
493
585
  public_web_form == o.public_web_form &&
494
586
  redirect_url == o.redirect_url &&
587
+ signature_request_email_attachments == o.signature_request_email_attachments &&
588
+ signature_request_from_address == o.signature_request_from_address &&
589
+ signature_request_include_signing_token == o.signature_request_include_signing_token &&
590
+ signature_request_from_name == o.signature_request_from_name &&
591
+ signature_request_notification_emails == o.signature_request_notification_emails &&
592
+ signature_request_reply_to == o.signature_request_reply_to &&
593
+ signature_request_signing_url == o.signature_request_signing_url &&
495
594
  slack_webhook_url == o.slack_webhook_url &&
496
595
  defaults == o.defaults &&
497
596
  field_dependencies == o.field_dependencies &&
@@ -503,7 +602,8 @@ module DocSpring
503
602
  header_html == o.header_html &&
504
603
  footer_html == o.footer_html &&
505
604
  html_engine_options == o.html_engine_options &&
506
- html_escape_data == o.html_escape_data
605
+ html_escape_data == o.html_escape_data &&
606
+ layout == o.layout
507
607
  end
508
608
 
509
609
  # @see the `==` method
@@ -515,7 +615,7 @@ module DocSpring
515
615
  # Calculates hash code according to all attributes.
516
616
  # @return [Integer] Hash code
517
617
  def hash
518
- [name, description, output_format, parent_folder_id, locked, 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, 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, slack_webhook_url, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data].hash
618
+ [name, description, output_format, parent_folder_id, locked, 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, 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, signature_request_email_attachments, signature_request_from_address, signature_request_include_signing_token, signature_request_from_name, signature_request_notification_emails, signature_request_reply_to, signature_request_signing_url, slack_webhook_url, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, layout].hash
519
619
  end
520
620
 
521
621
  # Builds the object from hash