docspring 4.4.0 → 4.5.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +6 -0
  3. data/AGENTS.md +2 -0
  4. data/CHANGELOG.md +15 -0
  5. data/Gemfile.lock +10 -10
  6. data/LICENSE +1 -1
  7. data/README.md +4 -1
  8. data/docs/Client.md +98 -96
  9. data/docs/CreateSubmissionRequest.md +3 -3
  10. data/docs/CreateTemplateRequest.md +11 -3
  11. data/docs/ErrorInfo.md +7 -3
  12. data/docs/HtmlEngineOptions.md +4 -4
  13. data/docs/HtmlEngineOptionsInput.md +4 -4
  14. data/docs/SubmissionInput.md +1 -1
  15. data/docs/Template.md +10 -2
  16. data/docs/TemplateFormSection.md +24 -0
  17. data/docs/TemplateFormSectionInput.md +24 -0
  18. data/docs/UpdateTemplateRequest.md +10 -2
  19. data/docs/ValidateSubmissionRequest.md +3 -3
  20. data/lib/docspring/api/client.rb +99 -96
  21. data/lib/docspring/api_client.rb +1 -1
  22. data/lib/docspring/models/create_submission_request.rb +3 -3
  23. data/lib/docspring/models/create_template_request.rb +48 -6
  24. data/lib/docspring/models/error_info.rb +26 -6
  25. data/lib/docspring/models/html_engine_options.rb +4 -4
  26. data/lib/docspring/models/html_engine_options_input.rb +4 -4
  27. data/lib/docspring/models/submission_input.rb +1 -1
  28. data/lib/docspring/models/template.rb +85 -3
  29. data/lib/docspring/models/template_form_section.rb +254 -0
  30. data/lib/docspring/models/template_form_section_input.rb +252 -0
  31. data/lib/docspring/models/update_template_request.rb +47 -3
  32. data/lib/docspring/models/validate_submission_request.rb +3 -3
  33. data/lib/docspring/request_schemas.json +84 -10
  34. data/lib/docspring/version.rb +1 -1
  35. data/lib/docspring.rb +2 -0
  36. data/spec/api/client_spec.rb +49 -48
  37. data/spec/models/create_template_request_spec.rb +24 -0
  38. data/spec/models/error_info_spec.rb +12 -0
  39. data/spec/models/template_form_section_input_spec.rb +54 -0
  40. data/spec/models/template_form_section_spec.rb +54 -0
  41. data/spec/models/template_spec.rb +24 -0
  42. data/spec/models/update_template_request_spec.rb +24 -0
  43. metadata +9 -1
@@ -0,0 +1,254 @@
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
+ # A section of the template's web form, with its fields in order.
18
+ class TemplateFormSection < ApiModelBase
19
+ # The section's ID, unique among the template's sections. Any string you choose.
20
+ attr_accessor :id
21
+
22
+ # The section's heading on the web form.
23
+ attr_accessor :title
24
+
25
+ # Text shown under the section's heading. Null for none.
26
+ attr_accessor :description
27
+
28
+ # The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
29
+ attr_accessor :field_ids
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'id' => :'id',
35
+ :'title' => :'title',
36
+ :'description' => :'description',
37
+ :'field_ids' => :'field_ids'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id' => :'String',
55
+ :'title' => :'String',
56
+ :'description' => :'String',
57
+ :'field_ids' => :'Array<Integer>'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'description',
65
+ ])
66
+ end
67
+
68
+ # Returns attribute type mapping
69
+ def self.acceptable_openapi_types
70
+ openapi_types
71
+ end
72
+
73
+ # Returns the nullable attributes
74
+ def self.acceptable_openapi_nullable
75
+ openapi_nullable
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateFormSection` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateFormSection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ else
97
+ self.id = nil
98
+ end
99
+
100
+ if attributes.key?(:'title')
101
+ self.title = attributes[:'title']
102
+ else
103
+ self.title = nil
104
+ end
105
+
106
+ if attributes.key?(:'description')
107
+ self.description = attributes[:'description']
108
+ else
109
+ self.description = nil
110
+ end
111
+
112
+ if attributes.key?(:'field_ids')
113
+ if (value = attributes[:'field_ids']).is_a?(Array)
114
+ self.field_ids = value
115
+ end
116
+ else
117
+ self.field_ids = nil
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
+ invalid_properties = Array.new
126
+ if @id.nil?
127
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
128
+ end
129
+
130
+ if @title.nil?
131
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
132
+ end
133
+
134
+ if @field_ids.nil?
135
+ invalid_properties.push('invalid value for "field_ids", field_ids cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ warn '[DEPRECATED] the `valid?` method is obsolete'
145
+ return false if @id.nil?
146
+ return false if @title.nil?
147
+ return false if @field_ids.nil?
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] id Value to be assigned
153
+ def id=(id)
154
+ if id.nil?
155
+ fail ArgumentError, 'id cannot be nil'
156
+ end
157
+
158
+ @id = id
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] title Value to be assigned
163
+ def title=(title)
164
+ if title.nil?
165
+ fail ArgumentError, 'title cannot be nil'
166
+ end
167
+
168
+ @title = title
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] field_ids Value to be assigned
173
+ def field_ids=(field_ids)
174
+ if field_ids.nil?
175
+ fail ArgumentError, 'field_ids cannot be nil'
176
+ end
177
+
178
+ @field_ids = field_ids
179
+ end
180
+
181
+ # Checks equality by comparing each attribute.
182
+ # @param [Object] Object to be compared
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ id == o.id &&
187
+ title == o.title &&
188
+ description == o.description &&
189
+ field_ids == o.field_ids
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Integer] Hash code
200
+ def hash
201
+ [id, title, description, field_ids].hash
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def self.build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ attributes = attributes.transform_keys(&:to_sym)
210
+ # include attributes inherited from allOf parents (the nearest declaration wins)
211
+ map = acceptable_attribute_map
212
+ transformed_hash = {}
213
+ acceptable_openapi_types.each_pair do |key, type|
214
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
221
+ end
222
+ elsif !attributes[map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
224
+ end
225
+ end
226
+ # Responses can include enum values added after this client was released, so the enum setters
227
+ # accept any value while the model is built from a response
228
+ allocate.tap do |model|
229
+ model.instance_variable_set(:@_skip_enum_validation, true)
230
+ model.send(:initialize, transformed_hash)
231
+ model.remove_instance_variable(:@_skip_enum_validation)
232
+ end
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ # include attributes inherited from allOf parents (the nearest declaration wins)
240
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
241
+ value = self.send(attr)
242
+ if value.nil?
243
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
244
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
245
+ end
246
+
247
+ hash[param] = _to_hash(value)
248
+ end
249
+ hash
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -0,0 +1,252 @@
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
+ # A section of the template's web form, with its fields in order.
18
+ class TemplateFormSectionInput < ApiModelBase
19
+ # The section's ID, unique among the template's sections. Any string you choose.
20
+ attr_accessor :id
21
+
22
+ # The section's heading on the web form.
23
+ attr_accessor :title
24
+
25
+ # Text shown under the section's heading. Null for none.
26
+ attr_accessor :description
27
+
28
+ # The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
29
+ attr_accessor :field_ids
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'id' => :'id',
35
+ :'title' => :'title',
36
+ :'description' => :'description',
37
+ :'field_ids' => :'field_ids'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id' => :'String',
55
+ :'title' => :'String',
56
+ :'description' => :'String',
57
+ :'field_ids' => :'Array<Integer>'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'description',
65
+ ])
66
+ end
67
+
68
+ # Returns attribute type mapping
69
+ def self.acceptable_openapi_types
70
+ openapi_types
71
+ end
72
+
73
+ # Returns the nullable attributes
74
+ def self.acceptable_openapi_nullable
75
+ openapi_nullable
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateFormSectionInput` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateFormSectionInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ else
97
+ self.id = nil
98
+ end
99
+
100
+ if attributes.key?(:'title')
101
+ self.title = attributes[:'title']
102
+ else
103
+ self.title = nil
104
+ end
105
+
106
+ if attributes.key?(:'description')
107
+ self.description = attributes[:'description']
108
+ end
109
+
110
+ if attributes.key?(:'field_ids')
111
+ if (value = attributes[:'field_ids']).is_a?(Array)
112
+ self.field_ids = value
113
+ end
114
+ else
115
+ self.field_ids = nil
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ if @id.nil?
125
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
126
+ end
127
+
128
+ if @title.nil?
129
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
130
+ end
131
+
132
+ if @field_ids.nil?
133
+ invalid_properties.push('invalid value for "field_ids", field_ids cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if @id.nil?
144
+ return false if @title.nil?
145
+ return false if @field_ids.nil?
146
+ true
147
+ end
148
+
149
+ # Custom attribute writer method with validation
150
+ # @param [Object] id Value to be assigned
151
+ def id=(id)
152
+ if id.nil?
153
+ fail ArgumentError, 'id cannot be nil'
154
+ end
155
+
156
+ @id = id
157
+ end
158
+
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] title Value to be assigned
161
+ def title=(title)
162
+ if title.nil?
163
+ fail ArgumentError, 'title cannot be nil'
164
+ end
165
+
166
+ @title = title
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] field_ids Value to be assigned
171
+ def field_ids=(field_ids)
172
+ if field_ids.nil?
173
+ fail ArgumentError, 'field_ids cannot be nil'
174
+ end
175
+
176
+ @field_ids = field_ids
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ id == o.id &&
185
+ title == o.title &&
186
+ description == o.description &&
187
+ field_ids == o.field_ids
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [id, title, description, field_ids].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ # include attributes inherited from allOf parents (the nearest declaration wins)
209
+ map = acceptable_attribute_map
210
+ transformed_hash = {}
211
+ acceptable_openapi_types.each_pair do |key, type|
212
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
213
+ transformed_hash["#{key}"] = nil
214
+ elsif type =~ /\AArray<(.*)>/i
215
+ # check to ensure the input is an array given that the attribute
216
+ # is documented as an array but the input is not
217
+ if attributes[map[key]].is_a?(Array)
218
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
219
+ end
220
+ elsif !attributes[map[key]].nil?
221
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
222
+ end
223
+ end
224
+ # Responses can include enum values added after this client was released, so the enum setters
225
+ # accept any value while the model is built from a response
226
+ allocate.tap do |model|
227
+ model.instance_variable_set(:@_skip_enum_validation, true)
228
+ model.send(:initialize, transformed_hash)
229
+ model.remove_instance_variable(:@_skip_enum_validation)
230
+ end
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ # include attributes inherited from allOf parents (the nearest declaration wins)
238
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -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), 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.
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. Each one is stored in lowercase, without a trailing slash. 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 Web Forms JS) 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).
@@ -88,7 +88,7 @@ module DocSpring
88
88
  # Allow anyone to fill in the template's web form.
89
89
  attr_accessor :public_web_form
90
90
 
91
- # Where the web form sends people after they submit it.
91
+ # Where the web form sends people after they submit it, instead of showing its success screen. After its `?` or `#`, it can have variables such as `{{ data.first_name }}`, which the form fills in with what they submitted.
92
92
  attr_accessor :redirect_url
93
93
 
94
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.
@@ -112,6 +112,15 @@ module DocSpring
112
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
113
  attr_accessor :signature_request_signing_url
114
114
 
115
+ # The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as `{{ data.first_name }}`.
116
+ attr_accessor :success_title
117
+
118
+ # A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as `{{ data.first_name }}`.
119
+ attr_accessor :success_message
120
+
121
+ # Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again.
122
+ attr_accessor :show_fill_again_button
123
+
115
124
  # 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.
116
125
  attr_accessor :slack_webhook_url
117
126
 
@@ -124,6 +133,9 @@ module DocSpring
124
133
  # Changes to the settings of the template's field groups, each with the `name` of the group it changes. Settings left out keep their values, and groups left out are unchanged.
125
134
  attr_accessor :field_groups
126
135
 
136
+ # The web form's sections, in order. Setting them replaces all of the sections; an empty list removes them.
137
+ attr_accessor :form_sections
138
+
127
139
  # 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.
128
140
  attr_accessor :predefined_fields
129
141
 
@@ -208,10 +220,14 @@ module DocSpring
208
220
  :'signature_request_notification_emails' => :'signature_request_notification_emails',
209
221
  :'signature_request_reply_to' => :'signature_request_reply_to',
210
222
  :'signature_request_signing_url' => :'signature_request_signing_url',
223
+ :'success_title' => :'success_title',
224
+ :'success_message' => :'success_message',
225
+ :'show_fill_again_button' => :'show_fill_again_button',
211
226
  :'slack_webhook_url' => :'slack_webhook_url',
212
227
  :'defaults' => :'defaults',
213
228
  :'field_dependencies' => :'field_dependencies',
214
229
  :'field_groups' => :'field_groups',
230
+ :'form_sections' => :'form_sections',
215
231
  :'predefined_fields' => :'predefined_fields',
216
232
  :'predefined_fields_sample_data' => :'predefined_fields_sample_data',
217
233
  :'html' => :'html',
@@ -269,10 +285,14 @@ module DocSpring
269
285
  :'signature_request_notification_emails' => :'Array<String>',
270
286
  :'signature_request_reply_to' => :'String',
271
287
  :'signature_request_signing_url' => :'String',
288
+ :'success_title' => :'String',
289
+ :'success_message' => :'String',
290
+ :'show_fill_again_button' => :'Boolean',
272
291
  :'slack_webhook_url' => :'String',
273
292
  :'defaults' => :'TemplateDefaultsInput',
274
293
  :'field_dependencies' => :'Array<TemplateFieldDependencyInput>',
275
294
  :'field_groups' => :'Array<FieldGroupInput>',
295
+ :'form_sections' => :'Array<TemplateFormSectionInput>',
276
296
  :'predefined_fields' => :'Array<PredefinedFieldInput>',
277
297
  :'predefined_fields_sample_data' => :'Hash<String, Object>',
278
298
  :'html' => :'String',
@@ -297,6 +317,8 @@ module DocSpring
297
317
  :'signature_request_from_name',
298
318
  :'signature_request_reply_to',
299
319
  :'signature_request_signing_url',
320
+ :'success_title',
321
+ :'success_message',
300
322
  :'slack_webhook_url',
301
323
  :'predefined_fields_sample_data',
302
324
  :'html',
@@ -466,6 +488,18 @@ module DocSpring
466
488
  self.signature_request_signing_url = attributes[:'signature_request_signing_url']
467
489
  end
468
490
 
491
+ if attributes.key?(:'success_title')
492
+ self.success_title = attributes[:'success_title']
493
+ end
494
+
495
+ if attributes.key?(:'success_message')
496
+ self.success_message = attributes[:'success_message']
497
+ end
498
+
499
+ if attributes.key?(:'show_fill_again_button')
500
+ self.show_fill_again_button = attributes[:'show_fill_again_button']
501
+ end
502
+
469
503
  if attributes.key?(:'slack_webhook_url')
470
504
  self.slack_webhook_url = attributes[:'slack_webhook_url']
471
505
  end
@@ -486,6 +520,12 @@ module DocSpring
486
520
  end
487
521
  end
488
522
 
523
+ if attributes.key?(:'form_sections')
524
+ if (value = attributes[:'form_sections']).is_a?(Array)
525
+ self.form_sections = value
526
+ end
527
+ end
528
+
489
529
  if attributes.key?(:'predefined_fields')
490
530
  if (value = attributes[:'predefined_fields']).is_a?(Array)
491
531
  self.predefined_fields = value
@@ -591,10 +631,14 @@ module DocSpring
591
631
  signature_request_notification_emails == o.signature_request_notification_emails &&
592
632
  signature_request_reply_to == o.signature_request_reply_to &&
593
633
  signature_request_signing_url == o.signature_request_signing_url &&
634
+ success_title == o.success_title &&
635
+ success_message == o.success_message &&
636
+ show_fill_again_button == o.show_fill_again_button &&
594
637
  slack_webhook_url == o.slack_webhook_url &&
595
638
  defaults == o.defaults &&
596
639
  field_dependencies == o.field_dependencies &&
597
640
  field_groups == o.field_groups &&
641
+ form_sections == o.form_sections &&
598
642
  predefined_fields == o.predefined_fields &&
599
643
  predefined_fields_sample_data == o.predefined_fields_sample_data &&
600
644
  html == o.html &&
@@ -615,7 +659,7 @@ module DocSpring
615
659
  # Calculates hash code according to all attributes.
616
660
  # @return [Integer] Hash code
617
661
  def 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
662
+ [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, success_title, success_message, show_fill_again_button, slack_webhook_url, defaults, field_dependencies, field_groups, form_sections, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, layout].hash
619
663
  end
620
664
 
621
665
  # Builds the object from hash
@@ -22,7 +22,7 @@ module DocSpring
22
22
  # `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
23
23
  attr_accessor :editable
24
24
 
25
- # The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only).
25
+ # The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). Signatures come only from signature requests: a value for a signature or initials field makes the submission `invalid_data`, in test mode too. To print an image or a name you send, use an Image or Text field.
26
26
  attr_accessor :data
27
27
 
28
28
  # Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`).
@@ -37,7 +37,7 @@ module DocSpring
37
37
  # Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default.
38
38
  attr_accessor :expires_in
39
39
 
40
- # Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`.
40
+ # Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422.
41
41
  attr_accessor :field_overrides
42
42
 
43
43
  # For an HTML template, HTML to use instead of the template's.
@@ -46,7 +46,7 @@ module DocSpring
46
46
  # For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity.
47
47
  attr_accessor :css
48
48
 
49
- # The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. Only the signers sign: a value for a signature or initials field in `data` makes the submission `invalid_data`.
49
+ # The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out.
50
50
  attr_accessor :signature_requests
51
51
 
52
52
  # Whether DocSpring emails the signers their signing links, and sends the reminders and the completed document. Default true. Each signature request's own `send_email` overrides it. A test submission only emails your DocSpring team: every other address is a 422. `true` needs `signature_requests`. DocSpring doesn't email the signers of a form library template: leave `send_email` out, and send them their links yourself.