docspring 4.6.0 → 4.8.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +25 -1
  4. data/lib/docspring/api/client.rb +1934 -209
  5. data/lib/docspring/api_client.rb +1 -1
  6. data/lib/docspring/models/add_page_numbers_request.rb +279 -0
  7. data/lib/docspring/models/ask_support_help_request.rb +217 -0
  8. data/lib/docspring/models/base64_job_source.rb +222 -0
  9. data/lib/docspring/models/combined_pdf_job_source.rb +222 -0
  10. data/lib/docspring/models/compress_pdf_request.rb +207 -0
  11. data/lib/docspring/models/create_template_request.rb +22 -2
  12. data/lib/docspring/models/custom_file_job_source.rb +222 -0
  13. data/lib/docspring/models/decrypt_pdf_request.rb +217 -0
  14. data/lib/docspring/models/encrypt_pdf_request.rb +237 -0
  15. data/lib/docspring/models/error_code.rb +4 -1
  16. data/lib/docspring/models/error_info.rb +25 -5
  17. data/lib/docspring/models/extract_pages_request.rb +234 -0
  18. data/lib/docspring/models/field.rb +1 -1
  19. data/lib/docspring/models/field_input.rb +1 -1
  20. data/lib/docspring/models/flatten_pdf_request.rb +207 -0
  21. data/lib/docspring/models/html_engine_options.rb +1 -1
  22. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  23. data/lib/docspring/models/htmlto_pdf_request.rb +322 -0
  24. data/lib/docspring/models/image_format.rb +41 -0
  25. data/lib/docspring/models/images_to_pdf_request.rb +241 -0
  26. data/lib/docspring/models/job.rb +508 -0
  27. data/lib/docspring/models/job_file.rb +308 -0
  28. data/lib/docspring/models/job_file_job_source.rb +232 -0
  29. data/lib/docspring/models/job_html_engine.rb +41 -0
  30. data/lib/docspring/models/job_list.rb +200 -0
  31. data/lib/docspring/models/job_operation.rb +53 -0
  32. data/lib/docspring/models/job_operation_filter.rb +53 -0
  33. data/lib/docspring/models/job_options.rb +392 -0
  34. data/lib/docspring/models/job_page_margin.rb +198 -0
  35. data/lib/docspring/models/job_page_size.rb +51 -0
  36. data/lib/docspring/models/job_source.rb +267 -0
  37. data/lib/docspring/models/job_source_input.rb +66 -0
  38. data/lib/docspring/models/job_source_type.rb +46 -0
  39. data/lib/docspring/models/job_state.rb +42 -0
  40. data/lib/docspring/models/markdown_to_pdf_request.rb +312 -0
  41. data/lib/docspring/models/open_support_ticket_request.rb +363 -0
  42. data/lib/docspring/models/page_image.rb +3 -3
  43. data/lib/docspring/models/page_number_position.rb +45 -0
  44. data/lib/docspring/models/page_size.rb +45 -0
  45. data/lib/docspring/models/pdf_permissions.rb +198 -0
  46. data/lib/docspring/models/pdf_permissions_input.rb +198 -0
  47. data/lib/docspring/models/pdfto_images_request.rb +269 -0
  48. data/lib/docspring/models/pdfto_text_request.rb +217 -0
  49. data/lib/docspring/models/reply_to_support_ticket_request.rb +217 -0
  50. data/lib/docspring/models/rotate_pages_request.rb +244 -0
  51. data/lib/docspring/models/send_support_feedback_request.rb +363 -0
  52. data/lib/docspring/models/split_pdf_request.rb +229 -0
  53. data/lib/docspring/models/submission_job_source.rb +222 -0
  54. data/lib/docspring/models/support_feedback.rb +239 -0
  55. data/lib/docspring/models/support_help.rb +316 -0
  56. data/lib/docspring/models/support_help_source.rb +212 -0
  57. data/lib/docspring/models/support_help_state.rb +42 -0
  58. data/lib/docspring/models/support_help_turn.rb +234 -0
  59. data/lib/docspring/models/support_help_turn_role.rb +41 -0
  60. data/lib/docspring/models/support_message.rb +301 -0
  61. data/lib/docspring/models/support_message_author.rb +42 -0
  62. data/lib/docspring/models/support_report_agent.rb +188 -0
  63. data/lib/docspring/models/support_report_category.rb +57 -0
  64. data/lib/docspring/models/support_report_impact.rb +42 -0
  65. data/lib/docspring/models/support_report_kind.rb +47 -0
  66. data/lib/docspring/models/support_report_source.rb +41 -0
  67. data/lib/docspring/models/support_ticket.rb +637 -0
  68. data/lib/docspring/models/support_ticket_list.rb +200 -0
  69. data/lib/docspring/models/support_ticket_list_status.rb +42 -0
  70. data/lib/docspring/models/support_ticket_notifications.rb +197 -0
  71. data/lib/docspring/models/support_ticket_reply.rb +210 -0
  72. data/lib/docspring/models/support_ticket_reply_outcome.rb +41 -0
  73. data/lib/docspring/models/support_ticket_resolution.rb +45 -0
  74. data/lib/docspring/models/support_ticket_status.rb +43 -0
  75. data/lib/docspring/models/support_ticket_watch.rb +239 -0
  76. data/lib/docspring/models/template.rb +41 -2
  77. data/lib/docspring/models/template_blank_page.rb +212 -0
  78. data/lib/docspring/models/template_blank_page_input.rb +212 -0
  79. data/lib/docspring/models/template_document.rb +1 -1
  80. data/lib/docspring/models/template_html_engine.rb +41 -0
  81. data/lib/docspring/models/template_page_images.rb +3 -3
  82. data/lib/docspring/models/template_page_list.rb +243 -0
  83. data/lib/docspring/models/template_page_list_input.rb +243 -0
  84. data/lib/docspring/models/template_page_processing_status.rb +28 -1
  85. data/lib/docspring/models/update_template_request.rb +33 -2
  86. data/lib/docspring/models/upload_job_source.rb +222 -0
  87. data/lib/docspring/models/url_job_source.rb +222 -0
  88. data/lib/docspring/models/watermark_layer.rb +41 -0
  89. data/lib/docspring/models/watermark_pdf_request.rb +316 -0
  90. data/lib/docspring/models/webhook_event_type.rb +4 -1
  91. data/lib/docspring/request_schemas.json +2424 -46
  92. data/lib/docspring/version.rb +1 -1
  93. data/lib/docspring.rb +71 -0
  94. metadata +72 -1
@@ -0,0 +1,45 @@
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
+ class SupportTicketResolution
18
+ FIXED = "fixed".freeze
19
+ ANSWERED = "answered".freeze
20
+ PLANNED = "planned".freeze
21
+ DUPLICATE = "duplicate".freeze
22
+ NOT_REPRODUCIBLE = "not_reproducible".freeze
23
+ WONT_FIX = "wont_fix".freeze
24
+
25
+ def self.all_vars
26
+ @all_vars ||= [FIXED, ANSWERED, PLANNED, DUPLICATE, NOT_REPRODUCIBLE, WONT_FIX].freeze
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
41
+ # is: the constants are the values this client knows
42
+ value
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,43 @@
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
+ class SupportTicketStatus
18
+ OPEN = "open".freeze
19
+ NEEDS_REPLY = "needs_reply".freeze
20
+ RESOLVED = "resolved".freeze
21
+ CLOSED = "closed".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [OPEN, NEEDS_REPLY, RESOLVED, CLOSED].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
39
+ # is: the constants are the values this client knows
40
+ value
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,239 @@
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
+ # How a script can wait for a support ticket to change.
18
+ class SupportTicketWatch < ApiModelBase
19
+ # The ticket's `watch_url`.
20
+ attr_accessor :url
21
+
22
+ # Poll no more often than this.
23
+ attr_accessor :min_interval_seconds
24
+
25
+ # What to do with the URL, in a sentence for an AI agent to act on.
26
+ attr_accessor :how
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'url' => :'url',
32
+ :'min_interval_seconds' => :'min_interval_seconds',
33
+ :'how' => :'how'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'url' => :'String',
51
+ :'min_interval_seconds' => :'Integer',
52
+ :'how' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Returns attribute type mapping
63
+ def self.acceptable_openapi_types
64
+ openapi_types
65
+ end
66
+
67
+ # Returns the nullable attributes
68
+ def self.acceptable_openapi_nullable
69
+ openapi_nullable
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SupportTicketWatch` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SupportTicketWatch`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'url')
89
+ self.url = attributes[:'url']
90
+ else
91
+ self.url = nil
92
+ end
93
+
94
+ if attributes.key?(:'min_interval_seconds')
95
+ self.min_interval_seconds = attributes[:'min_interval_seconds']
96
+ else
97
+ self.min_interval_seconds = nil
98
+ end
99
+
100
+ if attributes.key?(:'how')
101
+ self.how = attributes[:'how']
102
+ else
103
+ self.how = nil
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ if @url.nil?
113
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
114
+ end
115
+
116
+ if @min_interval_seconds.nil?
117
+ invalid_properties.push('invalid value for "min_interval_seconds", min_interval_seconds cannot be nil.')
118
+ end
119
+
120
+ if @how.nil?
121
+ invalid_properties.push('invalid value for "how", how cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @url.nil?
132
+ return false if @min_interval_seconds.nil?
133
+ return false if @how.nil?
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] url Value to be assigned
139
+ def url=(url)
140
+ if url.nil?
141
+ fail ArgumentError, 'url cannot be nil'
142
+ end
143
+
144
+ @url = url
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] min_interval_seconds Value to be assigned
149
+ def min_interval_seconds=(min_interval_seconds)
150
+ if min_interval_seconds.nil?
151
+ fail ArgumentError, 'min_interval_seconds cannot be nil'
152
+ end
153
+
154
+ @min_interval_seconds = min_interval_seconds
155
+ end
156
+
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] how Value to be assigned
159
+ def how=(how)
160
+ if how.nil?
161
+ fail ArgumentError, 'how cannot be nil'
162
+ end
163
+
164
+ @how = how
165
+ end
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] Object to be compared
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ url == o.url &&
173
+ min_interval_seconds == o.min_interval_seconds &&
174
+ how == o.how
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Integer] Hash code
185
+ def hash
186
+ [url, min_interval_seconds, how].hash
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def self.build_from_hash(attributes)
193
+ return nil unless attributes.is_a?(Hash)
194
+ attributes = attributes.transform_keys(&:to_sym)
195
+ # include attributes inherited from allOf parents (the nearest declaration wins)
196
+ map = acceptable_attribute_map
197
+ transformed_hash = {}
198
+ acceptable_openapi_types.each_pair do |key, type|
199
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
209
+ end
210
+ end
211
+ # Responses can include enum values added after this client was released, so the enum setters
212
+ # accept any value while the model is built from a response
213
+ allocate.tap do |model|
214
+ model.instance_variable_set(:@_skip_enum_validation, true)
215
+ model.send(:initialize, transformed_hash)
216
+ model.remove_instance_variable(:@_skip_enum_validation)
217
+ end
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ # include attributes inherited from allOf parents (the nearest declaration wins)
225
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -61,6 +61,9 @@ module DocSpring
61
61
  # When the template was last updated.
62
62
  attr_accessor :updated_at
63
63
 
64
+ # A PDF template's pages in the order its generated PDFs have them, when they've been reordered or deleted, or blank pages added (the Pages tab in the template editor). Null when generated PDFs have the PDF's pages in order, and for other templates. Setting it to null puts the PDF's pages back in order and removes the blank pages. Replacing the PDF resets it. Fields stay on their pages: a deleted page's fields are kept, and left out of the template's fields, its schema and generated PDFs until the page is back. A blank page with fields can be deleted (left out of `pages`), but not removed from `blank_pages`.
65
+ attr_accessor :page_list
66
+
64
67
  # The published version this is, such as `1.2.0`. Null for the draft.
65
68
  attr_accessor :version
66
69
 
@@ -204,9 +207,15 @@ module DocSpring
204
207
  # How an HTML template's PDFs are printed. Null for other templates. Setting it replaces the whole object: options left out use their defaults.
205
208
  attr_accessor :html_engine_options
206
209
 
207
- # 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.
210
+ # 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 (except Markdown templates), default to false, which prints every value as HTML. Null for other templates.
208
211
  attr_accessor :html_escape_data
209
212
 
213
+ # Whether an HTML template's `html` is Markdown: GitHub Flavored Markdown, which can also hold HTML. DocSpring renders its Liquid, then converts it to HTML, and values it prints are never read as Markdown. The header and footer HTML stay HTML. A Markdown template created without `scss` gets DocSpring's Markdown stylesheet. Defaults to false. Null for other templates.
214
+ attr_accessor :markdown
215
+
216
+ # What renders an HTML template's PDFs: `standard` (DocSpring's own renderer, much faster, and its previews follow your changes in the template editor) or `chromium` (headless Chrome, for JavaScript and the CSS that `standard` doesn't support). New HTML templates use your account's default for new templates of their kind, Markdown or not (`standard` unless your account chose `chromium`). Null for other templates.
217
+ attr_accessor :html_engine
218
+
210
219
  # 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.
211
220
  attr_accessor :layout
212
221
 
@@ -259,6 +268,7 @@ module DocSpring
259
268
  :'last_changed_at' => :'last_changed_at',
260
269
  :'created_at' => :'created_at',
261
270
  :'updated_at' => :'updated_at',
271
+ :'page_list' => :'page_list',
262
272
  :'version' => :'version',
263
273
  :'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
264
274
  :'ai_field_naming_language' => :'ai_field_naming_language',
@@ -308,6 +318,8 @@ module DocSpring
308
318
  :'footer_html' => :'footer_html',
309
319
  :'html_engine_options' => :'html_engine_options',
310
320
  :'html_escape_data' => :'html_escape_data',
321
+ :'markdown' => :'markdown',
322
+ :'html_engine' => :'html_engine',
311
323
  :'layout' => :'layout',
312
324
  :'embed_edit_token' => :'embed_edit_token',
313
325
  :'versions' => :'versions',
@@ -343,6 +355,7 @@ module DocSpring
343
355
  :'last_changed_at' => :'Time',
344
356
  :'created_at' => :'Time',
345
357
  :'updated_at' => :'Time',
358
+ :'page_list' => :'TemplatePageList',
346
359
  :'version' => :'String',
347
360
  :'add_signature_request_submission_id_footers' => :'Boolean',
348
361
  :'ai_field_naming_language' => :'AiFieldNamingLanguage',
@@ -392,6 +405,8 @@ module DocSpring
392
405
  :'footer_html' => :'String',
393
406
  :'html_engine_options' => :'HtmlEngineOptions',
394
407
  :'html_escape_data' => :'Boolean',
408
+ :'markdown' => :'Boolean',
409
+ :'html_engine' => :'TemplateHTMLEngine',
395
410
  :'layout' => :'Hash<String, Object>',
396
411
  :'embed_edit_token' => :'String',
397
412
  :'versions' => :'Array<TemplateVersion>',
@@ -409,6 +424,7 @@ module DocSpring
409
424
  :'latest_version',
410
425
  :'version_published_at',
411
426
  :'last_changed_at',
427
+ :'page_list',
412
428
  :'version',
413
429
  :'ai_field_naming_language',
414
430
  :'redirect_url',
@@ -427,6 +443,8 @@ module DocSpring
427
443
  :'footer_html',
428
444
  :'html_engine_options',
429
445
  :'html_escape_data',
446
+ :'markdown',
447
+ :'html_engine',
430
448
  :'layout',
431
449
  :'embed_edit_token',
432
450
  ])
@@ -548,6 +566,12 @@ module DocSpring
548
566
  self.updated_at = nil
549
567
  end
550
568
 
569
+ if attributes.key?(:'page_list')
570
+ self.page_list = attributes[:'page_list']
571
+ else
572
+ self.page_list = nil
573
+ end
574
+
551
575
  if attributes.key?(:'version')
552
576
  self.version = attributes[:'version']
553
577
  else
@@ -860,6 +884,18 @@ module DocSpring
860
884
  self.html_escape_data = nil
861
885
  end
862
886
 
887
+ if attributes.key?(:'markdown')
888
+ self.markdown = attributes[:'markdown']
889
+ else
890
+ self.markdown = nil
891
+ end
892
+
893
+ if attributes.key?(:'html_engine')
894
+ self.html_engine = attributes[:'html_engine']
895
+ else
896
+ self.html_engine = nil
897
+ end
898
+
863
899
  if attributes.key?(:'layout')
864
900
  if (value = attributes[:'layout']).is_a?(Hash) || value.nil?
865
901
  self.layout = value
@@ -1539,6 +1575,7 @@ module DocSpring
1539
1575
  last_changed_at == o.last_changed_at &&
1540
1576
  created_at == o.created_at &&
1541
1577
  updated_at == o.updated_at &&
1578
+ page_list == o.page_list &&
1542
1579
  version == o.version &&
1543
1580
  add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
1544
1581
  ai_field_naming_language == o.ai_field_naming_language &&
@@ -1588,6 +1625,8 @@ module DocSpring
1588
1625
  footer_html == o.footer_html &&
1589
1626
  html_engine_options == o.html_engine_options &&
1590
1627
  html_escape_data == o.html_escape_data &&
1628
+ markdown == o.markdown &&
1629
+ html_engine == o.html_engine &&
1591
1630
  layout == o.layout &&
1592
1631
  embed_edit_token == o.embed_edit_token &&
1593
1632
  versions == o.versions &&
@@ -1603,7 +1642,7 @@ module DocSpring
1603
1642
  # Calculates hash code according to all attributes.
1604
1643
  # @return [Integer] Hash code
1605
1644
  def hash
1606
- [id, name, description, template_type, output_format, 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, continue_before_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, 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, form_sections_in_order, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, form_sections, signer_roles, signature_request_cc, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, layout, embed_edit_token, versions, override_account_expiry].hash
1645
+ [id, name, description, template_type, output_format, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, page_list, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, continue_before_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, 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, form_sections_in_order, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, form_sections, signer_roles, signature_request_cc, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, markdown, html_engine, layout, embed_edit_token, versions, override_account_expiry].hash
1607
1646
  end
1608
1647
 
1609
1648
  # Builds the object from hash
@@ -0,0 +1,212 @@
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 blank page added to a PDF template.
18
+ class TemplateBlankPage < ApiModelBase
19
+ # The page's width in PDF points.
20
+ attr_accessor :width
21
+
22
+ # The page's height in PDF points.
23
+ attr_accessor :height
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'width' => :'width',
29
+ :'height' => :'height'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'width' => :'Float',
47
+ :'height' => :'Float'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Returns attribute type mapping
58
+ def self.acceptable_openapi_types
59
+ openapi_types
60
+ end
61
+
62
+ # Returns the nullable attributes
63
+ def self.acceptable_openapi_nullable
64
+ openapi_nullable
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::TemplateBlankPage` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::TemplateBlankPage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'width')
84
+ self.width = attributes[:'width']
85
+ else
86
+ self.width = nil
87
+ end
88
+
89
+ if attributes.key?(:'height')
90
+ self.height = attributes[:'height']
91
+ else
92
+ self.height = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @width.nil?
102
+ invalid_properties.push('invalid value for "width", width cannot be nil.')
103
+ end
104
+
105
+ if @height.nil?
106
+ invalid_properties.push('invalid value for "height", height cannot be nil.')
107
+ end
108
+
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ return false if @width.nil?
117
+ return false if @height.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] width Value to be assigned
123
+ def width=(width)
124
+ if width.nil?
125
+ fail ArgumentError, 'width cannot be nil'
126
+ end
127
+
128
+ @width = width
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] height Value to be assigned
133
+ def height=(height)
134
+ if height.nil?
135
+ fail ArgumentError, 'height cannot be nil'
136
+ end
137
+
138
+ @height = height
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ width == o.width &&
147
+ height == o.height
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [width, height].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ # include attributes inherited from allOf parents (the nearest declaration wins)
169
+ map = acceptable_attribute_map
170
+ transformed_hash = {}
171
+ acceptable_openapi_types.each_pair do |key, type|
172
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
182
+ end
183
+ end
184
+ # Responses can include enum values added after this client was released, so the enum setters
185
+ # accept any value while the model is built from a response
186
+ allocate.tap do |model|
187
+ model.instance_variable_set(:@_skip_enum_validation, true)
188
+ model.send(:initialize, transformed_hash)
189
+ model.remove_instance_variable(:@_skip_enum_validation)
190
+ end
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ # include attributes inherited from allOf parents (the nearest declaration wins)
198
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ end
211
+
212
+ end