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,243 @@
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 pages of a PDF template's generated PDFs, in order.
18
+ class TemplatePageListInput < ApiModelBase
19
+ # The number of pages in the template's PDF (`document.page_count`). A list made for a PDF with another page count is refused.
20
+ attr_accessor :source_pages
21
+
22
+ # The pages generated PDFs have, in order, each listed at most once: `1` to `source_pages` are the PDF's pages, and the numbers after them are the `blank_pages`, in that list's order. A page left out is deleted.
23
+ attr_accessor :pages
24
+
25
+ # The blank pages added to the template, each numbered in `pages` after the PDF's pages. Blank pages left out of `pages` are deleted, and keep their fields.
26
+ attr_accessor :blank_pages
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'source_pages' => :'source_pages',
32
+ :'pages' => :'pages',
33
+ :'blank_pages' => :'blank_pages'
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
+ :'source_pages' => :'Integer',
51
+ :'pages' => :'Array<Integer>',
52
+ :'blank_pages' => :'Array<TemplateBlankPageInput>'
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::TemplatePageListInput` 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::TemplatePageListInput`. 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?(:'source_pages')
89
+ self.source_pages = attributes[:'source_pages']
90
+ else
91
+ self.source_pages = nil
92
+ end
93
+
94
+ if attributes.key?(:'pages')
95
+ if (value = attributes[:'pages']).is_a?(Array)
96
+ self.pages = value
97
+ end
98
+ else
99
+ self.pages = nil
100
+ end
101
+
102
+ if attributes.key?(:'blank_pages')
103
+ if (value = attributes[:'blank_pages']).is_a?(Array)
104
+ self.blank_pages = value
105
+ end
106
+ else
107
+ self.blank_pages = nil
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ if @source_pages.nil?
117
+ invalid_properties.push('invalid value for "source_pages", source_pages cannot be nil.')
118
+ end
119
+
120
+ if @pages.nil?
121
+ invalid_properties.push('invalid value for "pages", pages cannot be nil.')
122
+ end
123
+
124
+ if @blank_pages.nil?
125
+ invalid_properties.push('invalid value for "blank_pages", blank_pages cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ return false if @source_pages.nil?
136
+ return false if @pages.nil?
137
+ return false if @blank_pages.nil?
138
+ true
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] source_pages Value to be assigned
143
+ def source_pages=(source_pages)
144
+ if source_pages.nil?
145
+ fail ArgumentError, 'source_pages cannot be nil'
146
+ end
147
+
148
+ @source_pages = source_pages
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] pages Value to be assigned
153
+ def pages=(pages)
154
+ if pages.nil?
155
+ fail ArgumentError, 'pages cannot be nil'
156
+ end
157
+
158
+ @pages = pages
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] blank_pages Value to be assigned
163
+ def blank_pages=(blank_pages)
164
+ if blank_pages.nil?
165
+ fail ArgumentError, 'blank_pages cannot be nil'
166
+ end
167
+
168
+ @blank_pages = blank_pages
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ source_pages == o.source_pages &&
177
+ pages == o.pages &&
178
+ blank_pages == o.blank_pages
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [source_pages, pages, blank_pages].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
199
+ # include attributes inherited from allOf parents (the nearest declaration wins)
200
+ map = acceptable_attribute_map
201
+ transformed_hash = {}
202
+ acceptable_openapi_types.each_pair do |key, type|
203
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
204
+ transformed_hash["#{key}"] = nil
205
+ elsif type =~ /\AArray<(.*)>/i
206
+ # check to ensure the input is an array given that the attribute
207
+ # is documented as an array but the input is not
208
+ if attributes[map[key]].is_a?(Array)
209
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
210
+ end
211
+ elsif !attributes[map[key]].nil?
212
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
213
+ end
214
+ end
215
+ # Responses can include enum values added after this client was released, so the enum setters
216
+ # accept any value while the model is built from a response
217
+ allocate.tap do |model|
218
+ model.instance_variable_set(:@_skip_enum_validation, true)
219
+ model.send(:initialize, transformed_hash)
220
+ model.remove_instance_variable(:@_skip_enum_validation)
221
+ end
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ # include attributes inherited from allOf parents (the nearest declaration wins)
229
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ end
@@ -28,6 +28,9 @@ module DocSpring
28
28
  # Why AI naming failed or was skipped: `unavailable` (the AI service was unavailable: set up the fields again later), `error`, `credits` (the account had no free AI pages or credits left) or `skipped` (someone skipped AI setup in the template editor). Null when `ai_naming` is.
29
29
  attr_accessor :ai_error
30
30
 
31
+ # True when `ai_error` is `credits` only because today's pool of free AI pages, which free accounts share, ran short: the account still has free AI pages this month, and setting up the fields again after midnight UTC names them. False otherwise.
32
+ attr_accessor :ai_daily_pool
33
+
31
34
  # While AI names the page's fields, the boxes field detection found: `[x, y, width, height]` in PDF points from the page's top-left corner. Null otherwise.
32
35
  attr_accessor :detected_boxes
33
36
 
@@ -60,6 +63,7 @@ module DocSpring
60
63
  :'fields' => :'fields',
61
64
  :'ai_naming' => :'ai_naming',
62
65
  :'ai_error' => :'ai_error',
66
+ :'ai_daily_pool' => :'ai_daily_pool',
63
67
  :'detected_boxes' => :'detected_boxes'
64
68
  }
65
69
  end
@@ -81,6 +85,7 @@ module DocSpring
81
85
  :'fields' => :'TemplatePageFieldsStatus',
82
86
  :'ai_naming' => :'TemplatePageAiNamingStatus',
83
87
  :'ai_error' => :'TemplatePageAiError',
88
+ :'ai_daily_pool' => :'Boolean',
84
89
  :'detected_boxes' => :'Array<Array<Float>>'
85
90
  }
86
91
  end
@@ -144,6 +149,12 @@ module DocSpring
144
149
  self.ai_error = nil
145
150
  end
146
151
 
152
+ if attributes.key?(:'ai_daily_pool')
153
+ self.ai_daily_pool = attributes[:'ai_daily_pool']
154
+ else
155
+ self.ai_daily_pool = nil
156
+ end
157
+
147
158
  if attributes.key?(:'detected_boxes')
148
159
  if (value = attributes[:'detected_boxes']).is_a?(Array) || value.nil?
149
160
  self.detected_boxes = value
@@ -166,6 +177,10 @@ module DocSpring
166
177
  invalid_properties.push('invalid value for "fields", fields cannot be nil.')
167
178
  end
168
179
 
180
+ if @ai_daily_pool.nil?
181
+ invalid_properties.push('invalid value for "ai_daily_pool", ai_daily_pool cannot be nil.')
182
+ end
183
+
169
184
  invalid_properties
170
185
  end
171
186
 
@@ -175,6 +190,7 @@ module DocSpring
175
190
  warn '[DEPRECATED] the `valid?` method is obsolete'
176
191
  return false if @image.nil?
177
192
  return false if @fields.nil?
193
+ return false if @ai_daily_pool.nil?
178
194
  true
179
195
  end
180
196
 
@@ -198,6 +214,16 @@ module DocSpring
198
214
  @fields = fields
199
215
  end
200
216
 
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] ai_daily_pool Value to be assigned
219
+ def ai_daily_pool=(ai_daily_pool)
220
+ if ai_daily_pool.nil?
221
+ fail ArgumentError, 'ai_daily_pool cannot be nil'
222
+ end
223
+
224
+ @ai_daily_pool = ai_daily_pool
225
+ end
226
+
201
227
  # Checks equality by comparing each attribute.
202
228
  # @param [Object] Object to be compared
203
229
  def ==(o)
@@ -207,6 +233,7 @@ module DocSpring
207
233
  fields == o.fields &&
208
234
  ai_naming == o.ai_naming &&
209
235
  ai_error == o.ai_error &&
236
+ ai_daily_pool == o.ai_daily_pool &&
210
237
  detected_boxes == o.detected_boxes
211
238
  end
212
239
 
@@ -219,7 +246,7 @@ module DocSpring
219
246
  # Calculates hash code according to all attributes.
220
247
  # @return [Integer] Hash code
221
248
  def hash
222
- [image, fields, ai_naming, ai_error, detected_boxes].hash
249
+ [image, fields, ai_naming, ai_error, ai_daily_pool, detected_boxes].hash
223
250
  end
224
251
 
225
252
  # Builds the object from hash
@@ -31,6 +31,9 @@ module DocSpring
31
31
  # A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
32
32
  attr_accessor :locked
33
33
 
34
+ # 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`.
35
+ attr_accessor :page_list
36
+
34
37
  # Print the submission ID in the footer of each page of PDFs signed through signature requests.
35
38
  attr_accessor :add_signature_request_submission_id_footers
36
39
 
@@ -169,9 +172,15 @@ module DocSpring
169
172
  # Null resets the options to their defaults.
170
173
  attr_accessor :html_engine_options
171
174
 
172
- # 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.
175
+ # 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.
173
176
  attr_accessor :html_escape_data
174
177
 
178
+ # 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.
179
+ attr_accessor :markdown
180
+
181
+ # 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.
182
+ attr_accessor :html_engine
183
+
175
184
  # 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.
176
185
  attr_accessor :layout
177
186
 
@@ -211,6 +220,7 @@ module DocSpring
211
220
  :'output_format' => :'output_format',
212
221
  :'parent_folder_id' => :'parent_folder_id',
213
222
  :'locked' => :'locked',
223
+ :'page_list' => :'page_list',
214
224
  :'add_signature_request_submission_id_footers' => :'add_signature_request_submission_id_footers',
215
225
  :'ai_field_naming_language' => :'ai_field_naming_language',
216
226
  :'allow_additional_properties' => :'allow_additional_properties',
@@ -258,6 +268,8 @@ module DocSpring
258
268
  :'footer_html' => :'footer_html',
259
269
  :'html_engine_options' => :'html_engine_options',
260
270
  :'html_escape_data' => :'html_escape_data',
271
+ :'markdown' => :'markdown',
272
+ :'html_engine' => :'html_engine',
261
273
  :'layout' => :'layout',
262
274
  :'override_account_expiry' => :'override_account_expiry',
263
275
  :'sync_fields' => :'sync_fields'
@@ -282,6 +294,7 @@ module DocSpring
282
294
  :'output_format' => :'OutputFormat',
283
295
  :'parent_folder_id' => :'String',
284
296
  :'locked' => :'Boolean',
297
+ :'page_list' => :'TemplatePageListInput',
285
298
  :'add_signature_request_submission_id_footers' => :'Boolean',
286
299
  :'ai_field_naming_language' => :'AiFieldNamingLanguage',
287
300
  :'allow_additional_properties' => :'Boolean',
@@ -329,6 +342,8 @@ module DocSpring
329
342
  :'footer_html' => :'String',
330
343
  :'html_engine_options' => :'HtmlEngineOptionsInput',
331
344
  :'html_escape_data' => :'Boolean',
345
+ :'markdown' => :'Boolean',
346
+ :'html_engine' => :'TemplateHTMLEngine',
332
347
  :'layout' => :'Hash<String, Object>',
333
348
  :'override_account_expiry' => :'Boolean',
334
349
  :'sync_fields' => :'Boolean'
@@ -340,6 +355,7 @@ module DocSpring
340
355
  Set.new([
341
356
  :'description',
342
357
  :'parent_folder_id',
358
+ :'page_list',
343
359
  :'encrypt_pdfs_password',
344
360
  :'redirect_url',
345
361
  :'signature_request_email_attachments',
@@ -406,6 +422,10 @@ module DocSpring
406
422
  self.locked = attributes[:'locked']
407
423
  end
408
424
 
425
+ if attributes.key?(:'page_list')
426
+ self.page_list = attributes[:'page_list']
427
+ end
428
+
409
429
  if attributes.key?(:'add_signature_request_submission_id_footers')
410
430
  self.add_signature_request_submission_id_footers = attributes[:'add_signature_request_submission_id_footers']
411
431
  end
@@ -612,6 +632,14 @@ module DocSpring
612
632
  self.html_escape_data = attributes[:'html_escape_data']
613
633
  end
614
634
 
635
+ if attributes.key?(:'markdown')
636
+ self.markdown = attributes[:'markdown']
637
+ end
638
+
639
+ if attributes.key?(:'html_engine')
640
+ self.html_engine = attributes[:'html_engine']
641
+ end
642
+
615
643
  if attributes.key?(:'layout')
616
644
  if (value = attributes[:'layout']).is_a?(Hash) || value.nil?
617
645
  self.layout = value
@@ -662,6 +690,7 @@ module DocSpring
662
690
  output_format == o.output_format &&
663
691
  parent_folder_id == o.parent_folder_id &&
664
692
  locked == o.locked &&
693
+ page_list == o.page_list &&
665
694
  add_signature_request_submission_id_footers == o.add_signature_request_submission_id_footers &&
666
695
  ai_field_naming_language == o.ai_field_naming_language &&
667
696
  allow_additional_properties == o.allow_additional_properties &&
@@ -709,6 +738,8 @@ module DocSpring
709
738
  footer_html == o.footer_html &&
710
739
  html_engine_options == o.html_engine_options &&
711
740
  html_escape_data == o.html_escape_data &&
741
+ markdown == o.markdown &&
742
+ html_engine == o.html_engine &&
712
743
  layout == o.layout &&
713
744
  override_account_expiry == o.override_account_expiry &&
714
745
  sync_fields == o.sync_fields
@@ -723,7 +754,7 @@ module DocSpring
723
754
  # Calculates hash code according to all attributes.
724
755
  # @return [Integer] Hash code
725
756
  def hash
726
- [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, 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, 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, slack_webhook_url, 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, override_account_expiry, sync_fields].hash
757
+ [name, description, output_format, parent_folder_id, locked, page_list, 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, 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, slack_webhook_url, 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, override_account_expiry, sync_fields].hash
727
758
  end
728
759
 
729
760
  # Builds the object from hash
@@ -0,0 +1,222 @@
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 file you uploaded to the URL from GET /uploads/presign.
18
+ class UploadJobSource < ApiModelBase
19
+ # Must be `upload`.
20
+ attr_accessor :type
21
+
22
+ # For an `upload` input, the `fields.key` from GET /uploads/presign, once you've uploaded the file to its URL. Up to 100 MB.
23
+ attr_accessor :cache_id
24
+
25
+ # The file's name. The job names the files it makes after it (contract.pdf makes contract-1.pdf). Default the name of the custom file, job file or URL path.
26
+ attr_accessor :filename
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'type' => :'type',
32
+ :'cache_id' => :'cache_id',
33
+ :'filename' => :'filename'
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
+ :'type' => :'String',
51
+ :'cache_id' => :'String',
52
+ :'filename' => :'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::UploadJobSource` 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::UploadJobSource`. 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?(:'type')
89
+ self.type = attributes[:'type']
90
+ else
91
+ self.type = 'upload'
92
+ end
93
+
94
+ if attributes.key?(:'cache_id')
95
+ self.cache_id = attributes[:'cache_id']
96
+ else
97
+ self.cache_id = nil
98
+ end
99
+
100
+ if attributes.key?(:'filename')
101
+ self.filename = attributes[:'filename']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @type.nil?
111
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
112
+ end
113
+
114
+ if @cache_id.nil?
115
+ invalid_properties.push('invalid value for "cache_id", cache_id cannot be nil.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ return false if @type.nil?
126
+ return false if @cache_id.nil?
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] type Value to be assigned
132
+ def type=(type)
133
+ if type.nil?
134
+ fail ArgumentError, 'type cannot be nil'
135
+ end
136
+
137
+ @type = type
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] cache_id Value to be assigned
142
+ def cache_id=(cache_id)
143
+ if cache_id.nil?
144
+ fail ArgumentError, 'cache_id cannot be nil'
145
+ end
146
+
147
+ @cache_id = cache_id
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ type == o.type &&
156
+ cache_id == o.cache_id &&
157
+ filename == o.filename
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ def hash
169
+ [type, cache_id, filename].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def self.build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ attributes = attributes.transform_keys(&:to_sym)
178
+ # include attributes inherited from allOf parents (the nearest declaration wins)
179
+ map = acceptable_attribute_map
180
+ transformed_hash = {}
181
+ acceptable_openapi_types.each_pair do |key, type|
182
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
183
+ transformed_hash["#{key}"] = nil
184
+ elsif type =~ /\AArray<(.*)>/i
185
+ # check to ensure the input is an array given that the attribute
186
+ # is documented as an array but the input is not
187
+ if attributes[map[key]].is_a?(Array)
188
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
189
+ end
190
+ elsif !attributes[map[key]].nil?
191
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
192
+ end
193
+ end
194
+ # Responses can include enum values added after this client was released, so the enum setters
195
+ # accept any value while the model is built from a response
196
+ allocate.tap do |model|
197
+ model.instance_variable_set(:@_skip_enum_validation, true)
198
+ model.send(:initialize, transformed_hash)
199
+ model.remove_instance_variable(:@_skip_enum_validation)
200
+ end
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ # include attributes inherited from allOf parents (the nearest declaration wins)
208
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ end
221
+
222
+ end